Field line integral vs field line average in diagnostics
To construct phi2 from phi we form phi^2 = phi * conjg(phi), take the field line average of this and then sum over ky and kx.
This leads to different phi2
values for effectively the same phi
when compared between flux tube and ballooning space.
Consider the following flux tube phi
The field line average of the orange and green cells is much smaller than that corresponding to the blue cell. Say blue integrates to a
, orange and green may be a/100
so when summed over kx this would give ~a (1+2/100) ~ a
and an average of a / (2pi)
The ballooning space equivalent is
The total integral is still ~ a(1+2/100)~a
but the average is a/(3 * 2*pi)
. Therefore the ballooning space phi2 is about 3x smaller than the flux tube one. This seems surprising.
Comments (2)
-
reporter -
Of course field_line_average should give an identical answer if it represents the same physical concept in ballooning space and flux-tube. Clearly you have found that field_line_average is NOT doing the same thing in BS and FT!
In this example for flux-tube field_line_average:
- considers only a 2pi length of field line
- it sums over contributions from 3 modes (kx values) contributing to the same length of field line (these are theta0=[-2pi,0, 2pi]
BUT in ballooning space:
- it follows 6pi length of field line
- considers a SINGLE mode (theta0)
These are DIFFERENT.
The flux-tube solution is more physical because to get a physical solution from the ballooning space efunc you need to sum over the “p”s (ie theta0 values separated by 2pi). You can get the FT answer from the BS calculation by ADDING equal contributions in the range [-3pi < theta <3pi ] that SHOULD BE INCLUDED from the modes with theta0=-2pi and theta0=2pi.
Might be very important to keep fieldlineaverage operating differently in BS (as it is running right now), because this may be consistent with its use in BS calculations.
However, if we want a diagnostic giving physical average in theta from BS when we output amplitudes, we should respect the sum over the “p”s and multiply the answer by (2nperiod-1)
- Log in to comment
Perhaps the
field_line_average
at https://bitbucket.org/gyrokinetics/gs2/src/be546e5ec69b079bc82adf6d0e6b35eb78f4613d/src/diagnostics/volume_averages.f90#lines-281 should befield_line_integral
?