Skip to content

Implicit progress variable source Jacobian for flamelet solver - #3025

Open
bigfooted wants to merge 6 commits into
developfrom
fix_unsteady_flamelet
Open

bigfooted wants to merge 6 commits into
developfrom
fix_unsteady_flamelet

Conversation

@bigfooted

Copy link
Copy Markdown
Contributor

The progress variable source was treated fully explicitly, which stalls the PV equation at high CFL. Add the decreasing part of dS/dPV, obtained from a forward-difference table lookup, to the Jacobian diagonal.

With CFL 1e5, an ILU preconditioner and a consistent table, the unsteady 1D premixed flame converges in 8-10 inner iterations per time step and matches a 300-inner-iteration reference.

Flamelet regression residuals shift slightly; reference values are not yet updated.

Proposed Changes

Give a brief overview of your contribution here in a few sentences.

Related Work

Resolve any issues (bug fix or feature request), note any related PRs, or mention interactions with the work of others, if any.

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

The progress variable source was treated fully explicitly, which stalls
the PV equation at high CFL. Add the decreasing part of dS/dPV, obtained
from a forward-difference table lookup, to the Jacobian diagonal.

With CFL 1e5, an ILU preconditioner and a consistent table, the unsteady
1D premixed flame converges in 8-10 inner iterations per time step and
matches a 300-inner-iteration reference.

Flamelet regression residuals shift slightly; reference values are not
yet updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The extra Jacobian term changes the iteration history of the flamelet
tests. The discrete adjoint tests change because the adjoint linear
solves reuse the primal Jacobian; the converged adjoint is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@EvertBunschoten EvertBunschoten left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good initiative! I think it would be a low hanging fruit to extend this feature to use the Jacobian of the other controlling variables as well. The Jacobian of the source term w.r.t. the progress variable is of course the highest, but I expect that the mixture fraction and variance of the pv are also relevant.

Comment on lines +658 to +663
const su2double delta = 1e-6;
vector<su2double> scalars_pert = scalars;
scalars_pert[I_PROGVAR] += delta;
vector<su2double> sources_pert(table_sources.size());
fluid_model_local->EvaluateDataSet(scalars_pert, FLAMELET_LOOKUP_OPS::SOURCES, sources_pert);
const su2double dsource = (fmax(0, sources_pert[I_PROGVAR]) - table_sources[I_PROGVAR]) / delta;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calculating the Jacobian of thermochemical variables should be done in the FlameletFluidModel class. When using MLP for example, the Jacobian can be calculated analytically.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, done in b2cd7c9. CFluidFlamelet::GetProgVarSourceJacobian now provides dS_PV/dPV: analytic from the MLP Jacobian query, forward difference on the PV source column for the LUT. The solver only calls it and zeroes the derivative where the source is clipped.

EvertBunschoten and others added 3 commits November 26, 2026 11:17
The fluid model now provides dS_PV/dPV through GetProgVarSourceJacobian:
analytically from the MLP Jacobian query, and by a forward difference on
the PV source column only for the lookup table. The solver no longer
perturbs the full source lookup and sets the derivative to zero where the
PV source is clipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants