Skip to main content

Package for generating initial conditions for AREPO

Project description

AREPO-icgen

Program for creating initial conditions for the AREPO code

The code works by calling generateICs(config, params), where config and params are dictionary objects that contain the settings to be used. The config options are needed for all runs, but some parameters are only needed for particular configurations. Parameters that are not needed for a particular setup can be omitted.

Config Options

######################

Initial grid setup

######################

boxGrid = Box of particles in an evenly spaced grid

boxRan = Box of randomly spaced particles

sphereRan = Sphere of randomly spaced particles

sphereGrid = Spherical volume cut of an evenly spaced grid of particles

"grid": grid type

####################

Turbulence setup

####################

turbFile = Turbulence from a 3D velocity cube file

static = No turbulent velocities

"turbulence": turbulence type

If using turbFile, need to include a turbulence file along with its grid size:

"turbFile": path/to/file

"turbSize": Size of the grid (64, 128, etc)

##################

Rotation Setup

##################

rotation = Add rotation to the body

static = No body rotation

"rotation": rotation type

#######################

Low Density Padding

#######################

True = Pad the box outisde the cloud with low density particles

False = ... don't

"padding": True/False

###############

File Output

###############

arepo = Output a type 2 arepo datafile (broken)

hdf5 = Output a hdf5 (type 3) datafile

"output": file type

masses = Output masses

density = Output denisty as masses

"outVal": output quantity

True = Output a zero magnetic field for all particles [TESTING]

False = Don't use magnetic field

"bField": magnetic field

filename = Name you want the file to be called (no need for extension)

"filename": filename

Parameter Options

#######################

Physical Dimensions

#######################

Number of particles [no units]

"ngas": number of particles

Min x, max x, min y, max y, min z, max z [pc]

"bounds": [xmin, xmax, ymin, ymax, zmin, zmax]

Spherical cloud radius [pc]

Only needed for spherical setups.

"radii": cloud radius

Total mass of the cloud [Msun]

"mass": cloud mass

###################

Thermal Physics

###################

Temperature of the cloud [K]

"temp": cloud temperature

Mean molecular weight of the cloud [no units]

"mu": mu

Virial parameter, ratio of KE to GPE [no units]

Only needed for clouds with turbulence.

"virialParam": ratio

####################

Rotation Physics

####################

Beta parameter, ratio of rotational KE to GPE [no units]

Only needed for clouds with rotation.

"beta": beta value

####################

Box Padding Info

####################

The x, y and z size of the box around the cloud, multiples of the cloud size [no units]

Only needed when padding the box with low density particles.

"boxDims": [x, y, z]

How much hotter these particles should be compared to the cloud [no units]

"tempFactor": amount

###################

Desired Density

###################

The desired number density of the cloud [cm^-3]

Has to be consistent with the mass we've given above

Only needed if outputting density as mass.

"density": rho

Example

An example config and parameter setup might look like below, for a uniform sphere of gas with rotation only:

config = {
    "grid": "sphereGrid",
    "turbulence": "static",
    "rotation": "rotation",
    "padding": True,
    "output": "hdf5",
    "outValue": "masses",
    "bField": False,
    "filename": "uniformSphere"
}

params = {
    "ngas": 200000,
    "bounds": [0, 0.4, 0, 0.4, 0, 0.4],
    "radii": 0.08,
    "mass": 5,
    "temp": 15,
    "mu": 1.4,
    "beta": 3,
    "boxDims": [5, 5, 5],
    "tempFactor": 2
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arepoicgen-0.1.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

arepoICgen-0.1.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file arepoicgen-0.1.0.tar.gz.

File metadata

  • Download URL: arepoicgen-0.1.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for arepoicgen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6b5b4751a7b08c56db58f23888d6fcf8120b0f4f833de1c308df11195bd9b5b
MD5 6f0385726533c4533e3dbf8fae26858e
BLAKE2b-256 74ce212a834926676de1bcf954c2954017987996cc5ac6ea92139953dabee0c8

See more details on using hashes here.

File details

Details for the file arepoICgen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: arepoICgen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for arepoICgen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0233dcf19f3c74816179e8acc0cd01d9f7ce0535785423b020c3683dd5869cff
MD5 dd5c45c8237a63ab901b2cc46139065c
BLAKE2b-256 1a1979bf4ca77031a1dd8a8523dfdd6edb21082911baeca5c4bf92958b6f68de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page