-
Notifications
You must be signed in to change notification settings - Fork 26
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
FourierRZToroidalSurface
tangent vectors are always 0 or NaN
#1532
Comments
FourierRZToroidalSurface
tangent vectors are always 0 or NaN
IIRC, I think that I don't love how it currently is implemented though as it can lead to confusion like here. |
If you want the surface tangent vector, that should be things like |
The description for the variable In this case I do want the tangent vector that points only in the I think we need to either fix how this is being computed, or change the description if it is supposed to be something else, or not have these quantities implemented for the |
The cause of this issue is #1127 . Generally it is not possible to compute gradient vectors from data sampled over a surface because there is no information on the variation of the function in the direction normal to the surface. The direction of the gradient vectors need not have the same restriction. Unit normals to the surface are known and so are gradients whose direction does not vary with the coordinate that specifies the surface. The gradients of general curvilinear coordinates are not.
Yes I agree |
|
The compute quantity$e^\zeta = \nabla\zeta$ . In the code, it is computed as $(e_\rho \times e_\theta) / |e_\rho \times e_\theta|$ . But since $e_\rho = 0$ is hard-coded for the $(e_\zeta \times e_\rho) / |e_\zeta \times e_\rho|$ .
n_zeta
is supposed to be in the direction ofFourierRZToroidalSurface
, this always evaluates ton_zeta = 0
orNaN
. The same issue exists for the quantityn_theta
, which we compute asFor the case of
n_zeta
, I believe the correct implementation should be:Assuming$\zeta = \phi$ , this is by definition the unit vector in the direction of $\nabla\zeta$ , and this implementation would work for all classes.
The case of
n_theta
is not as simple, but if the directors were orthogonal we could do something like:The text was updated successfully, but these errors were encountered: