Skip to content

PerturbedEquilibrium - BUGFIX! - Reject a perturbed equilibrium solved with a wall - #620

Draft
matt-pharr wants to merge 3 commits into
refactor/v2-consolidationfrom
bugfix/pe-reject-wall
Draft

matt-pharr wants to merge 3 commits into
refactor/v2-consolidationfrom
bugfix/pe-reject-wall

Conversation

@matt-pharr

Copy link
Copy Markdown
Collaborator

Draft, stacked on #602. Only the check is in so far. The Solovev examples and the test fixture still run PE with a wall, so they fail until they move to an equilibrium that is stable without one.

Closes #613

What this does

The plasma response P = Λ·L⁻¹ took Λ from the run's δW, with its wall, and the surface inductance L from free space, so a run with a wall silently mixed two vacuum models. Now:

  • plasma_response errors on a force-free-states solve with a wall;
  • parse_deck stops on a deck with both [PerturbedEquilibrium] and [Wall].

Both error messages give the fix: solve without a wall.

Still to do

The Solovev decks that run PE (Solovev_ideal_example and the three Solovev_kinetic_* examples) and the regression_solovev_ideal_example test fixture rely on a conformal wall, because their n = 1 kink is unstable without one. They cannot be re-tuned to be stable without a wall.

A scan over q₀ ∈ [1.9, 5] and κ ∈ [1.0, 1.6] found et[1] < 0 everywhere, with ep strongly negative. Solovev's pressure is linear in ψ, so the edge current is finite and drives a peeling/external kink. The pressure scale p0fac only offsets the pressure and leaves δW unchanged.

The plan is:

  1. Check whether a large-aspect-ratio (LAR) equilibrium with zero edge current is stable at n = 1 with no wall while keeping the 2/1 and 3/1 surfaces.
  2. If so, move the PE examples and fixture onto it. If not, fall back to the DIII-D-like equilibrium, which already runs PE without a wall.
  3. Update the pinned test values and the Solovev-PE harness baselines.

Release note

  • Audience: users
  • Numerical impact: the PE examples and fixture move to a new equilibrium (harness @ pending)
  • Migration: a perturbed equilibrium needs a solve without a wall. Remove [Wall] from any deck with [PerturbedEquilibrium], or pass wall=nothing to solve.

A perturbed-equilibrium calculation no longer silently combines a with-wall plasma energy with a free-space surface inductance. A run with a wall is now an error.

Regression report

pending

🤖 Generated with Claude Code

https://claude.ai/code/session_014wKUyAaxKdTJ5ch1boMFE1

@matt-pharr matt-pharr self-assigned this Oct 31, 2026
@github-actions github-actions Bot added bugfix Something was wrong and now is not changed-results Results move or an interface breaks - read before upgrading labels Oct 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request is missing a reviewer.

If you are not ready to name them, mark this pull request as a draft.
docs/development/contributors.md suggests lead developers to ask.
Merging is not blocked here, but no pull request may be merged without human review.

@matt-pharr
matt-pharr added this pull request to stack #621 October 31, 2026 08:22
matt-pharr and others added 3 commits October 31, 2026 17:48
…d with a wall

The plasma response P = Λ·L⁻¹ took Λ from the run's δW, with its wall, and the surface inductance L
from free space, so a wall run silently mixed two vacuum models. plasma_response now errors on a
force-free-states solve with a wall, and parse_deck stops on a deck with both [PerturbedEquilibrium]
and [Wall].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014wKUyAaxKdTJ5ch1boMFE1
… TJ equilibrium

The Solovev kink needs a wall at every q0 and elongation scanned, so it cannot run a perturbed
equilibrium once a wall is rejected. TJ_ideal_example and the three TJ_kinetic_* decks replace the
Solovev PE decks on a TJ-analytic equilibrium stable at n = 1 with no wall (et[1] = +0.435).
Solovev_ideal_example keeps its wall and drops its PE stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ixtures

Every test that runs a perturbed equilibrium now starts from a coarse TJ-analytic fixture with no wall.
The harness tracks the moved decks as tj_n1 and tj_kinetic_*; solovev_n1 stays as stability only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@d-burg
d-burg force-pushed the bugfix/pe-reject-wall branch from de5d179 to e375075 Compare October 31, 2026 23:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something was wrong and now is not changed-results Results move or an interface breaks - read before upgrading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants