Types
PhysicalParticles.uAstroPhysicalParticles.uCGSPhysicalParticles.uDefaultsPhysicalParticles.uSIPhysicalParticles.AbstractDataDimensionPhysicalParticles.AbstractPointPhysicalParticles.BallPhysicalParticles.Ball2DPhysicalParticles.CollectionPhysicalParticles.ConstantPhysicalParticles.ExtentPhysicalParticles.Extent2DPhysicalParticles.MasslessPhysicalParticles.Massless2DPhysicalParticles.PVectorPhysicalParticles.PVector2DPhysicalParticles.StarPhysicalParticles.Star2D
PhysicalParticles.AbstractPoint — TypeAbstractPoint
Top level mathematical vector type defined in PhysicalParticles.jl It is named to distinguish from the built-in type AbstractVector
PhysicalParticles.PVector — Typestruct PVector{T<:Number} <: AbstractPoint3D{T}Fields
- x::T
- y::T
- z::T
Examples
julia> PVector()
PVector{Float64}(0.0, 0.0, 0.0)
julia> PVector(u"m")
PVector(0.0 m, 0.0 m, 0.0 m)
julia> PVector() * im
PVector{ComplexF64}(0.0 + 0.0im, 0.0 + 0.0im, 0.0 + 0.0im)PhysicalParticles.PVector2D — Typestruct PVector2D{T<:Number} <: AbstractPoint2D{T}Fields
- x::T
- y::T
Examples
julia> PVector2D()
PVector2D{Float64}(0.0, 0.0)
julia> PVector2D(u"m")
PVector2D(0.0 m, 0.0 m)
julia> PVector(1.0im, 2.0 + 3.0im)
PVector2D{ComplexF64}(0.0 + 1.0im, 2.0 + 3.0im)PhysicalParticles.uAstro — ConstantDefault Astro units: kpc,Gyr,A,K,cd,Msun,mol
PhysicalParticles.uSI — ConstantDefault SI units: m,s,A,K,cd,kg,mol
PhysicalParticles.uCGS — ConstantDefault CGS units: cm,s,A,K,cd,g,mol
PhysicalParticles.uDefaults — ConstantDefault units: m,s,A,K,cd,kg,mol
PhysicalParticles.Massless — Typestruct Massless{P, V, I<:Integer} <: AbstractParticle3DPos::PVector{P} where PVel::PVector{V} where VID::Integer
3D particle type without mass.
Examples
julia> Massless()
Massless 0: Pos = PVector{Float64}(0.0, 0.0, 0.0), Vel = PVector{Float64}(0.0, 0.0, 0.0)
julia> Massless(uAstro)
Massless 0: Pos = PVector(0.0 kpc, 0.0 kpc, 0.0 kpc), Vel = PVector(0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1)
julia> Massless(uSI, id = 1)
Massless 1: Pos = PVector(0.0 m, 0.0 m, 0.0 m), Vel = PVector(0.0 m s^-1, 0.0 m s^-1, 0.0 m s^-1)PhysicalParticles.Massless2D — Typestruct Massless2D{P, V, I<:Integer} <: AbstractParticle2DPos::PVector2D{P} where PVel::PVector2D{V} where VID::Integer
2D particle type without mass.
Examples
julia> Massless2D()
Massless 0: Pos = PVector2D{Float64}(0.0, 0.0), Vel = PVector2D{Float64}(0.0, 0.0)
julia> Massless2D(uAstro)
Massless 0: Pos = PVector2D(0.0 kpc, 0.0 kpc), Vel = PVector2D(0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1)
julia> Massless2D(uSI, id = 1)
Massless 1: Pos = PVector2D(0.0 m, 0.0 m), Vel = PVector2D(0.0 m s^-1, 0.0 m s^-1)PhysicalParticles.Ball — Typestruct Ball{P, V, A, M, I<:Integer} <: AbstractParticle3DPos::PVector{P} where PVel::PVector{V} where VAcc::PVector{A} where AMass::AnyID::Integer
Basic 3D particle type.
Examples
julia> Ball()
Ball 0: Pos = PVector{Float64}(0.0, 0.0, 0.0), Vel = PVector{Float64}(0.0, 0.0, 0.0), Acc = PVector{Float64}(0.0, 0.0, 0.0), Mass = 0.0
julia> Ball(uAstro)
Ball 0: Pos = PVector(0.0 kpc, 0.0 kpc, 0.0 kpc), Vel = PVector(0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1), Acc = PVector(0.0 kpc Gyr^-2, 0.0 kpc Gyr^-2, 0.0 kpc Gyr^-2), Mass = 0.0 M⊙
julia> Ball(uSI, id = 1)
Ball 1: Pos = PVector(0.0 m, 0.0 m, 0.0 m), Vel = PVector(0.0 m s^-1, 0.0 m s^-1, 0.0 m s^-1), Acc = PVector(0.0 m s^-2, 0.0 m s^-2, 0.0 m s^-2), Mass = 0.0 kgPhysicalParticles.Ball2D — Typestruct Ball2D{P, V, A, M, I<:Integer} <: AbstractParticle2DPos::PVector2D{P} where PVel::PVector2D{V} where VAcc::PVector2D{A} where AMass::AnyID::Integer
Basic 2D particle type.
Examples
julia> Ball2D()
Ball 0: Pos = PVector2D{Float64}(0.0, 0.0), Vel = PVector2D{Float64}(0.0, 0.0), Acc = PVector2D{Float64}(0.0, 0.0), Mass = 0.0
julia> Ball2D(uAstro)
Ball 0: Pos = PVector2D(0.0 kpc, 0.0 kpc), Vel = PVector2D(0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1), Acc = PVector2D(0.0 kpc Gyr^-2, 0.0 kpc Gyr^-2), Mass = 0.0 M⊙
julia> Ball2D(uSI, id = 1)
Ball 1: Pos = PVector2D(0.0 m, 0.0 m), Vel = PVector2D(0.0 m s^-1, 0.0 m s^-1), Acc = PVector2D(0.0 m s^-2, 0.0 m s^-2), Mass = 0.0 kgPhysicalParticles.Star — Typestruct Star{P, V, A, M, E, I<:Integer} <: AbstractParticle3DPos::PVector{P} where PVel::PVector{V} where VAcc::PVector{A} where AMass::AnyID::IntegerCollection::CollectionTi_endstep::Integer: Next integer step on the timeline.Ti_begstep::Integer: Present integer step on the timeline.GravCost::Integer: For each two-particle interaction, GravCost += 1Potential::Any: Particle potential in the force fieldOldAcc::Any: Save the normalization of acceleration of last step. Useful in Tree n-body method.
3D Particle type designed for AstroSim.jl.
Collection is an Enum defined in the same way with Gadget2, but start from 1.
Examples
julia> Star()
Star 0 GAS: Pos = PVector{Float64}(0.0, 0.0, 0.0), Vel = PVector{Float64}(0.0, 0.0, 0.0), Acc = PVector{Float64}(0.0, 0.0, 0.0), Mass = 0.0, Ti_endstep = 0, Ti_begstep = 0, Potential = 0.0, OldAcc = 0.0, Entropy = 0.0, Density = 0.0, Hsml = 0.0, Left = 0.0, Right = 0.0, NumNgbFound = 0, RotVel = PVector{Float64}(0.0, 0.0, 0.0), DivVel = 0.0, CurlVel = 0.0, dHsmlRho = 0.0, Pressure = 0.0, DtEntropy = 0.0, MaxSignalVel = 0.0
julia> Star(uAstro, collection = BLACKHOLE)
Star 0 BLACKHOLE: Pos = PVector(0.0 kpc, 0.0 kpc, 0.0 kpc), Vel = PVector(0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1), Acc = PVector(0.0 kpc Gyr^-2, 0.0 kpc Gyr^-2, 0.0 kpc Gyr^-2), Mass = 0.0 M⊙, Ti_endstep = 0, Ti_begstep = 0, Potential = 0.0 kpc^2 M⊙ Gyr^-2, OldAcc = 0.0 kpc Gyr^-2, Entropy = 0.0 kpc^2 M⊙ K^-1 Gyr^-2, Density = 0.0 M⊙ kpc^-3, Hsml = 0.0 kpc, Left = 0.0, Right = 0.0, NumNgbFound = 0, RotVel = PVector(0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1), DivVel = 0.0 Gyr^-1, CurlVel = 0.0 Gyr^-1, dHsmlRho = 0.0 kpc, Pressure = 0.0 M⊙ kpc^-1 Gyr^-2, DtEntropy = 0.0 kpc^2 M⊙ K^-1 Gyr^-3, MaxSignalVel = 0.0 kpc Gyr^-1
julia> Star(uSI, id = 1)
Star 1 GAS: Pos = PVector(0.0 m, 0.0 m, 0.0 m), Vel = PVector(0.0 m s^-1, 0.0 m s^-1, 0.0 m s^-1), Acc = PVector(0.0 m s^-2, 0.0 m s^-2, 0.0 m s^-2), Mass = 0.0 kg, Ti_endstep = 0, Ti_begstep = 0, Potential = 0.0 kg m^2 s^-2, OldAcc = 0.0 m s^-2, Entropy = 0.0 kg m^2 K^-1 s^-2, Density = 0.0 kg m^-3, Hsml = 0.0 m, Left = 0.0, Right = 0.0, NumNgbFound = 0, RotVel = PVector(0.0 m s^-1, 0.0 m s^-1, 0.0 m s^-1), DivVel = 0.0 s^-1, CurlVel = 0.0 s^-1, dHsmlRho = 0.0 m, Pressure = 0.0 kg m^-1 s^-2, DtEntropy = 0.0
kg m^2 K^-1 s^-3, MaxSignalVel = 0.0 m s^-1PhysicalParticles.Star2D — Typestruct Star2D{P, V, A, M, E, I<:Integer} <: AbstractParticle2DPos::PVector2D{P} where PVel::PVector2D{V} where VAcc::PVector2D{A} where AMass::AnyID::IntegerCollection::CollectionTi_endstep::Integer: Next integer step on the timeline.Ti_begstep::Integer: Present integer step on the timeline.GravCost::Integer: For each two-particle interaction, GravCost += 1Potential::Any: Particle potential in the force fieldOldAcc::Any: Save the normalization of acceleration of last step. Useful in Tree n-body method
2D Particle type designed for AstroSim.jl. Collection is an Enum defined in the same way with Gadget2, with index starting from 1.
Examples
julia> Star2D()
SPHGas 0 GAS: Pos = PVector2D{Float64}(0.0, 0.0), Vel = PVector2D{Float64}(0.0, 0.0), Acc = PVector2D{Float64}(0.0, 0.0), Mass = 0.0, Ti_endstep = 0, Ti_begstep = 0, Potential = 0.0, OldAcc = 0.0, Entropy = 0.0, Density = 0.0, Hsml = 0.0, Left = 0.0, Right = 0.0, NumNgbFound = 0, RotVel = PVector2D{Float64}(0.0, 0.0), DivVel = 0.0, CurlVel = 0.0, dHsmlRho = 0.0, Pressure = 0.0, DtEntropy = 0.0, MaxSignalVel = 0.0
julia> Star2D(uAstro, collection = BLACKHOLE)
SPHGas 0 BLACKHOLE: Pos = PVector2D(0.0 kpc, 0.0 kpc), Vel = PVector2D(0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1), Acc = PVector2D(0.0 kpc Gyr^-2, 0.0 kpc Gyr^-2), Mass = 0.0 M⊙, Ti_endstep = 0, Ti_begstep = 0, Potential = 0.0 kpc^2 M⊙ Gyr^-2, OldAcc = 0.0 kpc Gyr^-2,
Entropy = 0.0 kpc^2 M⊙ K^-1 Gyr^-2, Density = 0.0 M⊙ kpc^-2, Hsml = 0.0 kpc, Left = 0.0, Right = 0.0, NumNgbFound = 0, RotVel = PVector2D(0.0 kpc Gyr^-1, 0.0 kpc Gyr^-1), DivVel = 0.0 Gyr^-1, CurlVel = 0.0 Gyr^-1, dHsmlRho = 0.0 kpc, Pressure = 0.0 M⊙ kpc^-1 Gyr^-2, DtEntropy = 0.0 kpc^2 M⊙ K^-1 Gyr^-3, MaxSignalVel = 0.0 kpc Gyr^-1
julia> Star2D(uSI, id = 1)
SPHGas 1 GAS: Pos = PVector2D(0.0 m, 0.0 m), Vel = PVector2D(0.0 m s^-1, 0.0 m s^-1), Acc = PVector2D(0.0 m s^-2, 0.0 m s^-2), Mass = 0.0 kg, Ti_endstep = 0, Ti_begstep = 0, Potential = 0.0 kg m^2 s^-2, OldAcc = 0.0 m s^-2, Entropy = 0.0 kg m^2 K^-1 s^-2, Density = 0.0 kg m^-2, Hsml = 0.0 m, Left = 0.0, Right = 0.0, NumNgbFound = 0, RotVel = PVector2D(0.0 m s^-1, 0.0 m s^-1), DivVel = 0.0 s^-1, CurlVel = 0.0 s^-1, dHsmlRho = 0.0 m, Pressure = 0.0 kg m^-1 s^-2, DtEntropy = 0.0 kg m^2 K^-1 s^-3, MaxSignalVel = 0.0 m s^-1Missing docstring for SPHGas. Check Documenter's build log for details.
Missing docstring for SPHGas2D. Check Documenter's build log for details.
PhysicalParticles.Extent — Typestruct Extent{T<:Number} <: AbstractExtent3D{T}Could be constructed by function extent
Fields
- xMin::T
- xMax::T
- yMin::T
- yMax::T
- zMin::T
- zMax::T
- SideLength::T
- Center::PVector{T}
- Corner::PVector{T} : PVector(xMin, yMin, zMin)
PhysicalParticles.Extent2D — Typestruct Extent2D{T<:Number} <: AbstractExtent2D{T}Could be constructed by function extent
Fields
- xMin::T
- xMax::T
- yMin::T
- yMax::T
- SideLength::T
- Center::PVector2D{T}
- Corner::PVector2D{T} : PVector2D(xMin, yMin)
PhysicalParticles.Collection — TypeEnum CollectionParticle types defined in Gadget2. However, in julia, it is better to start from 1:
GAS::Collection = 1
HALO::Collection = 2
DISK::Collection = 3
BULGE::Collection = 4
STAR::Collection = 5
BLACKHOLE::Collection = 6PhysicalParticles.Constant — Typestruct Constantc::Any: light speedG::Any: Newtonian constant of gravitationh::Any: Planck constante::Any: Elementary chargem_e::Any: Electron massm_n::Any: Neutron massm_p::Any: Protron massσ::Any: Stefan-Boltzmann constantH::Any: Hubble constantk_B::Any: Kelvin-Boltzmann constantε_0::Any: Vacuum electric permittivity (electric constant)μ_0::Any: Vacuum magnetic permeabilityACC0::Any: Modified gravitational acceleration constant
PhysicalParticles.AbstractDataDimension — Typeabstract type AbstractDataDimension
Abstract type for traits. see datadimension for more info.
Subtypes
Physical2D
Physical3D
Unitless2D
Unitless3D