fmihpc / vlasiator

Vlasiator - ten letters you can count on
https://www.helsinki.fi/en/researchgroups/vlasiator
Other
45 stars 37 forks source link

Implement line-dipole #20

Closed galfthan closed 10 years ago

galfthan commented 10 years ago

When taking a 2D slice of a dipole in the polar plane, the field is not divergence free. In the ecliptic plane this is not a problem. We should implement the line dipole that is (at least) published in:

L.K.S. Daldorff et al., Two-way coupling of a global Hall magnetohydrodynamics model with a local implicit Particle-in-Cell model, Journal of Computational Physics (2014), http://dx.doi.org/10.1016/j.jcp.2014.03.009

line-dipole

Notice that in our simulations this is the xz plane, and not the xy plane.

One can implement it as a class called LineDipole, and implement it in a similar fashion as the 3D dipole: https://github.com/fmihpc/vlasiator/blob/master/backgroundfield/dipole.cpp.

In https://github.com/fmihpc/vlasiator/blob/master/projects/Magnetosphere/Magnetosphere.cpp the user also needs to be able to set a linedipole.

galfthan commented 10 years ago

By the way, this equation is in reduced units. To get the units we use in Vlasiator, one should multiply D by RE^2, so it would then be 126.2e6 T m^2. In this value the mu_0 / 4 * PI is already included. This way of interpreting also seems to be consistent with the statement that the strength is 1/10th of 3D dipole. (D * RE^3 = 8.0e14 T m^3 which is 1/10th of what we have used in Vlasiators 3D dipole)

galfthan commented 10 years ago

What is the status?

ykempf commented 10 years ago

It compiles! But it does not link...

On 04/01/2014 11:56 AM, Sebastian von Alfthan wrote:

What is the status?

— Reply to this email directly or view it on GitHub https://github.com/fmihpc/vlasiator/issues/20#issuecomment-39183602.

ykempf commented 10 years ago

Now it compiles and links properly. VLASIATOR_ARCH=meteo did not help...

ykempf commented 10 years ago

Hi all, don't forget to check against face averages and not against point values... That was my piece of wisdom for Friday night, more checking with that in mind next week from me.

galfthan commented 10 years ago

Done and merged. Thanks!