Skip to content

Conversation

@Plasdom
Copy link
Collaborator

@Plasdom Plasdom commented Aug 5, 2025

Description of changes

For snowflake configurations where the two X-points are nearby in flux coordinates, often the patch map generated by INGRID results in very small patches in some parts of the domain. This produces non-smooth grids which are hard to simulate in UEDGE. For example:

image

This can be fixed in part by specifying angles for the north/south directions out of each X-point in exactly the same way as for the east/west directions. This PR adds north/south tilt options for X-point 1 & 2 for all possible snowflake topologies (SF15, SF45, SF75, SF105, SF135, SF165). There are new input options:

grid_settings:
    patch_generation:
        xpt1_N_tilt: 1.8   # Angle of the 'north' direction out of X-point 1 (rads) 
        xpt1_S_tilt: -1.8  # Angle of the 'south' direction out of X-point 1 (rads)
        xpt2_N_tilt: 1.8   # Angle of the 'north' direction out of X-point 2 (rads)
        xpt2_S_tilt: -1.8  # Angle of the 'south' direction out of X-point 2 (rads)
        use_xpt1_N: true   # Whether to use X-point 1 'north' tilt angle
        use_xpt1_S: true   # Whether to use X-point 1 'south' tilt angle
        use_xpt2_N: true   # Whether to use X-point 2 'north' tilt angle
        use_xpt2_S: true   # Whether to use X-point 2 'south' tilt angle

In the above example, modifying the above settings appropriately increases the size of the 'F1' patch, producing a smoother grid:

image

I've added a new file to the example_files directory which demonstrates this functionality (example_files/SF45/SF45_mastu.yml).

How was this tested?

Locally, on example INGRID parameter files for all possible snowflake configurations.

Relevant issues

None.

Checklist

- [ ] I have added/updated tests relevant to this PR.
- [ ] I have updated any baselines required for the test suite.

  • I have run the test suite locally to ensure my changes work as intended.

@bryan-garcia bryan-garcia self-requested a review August 12, 2025 16:20
Copy link
Collaborator

@bryan-garcia bryan-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Plasdom Plasdom merged commit 9175f53 into master Aug 26, 2025
1 of 6 checks passed
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.

3 participants