PlasmaControl / DESC

Stellarator Equilibrium and Optimization Suite
MIT License
77 stars 15 forks source link

A(z) computed wrong on grids without lcfs #1083

Open unalmis opened 6 days ago

unalmis commented 6 days ago

Take the surface in test_compute_everything and add rho=0.8 to the constructor. FourierRZToroidalSurface(**elliptic_cross_section_with_torsion, rho=0.8). Then the grid only has rho =0.8 nodes and A(z) is computed as zero. I think the fix is to compute this like we do perimeter(z); fix_surface to the rho value of the surface and then divide by that rho value to get an approximation, but I'll take a closer look tomorrow.

_Originally posted by @unalmis in https://github.com/PlasmaControl/DESC/pull/1024#discussion_r1656635137_

f0uriest commented 5 days ago

Or maybe just use the max value of rho in the grid as the fix surface?