Initial condition generator for astrophysical simulations
]add AstroIC
or
using Pkg; Pkg.add("AstroIC")
or
using Pkg; Pkg.add("https://github.com/JuliaAstroSim/AstroIC.jl")
To test the Package:
]test AstroIC
- Dev — documentation of the in-development version.
For beginners, it is highly recommended to read the documentation of PhysicalParticles.jl.
using AstroIC
using PhysicalParticles, UnitfulAstro
## First define a config. Keywords are necessary since the config type is immutable
config = PlummerStarCluster(
collection = STAR,
NumSamples = 100,
VirialRadius = 0.010u"kpc",
TotalMass = 1.0e5u"Msun",
model = AstroIC.Newton(),
)
## Now generate particles. MaxRadius restricts the sampling region.
particles = generate(config, MaxRadius = 0.1u"kpc")
# Default units is uAstro, to use SI units:
particles = generate(config, uSI)
using AstroIC
using PhysicalParticles, UnitfulAstro
config = GasCloud(
collection = GAS,
Radius = 20u"kpc",
rho0 = 1250u"Msun/kpc^3",
T = 300u"K",
ParticleMass = Constant().m_p,
Nx = 11,
Ny = 11,
Nz = 11,
)
particles = generate(config)
using Dates
using AstroIC
particles = solarsystem(now()) # SI units
- Basic data structure: PhysicalParticles.jl
- File I/O: AstroIO.jl
- Initial Condition: AstroIC.jl
- Parallelism: ParallelOperations.jl
- Trees: PhysicalTrees.jl
- Meshes: PhysicalMeshes.jl
- Plotting: AstroPlot.jl
- Simulation: ISLENT