Repository navigation
Feature/galerkin plasma energy - #666
matt-pharr wants to merge 5 commits into
Conversation
…ner-layer matching and publish their plasma response Groundwork for Galerkin inner-layer matching for PE, with the abstraction changes it needs on the Galerkin, Δ′ and matching side. Galerkin results now carry the solution, plasma energy matrix and free-boundary energies a Forward result does, and drive the perturbed-equilibrium response. Galerkin plasma response - The solve records edge_response, the edge momentum FΞ′ + KΞ of every solution column, from the edge rows of the stiffness before the boundary conditions replace them. On the error-field (EF) columns (a unit edge displacement per mode, no big-solution drive) it is W_P·ψ₀² [Glasser 2016, Eq. 66]; it agrees with Forward and Riccati to 2e-7 and converges at fourth order in nx. - With error_field_response (renamed from rpec_flag) the EF columns are published as the ideal-closed solution and wp, and with vac_flag the free-boundary energies, so plasma_response accepts the result. Both flags now default to true. MatchProblem's ideal keyword and the [Match] ideal key are removed: the Galerkin solve is itself the ideal solution. - A matched Galerkin result publishes its complex edge response W_eff = (F_EF + F_plasma·cout)/ψ₀² and its free-boundary energies; the anti-Hermitian part is the torque absorbed in the inner layers. plasma_response refuses every :matched result until matched singular coupling is defined. - free_run takes the plasma energy matrix wp, so Forward, Galerkin and matched results share it, and FreeBoundaryStability/W_plasma is written from result.wp. Δ′ payload - DeltaPrimeData has one meaning per field: raw_freeboundary, raw_fixedboundary, ef (Δ_EF, the response to a unit edge displacement with the edge otherwise fixed) and the PEST-3 blocks of both boundaries (PEST3Blocks, from pest3_decompose). Consumers read fields, not the integrator. - Galerkin and Riccati both compute both boundaries. Galerkin re-solves its big-solution columns with the vacuum edge for the free-boundary Δ′ (free_boundary_delta_prime, default true); Riccati takes the fixed-boundary Δ′ and Δ_EF from one Dirichlet-edge BVP and gains the same error_field_response flag. - With error_field_response the Galerkin tearing Δ′ was the fixed-boundary one; it is now free-boundary. - Matching pairs Δ_EF with raw_fixedboundary. Riccati paired it with its free-boundary Δ′, which gave matched coefficients and bpen wrong by order one at low rotation (4% at 1 kHz on the LAR deck); they now agree with Galerkin to ~1e-3. The [Match] deck guard checks error_field_response alone. - TearingProblem takes fixed_boundary=true for the fixed-boundary Δ′ (a conformal wall on the plasma); tearing refuses a result that lacks the requested boundary instead of falling back to a stub. Renames (clean break) - [Galerkin] rpec_flag → error_field_response; Delta_coil → Delta_EF (DeltaPrimeData.ef, SingularSurfaces/Delta_EF); MatchResult.rpec_eig → forced_eigenvalue (Match/forced_eigenvalue). - SingularSurfaces/Delta_prime_raw → Delta_prime_raw_freeboundary, plus Delta_prime_raw_fixedboundary and the *_fixedboundary PEST-3 blocks; Riccati now also writes pest3_A/B/Gamma. - Harness cases diiid_n1_riccati and gal_resistive_diiid follow the new paths and track the fixed-boundary Δ′ diagonal.
…gy matrix for Riccati matches
|
This pull request is missing a reviewer. If you are not ready to name them, mark this pull request as a draft. |
…e least stable eigenmode of a Galerkin solve
|
I am going to add another two PRs in here shimmed under #666, since realizing that there is some reworking that needs to be done for the riccati integrator. The first will get rid of the superfluous integrations done by the february-era serial riccati code that is still here for some reason, and the second will implement #671 to add xi profiles to riccati output from the riccati BVP solve. Then this will be the capstone which should enable riccati to have full functionality for PerturbedEquilibrium, save for the kinetic force operator. This PR will probably be on hold for a week or so while I work on these things. |
Placeholder PR for ideal/matched galerkin and matched riccati plasma energy matrices.