Skip to content

Conversation

@johnomotani
Copy link
Collaborator

Adds an option single_region that can be passed the name of a mesh region to build the grid only for that region. Currently only supports divertor leg regions.

Would be nice to extend this to allow doing a whole SOL. PFR, or core region - that would require picking out a subset of the radial blocks, and including more than one 'region'. The option might also need renaming in that case...

Things to be aware of:

  • Does not support non-zero y_boundary_guards, as these cannot be consistently created at/past an X-point. For test cases, it is probably OK to let BOUT++ extrapolate into the boundary cells, so hopefully this is not a big problem. A better solution might be to add some special handling for the X-point end when building a single_region grid, but that might well get a bit messy...
  • If you start from an input file that works for building a full grid for a certain equilibrium, it may well crash if you just add e.g. single_region = "outer_lower_divertor". The reason is that the grid spacing settings are normalised to the total ny on the grid (the idea was to allow consistent grids to be produced when scaling up ny with otherwise the same settings). The grid for a divertor leg has a much smaller ny than the full grid, so either all the spacing parameters need to be increased by a factor ny(full grid) / ny(divertor leg grid), or it may be more convenient to set the N_norm_prefactor setting to that factor (which has the same effect).

Adding a few comments to the code would be good, e.g. that the "fake" value added in a few places here is a hack just to support single_region.

  • Tests added
  • Udated manual
  • Updated doc/whats-new.md with a summary of the changes

@johnomotani johnomotani added the enhancement New feature or request label Nov 7, 2024
It makes most sense to set ixseps1 and ixseps2 so that the divertor-leg
grid is treated as a SOL-only grid, where neither y-boundary connects to
anything.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant