Repository navigation
InnerLayer.CCC - FEATURE - Add the Cho, Choi and Choi drift-resistive linear MHD inner layer - #654
Open
matt-pharr wants to merge 1 commit into
Open
matt-pharr wants to merge 1 commit into
matt-pharr wants to merge 1 commit into
Conversation
Contributor
|
This pull request is missing an assignee. If you are not ready to name them, mark this pull request as a draft. |
matt-pharr
marked this pull request as draft
November 5, 2026 16:21
… layer as a ToroidalLayer model CCCModel solves the drift-resistive layer equations of Cho, Choi & Choi, IEEE Trans. Plasma Sci. PS-15, 418 (1987), in the form of Kim, Cho & Choi, Phys. Fluids 31, 2659 (1988), Eqs. (1a)-(1c): the GGJ layer with the electron diamagnetic frequency Q* in Ohm's law and vorticity and the perpendicular-transport weight M⊥/M on the pressure equation. CCCParameters holds a GGJParameters plus Qstar and mperp and takes GGJ's scales, Mercier exponents and Δ normalization. Its equations, its Wasow basis (a block- diagonalizing T equal to GW2020's at Q* = 0, m = 1, with a general Sylvester splitting solve) and the rates of its two exponential families (Kim Eq. 2) run on the shared rotated-ray solver; only :ray is available. The library gains two optional hooks for models whose exponential pairs have different rates, parabolic_resolution_rate and ray_angle_admissible, whose defaults leave GGJ unchanged.
matt-pharr
force-pushed
the
feature/kaist-inner-layer
branch
from
November 5, 2026 16:27
b84b559 to
5931e72
Compare
Collaborator
|
Awesome! |
matt-pharr
marked this pull request as ready for review
November 9, 2026 16:16
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.
Release note
Adds
CCCModel, the drift-resistive linear MHD inner layer of Cho, Choi & Choi (1987) in the form of Kim, Cho & Choi (1988): the GGJ layer with electron diamagnetic drift (Q*) and perpendicular transport (M⊥/M), solved with the rotated-ray backend.Wasow analysis was done in mathematica to obtain the asymptotic series using a wolframscript routine I have been using for my other derivation which essentially just re-implemented Zhirui's mathematica notebook from GW2020. This is essentially the same as the GGJ ray solver but with coefficients and asymptotic series for the Cho-Choi-Choi layer, so this is a small, drop-in change.
Regression report
Validation and benchmarks
These runs used the prototype of this model (the same equations threaded through GGJ on an earlier branch);
CCCModelreproduces it to 1.5e-8 at the pinned point (q4 surface, Q* = 0.5, M⊥/M = 1.4, Q = 5i).Kim, Cho & Choi (1988) Figs. 1b and 2b. Their surface (E = −0.01, F = H = 0, G = K = 100, M⊥/M = 1), tearing (odd) parity, Q* = 0 (Fig. 1b) and Q* = 0.05 (Fig. 2b). Roots of Δ₋(Q) = Δ₀ found by secant continuation along Δ₀, overlaid on the published curves with the scan axes calibrated from their tick marks. Kim et al. plot their Fourier-space tearing quantity Δ_o, which their Eq. (10b) relates to the real-space Δ′_o we compute; we convert with that equation and fit nothing.
The Δ₀ = 0 roots, which do not depend on how Δ is normalized, land on the published curves:
Away from Δ₀ = 0, Kim's axis is Δ_o = C_o·Δ′_o with C_o = |Γ(1+p₊)/Γ(−p₊)·cot(πp₊/2)| and p₊ = −1/2 + √(−D_I) (Eq. 10b); for this surface C_o = 0.6293327. With that conversion our curves overlay all of Fig. 1b and all four Q* = 0.05 curves of Fig. 2b. C_o depends only on the Mercier exponent, so the same value serves both Q*. Our Δ uses the GGJ normalization cross-checked against Fortran
rmatch.Convergence to GGJ. On the q4 benchmark surface, Q* from 1e-7 to 1 and M⊥/M − 1 from 1e-7 to 1, at Q = 0.01, 0.1 + 0.1i, i, 3 + 3i, 10i and 100i:
Accuracy and cost.
delta_convergencespread (contour angle, mesh, series order and radius, march tolerance, BVP edge, decaying-pair separation) on the q4 surface with Q* = 0.5, M⊥/M = 1.4: ≤ 3.4e-7 at Q = 0.5 + 0.5i and ≤ 7.8e-8 at Q = 5i.Single-solve times on one laptop core:
The cost grows with K·|Q|·Q*², because the march resolves the faster exponential family across the slower one's whole band.
Tearing roots on GPEC examples (dispersion roots by continuation from the SLAYER root, Q* = −ω*ₑ/Q₀ from the kinetic profiles, M⊥/M = 1; not yet wired into
TearingProblem):examples/DIIID-like_SLAYER_example, Q* ≈ 1.2–1.5 at 2/1–4/1). The CCC roots rotate at SLAYER's lab frequency on 2/1 and 3/1 (within 3%) and near it on 4/1 (−3.6e3 against −2.8e3 rad/s). The damping on 3/1 and 4/1 comes out at −310 and −420 s⁻¹, against SLAYER's −145 and −450 s⁻¹, while plain GGJ gives −1230 and −1756 s⁻¹. 2/1 differs: SLAYER is unstable at +164 s⁻¹ (without its curvature offset), CCC damped at about −330 s⁻¹ (not converged to tolerance), GGJ −1004 s⁻¹.Notes for reviewers
ToroidalLayerlibrary); review only the commits above552e97504.CCCModel/CCCParameters(src/InnerLayer/CCC/) implement theToroidalLayerParametersinterface: Kim (1988) Eqs. (1a)–(1c) as rows and weak form, a Wasow basis from Kim's A₀–A₂ with a block-diagonalizing T that equals GW2020's at Q* = 0, M⊥/M = 1, a general Sylvester splitting solve, and the two exponential families of Kim Eq. (2) setting the ray angle and mesh.CCCParametersholds aGGJParametersplusQstar,mperp, and takes GGJ's scales and Δ normalization. Only:rayis available.parabolic_resolution_rateandray_angle_admissible, whose defaults leave GGJ unchanged.runtests_innerlayer.jl): the Wasow matrices reproduce the ODE matrix to 1e-16; the first-order Ξ series coefficient matches a closed form from a separate Mathematica derivation to 1e-8; Δ is independent of the contour angle to 1e-7;CCCModelat Q* = 0, M⊥/M = 1 reproduces GGJ to 3e-10; Kim Figs. 1b and 2b (tearing dispersion at Q* = 0 and 0.05) are reproduced with no fitted parameter once our real-space Δ′_o is converted to their Fourier-space Δ_o (Kim Eq. 10b; factor 0.6293 for this surface).TearingProblem, dispersion, HDF5 output, deck (inner_model = "CCC") andMatchProblemsupport throughToroidalLayerModel, with Q* = −ω*ₑ/Q₀ from the kinetic profiles, a regression case and deck/API parity tests.🤖 (Partially :P) generated with Claude Code