ramses to gadget format

5 views
Skip to first unread message

Nick Samaras

unread,
Apr 9, 2025, 7:42:04 AMApr 9
to ramses_users
Hi RAMSES users,

I want to convert a RAMSES output to gadget format like particle positions,  particle velocities), mass, internal energy for temperature), density of SPH particles and SPH smoothing length.

Is RAMSES able to provide info on the internal energy for temp and  the smoothing length? If so, can I activate any of the parameters on the namelist? if not, is there any way to calculate them?

I have found a converter in the Amiga Halo Finder which does this job, but not entirely, since the smoothing length is missing...any ideas?

Cheers,
Nick

Arturo Nuñez-Castiñeyra

unread,
Apr 10, 2025, 1:33:53 AMApr 10
to ramses_users
Hola Nick,

For reading and saving data in some different formats you could you this UNSIO library (in python, fortran or C/C++) 
https://projets.lam.fr/projects/unsio/wiki/UserGuide 
 it reads simulations files from Ramses, NEMO and Gadget 1,2,3. And can write in Nemo, Gadget 2 and 3.  here are some examples https://projets.lam.fr/projects/unsio/wiki/PythonReadDataNew it runs super well on python.

Regarding your smoothing length you could use the size of the cell where your particles are located I guess should be a similar information, Ramses is and AMR code so there is no smoothing length strictly speaking. For the temperature,  if you are running hydro (or MHD) you should have the pressure of the gas in each cell, similar for the density. 

Hope it helped,
Arturo 
Reply all
Reply to author
Forward
0 new messages