Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
11a88fb
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
EvertBunschoten Feb 17, 2026
6ba1ffb
fix trailing whitespace
EvertBunschoten Feb 17, 2026
5dca658
Merge branch 'develop' into feature_flame_lengthscale
EvertBunschoten Feb 19, 2026
2df59a8
Added function for thickened flame correction factor
EvertBunschoten Feb 20, 2026
3af0712
Diffusivity is multiplied and source terms are divided by correction …
EvertBunschoten Feb 20, 2026
b575044
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
EvertBunschoten Feb 20, 2026
e361ca7
Apply source correction only for steady problems
EvertBunschoten Feb 20, 2026
0de7e0d
bug fix
EvertBunschoten Feb 20, 2026
08573ce
Merge branch 'develop' into feature_flame_lengthscale
EvertBunschoten Feb 23, 2026
ffe779b
Merge branch 'develop' into feature_flame_lengthscale
EvertBunschoten Mar 3, 2026
ff6faea
NULL MLP no longer needed
EvertBunschoten Mar 19, 2026
5a9d2a0
Added general flame thickness calculation method
EvertBunschoten Mar 19, 2026
d9e5b59
Added default flame thickness option
EvertBunschoten Mar 19, 2026
dde7b7b
Merge branch 'develop' of https://github.com/su2code/SU2 into feature…
EvertBunschoten Mar 19, 2026
6963939
Removed flame lengthscale option and automatically approximate flame …
EvertBunschoten Mar 20, 2026
e8b31f9
Include flame thickness in convergence history
EvertBunschoten Mar 20, 2026
5dee848
precommit formatting
EvertBunschoten Mar 20, 2026
1010429
code factor
EvertBunschoten Mar 20, 2026
92eec69
Merge branch 'develop' into feature_flame_lengthscale
bigfooted Mar 23, 2026
98de6ac
Applied GitHub code suggestion
EvertBunschoten Mar 25, 2026
4ff73c6
Improved description of coarse grid correction
EvertBunschoten Mar 25, 2026
746a543
Formatting suggestions Pedro
EvertBunschoten Mar 25, 2026
7cdd149
Flame thickness in history output now defined as a user-defined coeff…
EvertBunschoten Mar 25, 2026
7015adc
const correction
EvertBunschoten Mar 25, 2026
671c8c3
Single allreduce of four variables instead of four separate allreduce…
EvertBunschoten Mar 25, 2026
566618e
Geometrytoolbox for gradient projection
EvertBunschoten Mar 25, 2026
8f1f2a1
Added ignition temperature option
EvertBunschoten Mar 25, 2026
d6ddccb
Clip global flame thickness to one meter maximum.
EvertBunschoten Mar 25, 2026
a27d833
Merge branch 'feature_flame_lengthscale' of https://github.com/su2cod…
EvertBunschoten Mar 25, 2026
e9d88dc
precommit
EvertBunschoten Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,8 @@ struct FluidFlamelet_ParsedOptions {
su2double* spark_reaction_rates; /*!< \brief Source terms for flamelet spark ignition option. */
unsigned short nspark; /*!< \brief Number of source terms for spark initialization. */
bool preferential_diffusion = false; /*!< \brief Preferential diffusion physics for flamelet solver.*/

su2double flame_lengthscale{1e-3}; /*!< \brief Lengthscale above which chemical source terms are dampened.*/
};

/*!
Expand Down
7 changes: 7 additions & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,9 @@ void CConfig::SetConfig_Options() {
/*!\brief SPARK_REACTION_RATES \n DESCRIPTION: Net source term values applied to species within spark area during spark ignition. \ingroup Config*/
addDoubleListOption("SPARK_REACTION_RATES", flamelet_ParsedOptions.nspark, flamelet_ParsedOptions.spark_reaction_rates);

/*!\brief FLAME_LENGTHSCALE \n DESCRIPTION: Lengthscale above which species source terms are dampened. \ingroup Config*/
addDoubleOption("FLAME_LENGTHSCALE", flamelet_ParsedOptions.flame_lengthscale, 1e-3);

/*--- Options related to mass diffusivity and thereby the species solver. ---*/

/*!\brief DIFFUSIVITY_MODEL\n DESCRIPTION: mass diffusivity model \n DEFAULT constant disffusivity \ingroup Config*/
Expand Down Expand Up @@ -5797,6 +5800,10 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
SU2_MPI::Error("Number of initial species incompatible with number of controlling variables and user scalars.", CURRENT_FUNCTION);
/*--- We can have additional user defined transported scalars ---*/
flamelet_ParsedOptions.n_scalars = flamelet_ParsedOptions.n_control_vars + flamelet_ParsedOptions.n_user_scalars;

if (flamelet_ParsedOptions.flame_lengthscale <= 0.0)
SU2_MPI::Error("Flame length scale value should be positive.", CURRENT_FUNCTION);

}

if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE && GetBounded_Scalar()) {
Expand Down
8 changes: 6 additions & 2 deletions SU2_CFD/src/solvers/CSpeciesFlameletSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver**

for (unsigned long i_mesh = 0; i_mesh <= config->GetnMGLevels(); i_mesh++) {
fluid_model_local = solver_container[i_mesh][FLOW_SOL]->GetFluidModel();
prog_burnt = GetBurntProgressVariable(fluid_model_local, scalar_init);
for (auto iVar = 0u; iVar < nVar; iVar++) scalar_init[iVar] = config->GetSpecies_Init()[iVar];

/*--- Set enthalpy based on initial temperature and scalars. ---*/
Expand All @@ -227,6 +226,7 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver**

if (flame_front_ignition) {

prog_burnt = GetBurntProgressVariable(fluid_model_local, scalar_init);
/*--- Determine if point is above or below the plane, assuming the normal
is pointing towards the burned region. ---*/
point_loc = 0.0;
Expand Down Expand Up @@ -382,12 +382,16 @@ void CSpeciesFlameletSolver::SetPreconditioner(CGeometry* geometry, CSolver** so

void CSpeciesFlameletSolver::Source_Residual(CGeometry* geometry, CSolver** solver_container,
CNumerics** numerics_container, CConfig* config, unsigned short iMesh) {

Comment thread
EvertBunschoten marked this conversation as resolved.
Outdated
const su2double flame_lengthscale = config->GetFlameletParsedOptions().flame_lengthscale;
const su2double flame_vol = pow(flame_lengthscale, nDim);

SU2_OMP_FOR_STAT(omp_chunk_size)
for (auto i_point = 0u; i_point < nPointDomain; i_point++) {
const su2double fac = min(flame_vol/ geometry->nodes->GetVolume(i_point), 1.0);
/*--- Add source terms from the lookup table directly to the residual. ---*/
for (auto i_var = 0; i_var < nVar; i_var++) {
LinSysRes(i_point, i_var) -= nodes->GetScalarSources(i_point)[i_var] * geometry->nodes->GetVolume(i_point);
LinSysRes(i_point, i_var) -= fac*nodes->GetScalarSources(i_point)[i_var] * geometry->nodes->GetVolume(i_point);
}
}
END_SU2_OMP_FOR
Expand Down