Repository navigation
Carry Euler ddt in simpleFoam's steady turbulence equations - #112
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
simpleFoam's turbulence equations now take the case's
ddtSchemes default Euler, as OpenFOAM's do. Any other non-steady scheme on simpleFoam, Euler with a scalarTransport tracer on either steady solver's default path, and Euler with a RAS model on rhoSimpleFoam's default device path now stop at start-up by name.OpenFOAM: simpleFoam's UEqn has no ddt. Its turbulence model's equations construct
fvm::ddt(alpha, rho, k)andfvm::ddt(alpha, rho, epsilon|omega|nuTilda)whatever the solver (kEpsilon.C:254, 275,kOmegaSSTBase.C:572, 602,SpalartAllmarasBase.C:468).GeometricField::storeOldTimesat its first write in the time step).default Euler; so does rhoSimpleFoam's gasMixing/injectorPipe.brae before: the steady step dropped both terms. The dispatcher's notice called the entry inert ("OpenFOAM's steady solvers construct no ddt term").
Change:
DeviceSimpleSolver::setSteadyTurbulenceDdt: on the steady step the closures'ScalarDdtbundles take Euler with controlDict's deltaT. That deltaT is required, as OpenFOAM requires it.step()takes the old levels at the start of the iteration. The momentum assembly takes no ddt.gpuSimpleFoamreads ddtSchemes. It refuses by name:ddt(...)entry;fvm::ddt(s)(scalarTransport.C:341) orfvm::ddt(rho, s)(:319), and neither steady path carries it for the tracer. No stock simpleFoam tutorial pairs the two.tests/solver_dispatch.sh's comment are corrected; the test's assertion is unchanged.BRAE_CONTROL_STEADY_TURBULENCE_DDT_IGNORED=1.How it was found: OpenFOAM's own kEpsilon with writes added (
tools/dumpKEpsilon) was compared with brae's term dump on squareBend at iteration 1. Production's inputs matched to 6.5e-11, and the k system's off-diagonals matched exactly. The assembled epsilon diagonal was 1.0·V above brae's in every interior cell: the Euler term at deltaT 1.Gate: new
tests/simple_turbulence_ddt_vs_openfoam.sh(label slow). squareBend from rest, three iterations, every solve pinned, every entry of p, U, k, epsilon and nut, and phi, within 1e-8:default backwardon simpleFoam;Gauss linearUpwind grad(U)in both codes. The tutorial'slimitedLinearV 1cannot be judged from rest: from a uniform start every face's limiter sits in NVDVTVDV's 1000-branch, whose sign round-off decides. From OpenFOAM's own iteration 20, as shipped, brae holds 3.0e-09 over three iterations. Before this change it was 4.7e-04, at the outlet.This builds on the steady update points (#111): squareBend's turbulent inlets take OpenFOAM's update points there.
Not changed here: the OF-mirror arms' scalarTransport also solves the tracer without its ddt under Euler (
rhoScalarTransportFO.cuh), and gasMixing/injectorPipe ships that pair. That is a follow-up.Regressions (one node, against develop
e4c67534, before #111; each tree built and run on the same node):coupledinterfacescheme_vs_openfoam, four manifest-drift checks, three bump2D tutorials, motorBike and two turbulentFlatPlate tutorials). The two new gates were also red, because that run carried earlier drafts of their scripts.ctest_cache_selftestwas also red on the candidate. It fails on develop's own build when rerun (7 of 7 runs; 9 of 10 on the candidates). Itsdata_changedarm rewrites a file at the same size straight after atouch, and the cache's (size, mtime) check does not see the rewrite on that filesystem. Not touched here.No tolerance was loosened.