calculate magnetic field intensity for a given baryon overdensity at a given redshift
Qin Han
16 Mar '22
Hello,
I am trying to get the magnetic field intensity versus baryon overdensity at a certain redshift. The information I need is the same as in the Fig 3 of this paper Marinacci et al. (2018) (https://arxiv.org/abs/1707.03396); the only difference is that I need it for a redshift range of 0-3.0.
Using the names in 'PartType0 (gas)', I think that I need to calculate it using 'MagneticField' of the 'Full Snaps', but I don't know how to do it exactly. For example, for 'TNG300-1', z=0, how do I find the 'MagneticField' information and what would the expression for magnetic field intensity look like?
Many thanks,
Qin
Dylan Nelson
17 Mar '22
Hi Qin,
Magnetic field is a 3-vector field (like Velocities). Assuming you had a very large amount of memory, you could simply load it like this:
b = il.snapshot.loadSubset(path,snap,'gas','MagneticField')
bmag = np.sqrt(b[:,0]**2 + b[:,1]**2 + b[:,2]**2)
note the units are not yet Gauss, you would be careful to convert the units.
Hello,
I am trying to get the magnetic field intensity versus baryon overdensity at a certain redshift. The information I need is the same as in the Fig 3 of this paper Marinacci et al. (2018) (https://arxiv.org/abs/1707.03396); the only difference is that I need it for a redshift range of 0-3.0.
Using the names in 'PartType0 (gas)', I think that I need to calculate it using 'MagneticField' of the 'Full Snaps', but I don't know how to do it exactly. For example, for 'TNG300-1', z=0, how do I find the 'MagneticField' information and what would the expression for magnetic field intensity look like?
Many thanks,
Qin
Hi Qin,
Magnetic field is a 3-vector field (like Velocities). Assuming you had a very large amount of memory, you could simply load it like this:
note the units are not yet Gauss, you would be careful to convert the units.