Open dpanici opened 3 months ago
This might be due to precision issues when the modenumbers are too large. This eq has N=30
and was a fit to an NAE equilibrium. if I plot the coefficients of eq.get_axis()
versus N
, I find that the 2nd largest coefficients is at N=30
, and I get the same thing if I change the eq resolution to N=29
If I set N=28
then I don't get the spurious large modenumber amplitude
get_axis()
does not do any fit, just sums up the FourierZernikeBasis
coefficients at rho=0
, so the issue here is likely that the initial equilibrium fit of the NAE
surfaces had these coefficients being large at these large modenumbers
shouldn't this have thrown an error when checking consistency of the linear constraints?
For a normal fixed-boundary solve the constraints
AxisRSelfConsistency
andAxisZSelfConsistency
are simply meant to tie the extra attributes of the eqRa_n
andZa_n
to be equal to the R,Z FourierZernike basis evaluates atrho=0
.However, I have found at least one case where the application of the constraints causes the equilibrium to go un-nested. The problem seems to be solved if I set the equilibrium axis to be where the actual axis is according to the R,Z evaluated at
rho=0
witheq.axis=eq.get_axis()
, as then after the linear constraint application the eq stays nested.eq boundary,
eq.axis
location (given fromNAE
asaxis from NAE
), andeq.compute(["R","Z"])
atrho=0
plotted for the initial equilibrium, you can see the axis is outside the boundaryAfter applying the linear constraints (I just did
eq.solve(maxiter=0)
), the equilibrium is unnested as the particular solution seems to pull theR_lmn
andZ_lmn
to match theRa_n
andZa_n
(instead of the opposite)For a simpler case I do not see this behavior, so it could be that this is only an for more complicated cases, but wanted to make the issue to document and think if there is something deeper going on