Skip to content

Conversation

@Plasdom
Copy link
Collaborator

@Plasdom Plasdom commented Jan 8, 2026

Bugs have been found in setting the core boundary conditions for the snowflake geometries SF105, SF135 and SF165. This PR fixes those bugs, and all snowflake geometries have been validated.

Bug description

Several variables control the cells over which the core boundary condition is applied: isixcore (set in bbb/geometry.m), and the initial and final poloidal cells for the core BC loop (set in bbb/boundary.m).

For SF105, SF135 and SF165 geometries, these variables were being set incorrectly. For example, in this SF135 case, the cells where com.isixcore == 1 were the black cells below:
image

This meant the core BCs were being applied on a few cells on the inner wall boundary instead of the core.

Fix

Straightforward changes to the definitions of each of these variables, which depend on the geometry being simulated.

Validation

Case files used in validation are here: https://github.com/Plasdom/uedge_snowflake_benchmarking

We assume the snowflake geometries SF15, SF45 and SF75 are being handled correctly. In this case, we can generate pairs of artificial equilibria for the corresponding SF>90 geometry and compare simulation results. To illustrate: the SF165 is topologically the same as the SF15 mirrored in the R-axis, and so on, and therefore the UEDGE solution should be the same in both cases after the mirroring is accounted for. To minimise the effects of toroidal geometry we increase the major radius to 10^4m.

After the fix is applied, we get good agreement between SF<90 and SF>90 cases. Here are the electron densities for converged UEDGE simulations, where the settings are the same in each toplogical pair. These simulations use a heat flux core BC, and we solve for te, ti, ni, ng, up, and phi.
image

image image

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