[FLASH-USERS] Magnetic field units?

Ji Suoqing jisuoqing at gmail.com
Thu Sep 27 21:46:58 EDT 2012


Hi Nathan,

As far as I'm concerned, the unit for unsplit staggered mesh solver is, in general:

B_cgs = B_code * sqrt(4 PI).

Now when we plot out some magnetic quantities wit YT, we are especially careful about the unit, because YT would give a field the cgs unit by default, no matter the data is in cgs or code unit. Say, for magnetic energy, it should be:

E_cgs = B_cgs^2 /(8 PI) = B_code^2 / 2

For FLASH, in most places (say, calculating the Alfven wave speed) the factor 4*PI is canceled if we use code units instead of cgs, so the code looks more concise.

> This conversion is only applicable to the magnetic field in the unsplit staggered mesh solver so therefore no such conversion needs to be applied for runs using the operator split solvers, correct?

Sorry, but I'm not familiar with split 8-wave solver.

Best wishes,
Suoqing

On Sep 27, 2012, at 9:25 PM, Nathan Goldbaum <goldbaum at ucolick.org> wrote:

> Hello,
> 
> I'm writing as both a yt developer as well as a user of the unsplit staggered mesh solver included in Flash4.  Right now I'm trying to figure out the appropriate way to handle unit conversions for the magnetic field.
> 
> It's been brought to my attention that the default parameter choices for the unsplit solver will cause FLASH to write the magnetic field to disk in 'natural' units (such that mu_0 = 1).  This is different from the value in CGS units modulo a factor of order unity.
> 
> I'd like to know what conversion factor yt should be using internally to convert the magnetic fields written to it reads from from plotfiles and checkpoint files to CGS units.  According to the user's guide, this is controlled by the UnitSystem runtime parameter, so there should be three different conversion factors corresponding to the three different choices of UnitSystem.
> 
> This conversion is only applicable to the magnetic field in the unsplit staggered mesh solver so therefore no such conversion needs to be applied for runs using the operator split solvers, correct?
> 
> I'd also like to say that I think it would be better if the unsplit solver could handle this conversion internally.  This way outputs would always be written in CGS units, as is standard for other FLASH fields, and simulations could be initialized with magnetic fields calculated in CGS units.
> 
> Thanks for your help with this,
> 
> Nathan Goldbaum
> Graduate Student
> Astronomy & Astrophysics, UCSC
> goldbaum at ucolick.org
> http://www.ucolick.org/~goldbaum
> 




More information about the flash-users mailing list