Question about particle_type dataset

3 views
Skip to first unread message

Nathan Lai

unread,
Aug 27, 2024, 8:20:32 PM8/27/24
to enzo-dev
Hello all, 
I was looking through the doc but couldn't find the relevant info so figured I'd ask here. In the HDF5 output, there is a dataset that is called particle_type which (for my sim) was all 1s and 2s, does anyone know which particle type correlates with each value? I was thinking that 2 was StarParticle but just wanted to double check. (I also assume that the unit is solar masses)

Thanks!

Brian O'Shea

unread,
Aug 30, 2024, 8:57:52 AM8/30/24
to enzo...@googlegroups.com
Hi Nathan,

particle_type 1 is dark matter and particle_type 2 is star particles.  For reference, if you look in src/enzo/macros_and_parameters.h and search for 'PARTICLE_TYPE' you'll see what numbers all of them correspond to.

In Enzo's internal unit system particles "masses" are really densities - see https://enzo.readthedocs.io/en/latest/reference/EnzoParticleMass.html for a more detailed explanation of this.  The explanation for this is that it's more convenient for grid deposition for gravity solves; it is admittedly confusing.  If you're looking at raw simulation data you'll have to convert it to a mass by multiplying by cell volume (that grid's cell size cubed) and then converting from internal units to CGS or whatever other unit system you desire.  Look at https://enzo.readthedocs.io/en/latest/reference/EnzoInternalUnits.html#enzointernalunits for more information about the unit system.  If you are using yt, however, it should do all of this for you, and give you a list of particles with masses in whatever units you ask of it.  You can also filter out just the star particles in yt - see https://yt-project.org/docs/dev/analyzing/filtering.html#filtering-particle-fields for an example.

I hope this helps!

--Brian


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/enzo-dev/10986508-b5ff-4c07-8d9c-512677455f4fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages