Vacuum - FEATURE - Add 3D conformal conducting wall capabilities - #436
Open
jhalpern30 wants to merge 2 commits into
Open
Vacuum - FEATURE - Add 3D conformal conducting wall capabilities#436jhalpern30 wants to merge 2 commits into
jhalpern30 wants to merge 2 commits 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. |
jhalpern30
marked this pull request as ready for review
August 31, 2026 17:10
jhalpern30
requested review from
d-burg
and
a lite review from Copilot
and removed request for
Copilot
August 31, 2026 17:10
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
The 3D vacuum solver can now put a conducting wall around a non-axisymmetric boundary. With
nzeta_in > 1,shape = "conformal"builds the wall by displacing every plasma point a fixeddistance along its own normal. Previously any 3D-input case — stellarator or 3D tokamak alike —
could only be run with
shape = "nowall".Regression report
Run against the tip of this branch (
5f21e873, develop merged in) vs current develop:Both cases: every tracked quantity identical (
Diff 0.0e+00/ checksums identical). Full tablesin the CI harness log for this run.
NOTE: because I am not really tracking the 3D in the regression yet, the harness isn't super important here. Mainly going off of the diagnostic plots here. Specifically because a lot of the outputs here rely on the unpublished 3D DCON python code
Notes for reviewers
What to look at
WallGeometry3Dnow takesplasma_surfand selects the shape with the sameif/elseifchain
WallGeometryuses in 2D: axisymmetric revolves the 2D contour, otherwise conformal,otherwise the same "shape not recognized" error the 2D reader gives. One sequential function,
no helper indirection.
r_wall = r_plasma − d·n̂_plasmawithd = a·r_minorandr_minor = ½(max R − min R)— the same definition the 2D shapes use, which is what makes thetwo routes comparable on an axisymmetric boundary.
a),near-fold (warn), gap under one grid cell (warn),
equal_arc_wallignored (warn). There isdeliberately no centre-stack clamp — clamping a 3D surface would leave a cusp and corrupt
the spline normals the near-field quadrature depends on, so it is rejected instead.
Verification
Wᵛvs wall distance, two gridsWᵛvs wall distance, against a gap-independent 2D referenceUnit tests 277 → 307.
docs/make.jlbuilds clean.Known limitation, now warned about
Accuracy is set by the plasma–wall gap measured in grid cells of the coarser direction
(toroidal, on every stellarator grid tested): at or above 1 cell the wall gap is no longer the
limiting error; between 0.3 and 1 cell the answer is one to two orders worse; below 0.3 cells it
is meaningless. The constructor warns below one cell and names the direction to refine. Note this
says when to stop blaming the wall, not that the answer is converged — what remains above one
cell is ordinary surface discretization and is geometry-dependent.
JMH - I am going to try to fix this in a future PR, but for now will just warn. This is not an inherently 3D issue. It also appears in 2D, but we can typically increase the resolution to be large enough that it isn't an issue.