Skip to content

Take the vacuum magnetic pressure alone as the total pressure outside the free boundary - #32

Open
CharlesCNorton wants to merge 1 commit into
jonathanschilling:masterfrom
CharlesCNorton:edge-pressure-balance
Open

Take the vacuum magnetic pressure alone as the total pressure outside the free boundary#32
CharlesCNorton wants to merge 1 commit into
jonathanschilling:masterfrom
CharlesCNorton:edge-pressure-balance

Conversation

@CharlesCNorton

Copy link
Copy Markdown
Contributor

funct3d.f90 adds the extrapolated edge pressure to the vacuum magnetic pressure before using it as the total pressure outside the plasma:

presf_ns = pmass(hs*(ns-1.5_dp))
IF (presf_ns .ne. zero) then
   presf_ns = (pmass(1._dp)/presf_ns) * pres(ns)
end if
...
gcon(l)      = bsqvac(lk) + presf_ns

bcovar has already added the kinetic pressure to bsq, so the plasma side bsqsav(lk,3) carries p + |B|^2/2mu0. Adding presf_ns on the vacuum side cancels that pressure from both sides, so rbsq and dbsq measure continuity of the field strength instead of the pressure balance p + |B|^2/2mu0 = |B_vac|^2/2mu0 that holds across a plasma-vacuum interface. This takes the vacuum magnetic pressure alone and drops the extrapolation, which nothing else reads.

The same change is ORNL-Fusion/PARVMEC#86 and proximafusion/vmecpp#830.

presf_ns is identically zero for a pressure profile that vanishes at s = 1, so every input that ships is unaffected and ctest passes.

It matters for a profile with a pedestal. Starting from fb/input.cth_like_free_bdy with pmass_type = 'power_series' and AM = 1.0, -0.5:

edge pressure boundary, max boundary, rms volume iota on axis
20 Pa 0.556 mm 0.260 mm 0.304334 -> 0.304593 1.255122 -> 1.255816
100 Pa 2.854 mm 1.320 mm 0.304827 -> 0.306134 1.256954 -> 1.260467

linear in the edge pressure, and within one percent of what the same change gives in PARVMEC on its own copy of that case.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant