Repository navigation
Source term model for preferential diffusion - #28
Open
joshkellyjak wants to merge 18 commits into
Open
joshkellyjak wants to merge 18 commits into
joshkellyjak wants to merge 18 commits into
Conversation
…tput in ParaView format
…thod' into feature_new_pref_diffusion
This branch has not been deployed
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.
Proposed Changes
This PR adds the generator side of the SOURCE_TERM preferential-diffusion method: model B2 of Schepers & van Oijen, Combust. Flame 280 (2025) 114332. It produces the manifolds used by the companion SU2 work, and the existing BETA_CORRECTION path is unchanged. It also fixes several table-generation problems found while validating the method against an OpenFOAM/CHEM1D solution of a lean H2 slot burner. Two of those fixes change every 3-D FGM table, not only preferential-diffusion ones (see Behaviour changes).
Flamelet data (SOURCE_TERM only)
New settings:
Config_FGM.SetPreferentialDiffusionMethod("BETA_CORRECTION" | "SOURCE_TERM")andSetPDMajorSpecies([...]).For every controlling variable
<cv>and major species<sp>, each flamelet now carries:D_<cv>_<sp>;DT_<cv>;Y-<sp>;Res_<cv>of the non-major species, computed in conservative finite-volume form (ComputeScalarDivergenceSources).These are exactly the column names SU2 builds from
CONTROLLING_VARIABLE_NAMESandPREFERENTIAL_DIFFUSION_MAJOR_SPECIES(CFluidFlamelet.cpp). If the progress variable is built from major species only,Res_<PV>is identically zero. That matchesprefDYc_Resin the reference implementation.SOURCE_TERM switches the mixture fraction to the elemental definition of Eq. (11), via
SetMixtureFractionDefinition("BILGER" | "ELEMENTAL"). The two definitions are normalised to agree exactly on the mixing line, so inlet and initial values don't change. Code that used the Bilger offset as Z_st now callsGetStoichiometricMixtureFraction(), because under the elemental definition the offset is no longer Z_st.SetSoretDiffusion(bool)is opt-in (off by default), so existing flamelet data don't change. Turn it on for SOURCE_TERM, because SU2 applies theDT_<cv>coefficients at runtime.Table generation
Res_<cv>columns are left out of the RBF smoothing pass.SetSourceDeadBands, default 5e-3 at each end) switch the closure sources off at the unburnt and burnt ends of each level:ClosureSourceConservation.py,EnforceClosureSourceConservation):LookUp_XYZand corrects the node values so that the source integrated along each flamelet's trajectory matches that flamelet's own integral._unsmoothedNodeshook. All their smoothing neighbours lie on the reacting side, so smoothing pulled the fresh edge towards the flame.applyRefinementWithinNormalized, andrefineEquilibriumnow also works on 3-D tables, with its margin measured per level.Fixes found along the way (existing upstream behaviour)
FlameletConcatenator.SetLookUpVarsnever stored its list, so every requested look-up variable (Heat_Release,Density, …) was silently left out of the manifold.BurnerFlameSolver._postProcessResultsread the solution of a burner flamelet that hadn't converged. Near the lean limit this crashed the whole parallel generation.Res_<cv>columns are missing, as it already did for the flux columns, instead of tabulating zeros.Behaviour changes for existing tables
refineEquilibrium(the methane tutorial, for example) will be meshed differently.Related Work
Solver side: (Source term method for preferential diffusion SU2#2970)
Model: J. Schepers & J. A. van Oijen, Combust. Flame 280 (2025) 114332.
Open PR Boundary update with testcases #27 (
new_fixed_strain) touches 7 of this PR's 9 files. A trial merge against its head (7566a6d, 15 Oct 2026) conflicts inFlameletSolvers.py,LUTGenerator_Base.pyandLUTGenerators.py; the other four files merge cleanly. Where the two PRs interact:setTableAxesmakes the level axis configurable. This PR's projection checks the axes, so that case is covered._createBoundaryPolylineForTableLevel) removes the unsupported part of each level. That is why the support taper from the original work was dropped here.setSourceTermClampingzeroes small species sources near the reactant and product boundaries. It overlaps in purpose with this PR's hull-edge anchoring and dead bands.__applyEquilibriumRefinementstays 2-D only there, which conflicts with the 3-D refinement here.Whichever PR merges second will need a careful rebase of
LUTGenerators.pyandLUTGenerator_Base.py, because the overlaps are in meaning as well as in text.PR Checklist
pre-commit run --allto format old commits.🤖 Generated with Claude Code