Tearing - Tell a limited plasma from a padded g-file before placing surfaces past the boundary

Open
#529 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
backend

Research direction

Start with the g-file reader, which currently drops the limiter contour, and with the overlap scan that places surfaces past ψ_N = 1 when separatrix_q_law fires on a limited plasma. First keep the limiter contour when it is present, then have the scan check whether the boundary touches the limiter and skip any surface past ψ_N = 1 in that case, with a message saying so. Done when a limited EFIT-style test file with a nearby X-point produces no phantom surface and no overlap warning.

Written by the indexing model from the issue text.

Description

separatrix_q_law builds a law whenever a poloidal-field minimum on the outermost surface leads to a saddle and the law reproduces the traced shear. A limited plasma with an X-point nearby passes both: one EFIT reconstruction checked gives an X-point at ψ_N = 1.093 and a shear ratio of 0.86. The overlap scan then treats it like a padded diverted file. It places one rational past ψ_N = 1, where no closed surface exists, and warns that no overlap could be established.

Today the domain is unchanged, so this is only a spurious warning. But if the kinetic profiles extend past ψ_N = 1 (p-files often reach about 1.12), that phantom surface would be scored and could move the cut one rational inward.

The size of the gap cannot distinguish the two cases, since a plasma close to diverting can have an X-point just outside ψ_N = 1. The reliable discriminator is the g-file's limiter contour, which GPEC's reader does not keep: a boundary touching the limiter is limited, and no surface past it should be placed.

Done when:

  • The reader keeps the limiter contour, where present.
  • The scan places no surface past ψ_N = 1 when the boundary touches the limiter, and says so.
  • A test with a limited EFIT-style file that has an X-point nearby.

🤖 Generated with Claude Code

Dominant language
Julia
Stars
11
Forks
7
Avg merge
4d 3h
Merged PRs (30d)
70

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenFUSIONToolkit/GPEC

All issues in OpenFUSIONToolkit/GPEC

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.