Skip to content

Polytropic distribution of gas as initial conditions for Gadget

License

Notifications You must be signed in to change notification settings

fgoicovic/gadget-polytrope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gadget-polytrope

Generates a spherical particle distribution with a polytropic profile. It is oriented for producing initial conditions for GADGET, although it is possible to obtain the positions in ASCII format as well.

The code first solves the Lane-Emden equations with a given index and then it radially stretches a close-packed sphere of particles to match the corresponding polytropic density profile. Based on the final radial position, the code also assigns an internal energy to each particle to reproduce the polytropic temperature profile.

This script is under development, thus comments and contributions are very much welcome.

Author

Felipe G. Goicovic

Usage

The basic usage is

./polyt-ics -g GAMMA -n NUM

where GAMMA is the polytropic index and NUM is the number of particles desired. This will produce a binary file called 'Polytrope.dat' that works as initial conditions for GADGET (format 1).

For a complete description of parameters use

./polyt-ics -h

Licence

MIT Licence

About

Polytropic distribution of gas as initial conditions for Gadget

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages