Conversation
added 15 commits
September 21, 2026 16:48
…el incomptability (no tauIC with rhoimp)
… vpar source, dZKi_prof_drho, recombination sink
…on and neutral radiation in T/Te equations
…e T RHS (this one looks more serious...)
…n(var_T,var_vpar)
…x and automatic linearization
jorekart
force-pushed
the
correct_equation_linearization_issues
branch
from
September 24, 2026 08:30
3956054 to
9c495c6
Compare
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.
Correct equation linearization issues
This PR fixes the linearization problems in
models/model600/mod_elt_matrix_fft.f90found by the equation verificator introduced in #41. That tool linearizes the
model-600 weak forms symbolically and compares the result, term by term, with the
hand-written residual and Jacobian. The finding numbers below refer to its
util/equation_codegen/JOREK_FINDINGS.md. There is one commit per finding.RHS fixes (these change the converged solution)
rhs_ij_k(var_rhoimp): the toroidal channel was missing theimpurity shock-capturing diffusivity
D_par_imp_sc_num*tau_sc.rhs_ij(var_T): the parallel pressure convection used theneutral density
rn0where it should userimp0.Amat fixes
factor of two too large.
impurity/
alpha_e(T)contributions.(
B²·dvpar/dt + ½·vpar·dB²/dt).tgnum_vparterms were missing theBB2/psiderivatives.
visco_par_partangent wasmissing.
tgnum_T/Ti/Tetangents had the wrong power ofBigR.kinetic-coupling term,
dZK*_prof_drho, and the recombination sink.thetafactor.
alpha_e/alpha_impwhere the_bisformis needed.
and friction-source derivatives, and one term used the uncorrected
densities.
amat_n(var_T,var_vpar)was missing the impurity pressure.Known remaining differences
respect to psi, and the vpar pinch tangent has the wrong sign. These are
left to the pinch developer. @szmate00 , could you look a this?
these are accepted as known differences, because impurities and
tauIC /= 0cannot be run together. That combination should be rejected atinput time; it is not enforced yet.