You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PENTRC: collision frequency rings in from the edge when the kinetic table ends before ψ_N = 1 #321
read_kin (pentrc/inputs.f90) samples the kinetic table fit on 101 regular nodes over ψ_N = 0 to 1 and fits a cubic spline to n, T, logΛ and ν on those nodes. If the table ends before ψ_N = 1, the last node is an extrapolation. In regression_solovev_kinetic_example, kinetic.txt ends at ψ_N = 0.998 with T = 0.59 eV, and the ψ_N = 1 node gets T ≈ 1e-6 eV (1e-4 eV with the pchip fit of #300). There logΛ < 0, ν_i ≈ −2.5e17 /s, and the cubic spline of ν_i rings inward from that one node, changing sign at every node down to ψ_N ≈ 0.8.
This is what drives the example's torque and δW_k: below ψ_N = 0.8 the cubic and pchip runs agree to 7e-4, and the +1 % torque / +25 % δW_k difference between them comes entirely from 0.8 < ψ_N < 0.9.
Possible fixes: keep the regular grid inside the table's ψ_N range, or floor T (and logΛ) at the edge. Scripts: pr300_plots_scripts.zip (run_plots.sh).
Yikes!
I suppose one immediate fix is to add a psi=1 point to the input table.
Can a pchip fit of the collisionality spline fix this nu_i ringing? It seems like you are saying your "pchip" case is a pchip fit of T_i not nu_i.
Bigger picture, any zero or very low temperature is going to spike collisionality, which will ring the cubic splines and perhaps cause pchip fails as well. Analytic equilibria might very well set P(1) = T_i(1) = 0 at the edge so I suppose we need to support this rather than just flooring T. I suppose we could support it by directly calculating nu whenever it is needed instead of splining it independently. This shouldn't impact performance much since it can be done in the outermost (psi) integrand of the PENTRC code. It's just maybe a little annoying to have to do 😝 I guess AI is good for streamlining this kind of work
Activity
logan-nc commentedon Oct 19, 2026
Yikes!
I suppose one immediate fix is to add a psi=1 point to the input table.
Can a pchip fit of the collisionality spline fix this nu_i ringing? It seems like you are saying your "pchip" case is a pchip fit of T_i not nu_i.
Bigger picture, any zero or very low temperature is going to spike collisionality, which will ring the cubic splines and perhaps cause pchip fails as well. Analytic equilibria might very well set P(1) = T_i(1) = 0 at the edge so I suppose we need to support this rather than just flooring T. I suppose we could support it by directly calculating nu whenever it is needed instead of splining it independently. This shouldn't impact performance much since it can be done in the outermost (psi) integrand of the PENTRC code. It's just maybe a little annoying to have to do 😝 I guess AI is good for streamlining this kind of work
Merge pull request #336 from PrincetonUniversity/pentrc-edge-collisio…
PENTRC - BUG FIX - Stop the collision frequency spline from ringing i…