The mean magnetic field is calculated wrongly for non-periodic boundaries
Brought to you by:
tobson
Originally created by: tobias.h...@gmail.com
Originally owned by: AxelBran...@gmail.com
With e.g. 'a' boundary condition for Ay in the vertical direction, the mean
of Bx is apparently not conserved. However, this is only because the code
calculates the mean in the wrong way. It should actually be done with the
trapezium rule, giving weight 0.5 to the last physical grid point near the
upper and lower boundaries.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: AxelBran...@gmail.com
Currently, ethtot, ekintot, mcct are calculated using integrate_mn_name,
so this should then be correct. Search then using:
grep integrate_mn_name *.f90
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: anders.j...@gmail.com
We should make sure that it is clear from the diagnostic names whether we average
over grid points or integrate over volume. Suggestion:
- rhom : rho averaged over grid points
- rhoint : volume integrated mass
Owner: AxelBrandenburg
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: wdobler@gmail.com
As implied by Tobi, integrate_mn_name does currently not have the trapezoidal factors.
For the attached test, I get
----it--------t--------dt------------rhom--------------totmass-------
0 0.000 1.00E+37 1.000000000000000 1.492711370262390
when the total mass should in fact be 1.0 .
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: tobias.h...@gmail.com
Further to Anders' comment, I think the best solution would actually be to only have
one volume integration routine that always does the the right thing, because I cannot
think of a valid reason for _not_ using the trapezoidal rule in the case of non-
periodic boundaries.