Repository navigation
Conversation
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
left a comment
There was a problem hiding this comment.
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.
| 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; |
There was a problem hiding this comment.
Calculating the Jacobian of thermochemical variables should be done in the FlameletFluidModel class. When using MLP for example, the Jacobian can be calculated analytically.
There was a problem hiding this comment.
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.
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>
…unsteady_flamelet
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.
pre-commit run --allto format old commits.