Repository navigation
Evaluate PENTRC collision rates from primitive profile queries - #318
krystophny wants to merge 8 commits into
Conversation
…bulated data without derivatives Fritsch-Carlson interior slopes with scipy PchipInterpolator's end slopes, so Python front ends (bouquet, TPS) can reproduce GPEC's interpolant exactly. Unit test checks values and derivatives against scipy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…profile table The tabulated Zeff (RDCON MRE terms) and the PENTRC kinetic input table carry pedestal-scale gradients; a cubic spline rings there, pchip does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pchip fits any table of 2 or more points, so the 4-point minimum of the "extrap" spline goes. A scalar Zeff now becomes a flat profile on 2 nodes, the same table that tearing-physics-suite writes for a scalar Zeff (psi_N_Zeff = 0, 1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39abcf8 to
e9f41a8
Compare
|
A separate collision-width defect found while preparing D/T/electron collisionality controls is now reported in #319 and fixed in #320. This is independent of the derived-rate profile spline repaired here. The scan will qualify this PR's current head ( Chris&AI |
Preserve current primitive spline and solver fixes while retaining the pointwise Coulomb-rate repair. Native profile oracle passes with maximum relative error 1.4153e-7. Chris&AI
|
@krystophny thanks for digging into #321. I've gone with a smaller fix for v1.6 in #336 (+22/−5, all in
This leaves n, T, ω_E and their derivatives bit-identical to develop. It needs no changes to The PR description links an artifact with before/after ν profiles and torques. Since we're freezing the Fortran test setup before the release, there's no new check target. Are you OK with closing this one in favor of #336? If yes, please just go ahead and close it. |
|
Fine with #336, closing in favour of it. Thanks! Chris&AI |
PENTRC can cubic-interpolate positive tabulated collision rates into negative off-grid values, reversing the collisional response despite positive density and temperature. Evaluate the existing Coulomb model from primitive-profile queries instead, using the same rates and derivatives in torque, diagnostics and exports. Primitive interpolation, constants and nfac/tfac collision semantics are preserved. Refs #52.
The independent native regression fails before and passes after: a positive analytic edge profile previously gives nu_i=-91.36 s^-1 where the physical model gives 284.41 s^-1. It checks knots/off-grid values, gradients, exported positivity and scaling semantics. The earlier TC24 native-library replay changes a negative rate at psi_n=0.984411 from -0.0674 to 720.013 s^-1, with bitwise unchanged primitives and maximum independent error 9.39e-8. This qualifies the rate repair, not torque convergence.
Current develop is merged, preserving upstream radial-export and energy-integration fixes. Full GNU/Intel CI exposed an invalid example extrapolation: kinetic data end at psi=.997995992, whereas the previous .99999 equilibrium cut extrapolates Te to .002934648 eV and logLambda to -2.56638. Rates are now reconstructed only at consumed queries, preserving direct primitive/Zeff consumers. Both examples explicitly use the supplied endpoint; physical guards remain unchanged and actual invalid extrapolated queries still fail.
The owning make -C install check-pentrc-collisions target passes 315 profile/query rows on GNU Fortran 16.1.0, maximum independent rate error 1.99166e-7, minimum example logLambda 5.37404. Six primitive values and gradients match independently compiled unmodified develop exactly. Darwin uses its native dead-strip flag; Linux retains GNU linker flags. Full GNU/Intel example replay runs in pushed CI.
Chris&AI