Active Particle units in cosmology simulations

4 views
Skip to first unread message

Zephyr Penoyre

unread,
Apr 25, 2016, 3:06:38 PM4/25/16
to enzo-dev
Really simple question but are the units in which Active Particle properties are expressed physical or comoving?
   Let's say we have a physical velocity in m/s, is the conversion as simple as AP->vel=Velocity*GlobalTimeUnits/GlobalLengthUnits?

Britton Smith

unread,
May 9, 2016, 4:16:28 AM5/9/16
to enzo...@googlegroups.com
Hi Zephyr,

In general, if you are running a cosmological simulation, quantities are in the comoving frame and in code units.  If you have a quantity, say density, and the value of DensityUnits calculated by the GetUnits function, the following should always be true:
density [code units, comoving frame] * DensityUnits = density [CGS units, proper frame]

One must be careful with velocity units in a cosmological simulation as there is a factor of a (expansion factor) in there.  If you have a look at CosmologyGetUnits, you can see how velocity units is defined:
VelocityUnits = aUnits * (LenghtUnits / a) / TimeUnits

In general, the best thing to do is to call the function GetUnits, of which there are examples throughout the code, and to use the values calculated there.

Britton

On Mon, Apr 25, 2016 at 8:06 PM, Zephyr Penoyre <zephyr...@gmail.com> wrote:
Really simple question but are the units in which Active Particle properties are expressed physical or comoving?
   Let's say we have a physical velocity in m/s, is the conversion as simple as AP->vel=Velocity*GlobalTimeUnits/GlobalLengthUnits?

--
You received this message because you are subscribed to the Google Groups "enzo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enzo-dev+u...@googlegroups.com.
To post to this group, send email to enzo...@googlegroups.com.
Visit this group at https://groups.google.com/group/enzo-dev.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages