-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect computations with stellarator symmetry #1101
Comments
I read Recall stellarator symmetry is a property of a curvilinear coordinate system, Now, assuming stellarator symmetry gives the first relation If we are computing some function In general, given
then
If
For example, on the surface given at the top of this issue, TODO:
Footnotes
|
I won't get around to doing the other checkboxes, at least for foreseeable future. |
Some of the master compute data changes with this commit. The changes which are not due to floating point differences or simply grid resolution differences (recall the grid used in test_compute_everything has L = 9, M=N=5 which is less than required for convergence to true integral quantities on that equilbrium) are given below: Not equal to tolerance rtol=1e-10, atol=1e-10 Parameterization: desc.equilibrium.equilibrium.Equilibrium. Name: A(z). Mismatched elements: 660 / 660 (100%) Max absolute difference: 0.6494644 Max relative difference: 0.81816076 x: array([0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591, 0.792591,... y: array([0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978, 0.762978,... Not equal to tolerance rtol=1e-10, atol=1e-10 Parameterization: desc.equilibrium.equilibrium.Equilibrium. Name: a_major/a_minor. Mismatched elements: 660 / 660 (100%) Max absolute difference: 11.33931768 Max relative difference: 4.99527722 x: array([ 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152, 3.864152,... y: array([4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173, 4.057173,... NOTE that both quanties are incorrect, because in general we cannot compute these quantities accuratly on grids that do not sample the full poloidal domain.
I agree with you but the general definition of stellarator symmetry should also include an anti-symmetry relations. For example, a stellarator symmetric equilibrium satisfies R(theta, zeta)= R(-theta, -zeta) AND Z(theta, zeta) = -Z(-theta, -zeta). In general a geometric quantity is function of R, Z and their derivatives. |
Mark as requires |
This PR moves the integration utilities to their own subfolder so that they are visible to users. We have decided not to include in public API, because that's for optimization stuff. - [x] Increase visibility of integration utilities. - [x] Resolve #723 by adding link to tutorial in docstring of `surface_integrals.py`. - [x] Update `grid.py` developer guide. - Cherry picked from #353 with the new section from #1101 that emphasizes poloidal midplane symmetry is not stellarator symmetry. Removed section on custom grids.
We have an inconsistent use of stellarator symmetry (the discrete one) that leads to computing quantities incorrectly.
Here is a toroid surface with an elliptic cross section and torsion.
DESC determines this is stellarator symmetric, and will also, by default, label equilibrium with such a boundary as a symmetric equilibrium. We use the same characteristic to construct computational grids for stellarator symmetry that truncate the poloidal domain from$\theta \in [0, 2 \pi]$ to $\theta \in [0, \pi]$ . By doing so, we are assuming that, under stellarator symmetry, the following relation holds $\int_0^{2\pi} f(\theta) d \theta = 2 \int_0^{\pi} f(\theta) d \theta$ , which is not true because f is not symmetric.
For example, this quantity is not computed correctly on symmetric objects such as the surface above when integrated along a boundary, so the
Elongation
andAspect ratio
objectives that target toroid surfaces introduced in #884 have never been correct onmaster
for symmetric surfaces (the equilibrium ones are fine edit: fine for this surface).One may expect that the same issue exists in the volume computation, and hence the magnetic well, but those also integrate over zeta, and even though their integrands, assuming symmetry, do not satisfy$\int_0^{2\pi} f(\theta) d \theta = 2 \int_0^{\pi} f(\theta) d \theta$ , I think they do satisfy $\int_0^{2\pi} \int_0^{2\pi} f(\theta) d \theta d\zeta = 2 \int_0^{2\pi} \int_0^{\pi} f(\theta) d \theta d\zeta$ (one can show analytically they do for above surface), which is why all the other tests for correctness of this work. Still we should review code and review the symmetry condition.
(fyi these results were confirmed/tested with analytic tests using
sympy
).The text was updated successfully, but these errors were encountered: