Menu ▾ ▴

#2 The mean magnetic field is calculated wrongly for non-periodic boundaries

Assigned
nobody
None
Medium
Enhancement
2009-08-27
2008-09-29
Anonymous
No

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.

Discussion

  • Anonymous

    Anonymous - 2009-06-07

    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

     
  • Anonymous

    Anonymous - 2009-08-26

    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

     
  • Anonymous

    Anonymous - 2009-08-27

    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 .

     
  • Anonymous

    Anonymous - 2009-08-27

    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.

     

Log in to post a comment.