Extra particle quantities¶
Calculate extra quantities on the particles.
- plonk.analysis.particles.angular_momentum(snap, origin=None, ignore_accreted=False)¶
Calculate the angular momentum.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the angular momentum as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The angular momentum on the particles.
- Return type
Quantity
- plonk.analysis.particles.angular_velocity(snap, origin=None, ignore_accreted=False)¶
Calculate the angular velocity.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the angular velocity as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The angular velocity on the particles.
- Return type
Quantity
- plonk.analysis.particles.azimuthal_angle(snap, origin=None, ignore_accreted=False)¶
Calculate the azimuthal angle.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the azimuthal angle as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The azimuthal angle on the particles.
- Return type
Quantity
- plonk.analysis.particles.dust_density(snap, ignore_accreted=False)¶
Calculate the dust density per species.
For dust/gas mixtures this is from the dust fraction.
- Parameters
snap (SnapLike) – The Snap object.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The dust density per species on the particles.
- Return type
Quantity
- plonk.analysis.particles.dust_mass(snap, ignore_accreted=False)¶
Calculate the dust mass per species.
For dust/gas mixtures this is from the dust fraction.
- Parameters
snap (SnapLike) – The Snap object.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The dust mass per species on the particles.
- Return type
Quantity
- plonk.analysis.particles.gas_density(snap, ignore_accreted=False)¶
Calculate the gas density.
For dust/gas mixtures this is from the dust fraction.
- Parameters
snap (SnapLike) – The Snap object.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The gas density on the particles.
- Return type
Quantity
- plonk.analysis.particles.gas_fraction(snap, ignore_accreted=False)¶
Calculate the gas fraction.
For dust/gas mixtures this is from the dust fraction.
- Parameters
snap (SnapLike) – The Snap object.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The gas fraction on the particles.
- Return type
Quantity
- plonk.analysis.particles.gas_mass(snap, ignore_accreted=False)¶
Calculate the gas mass.
For dust/gas mixtures this is from the dust fraction.
- Parameters
snap (SnapLike) – The Snap object.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The gas mass on the particles.
- Return type
Quantity
- plonk.analysis.particles.kinetic_energy(snap, ignore_accreted=False)¶
Calculate the kinetic energy.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The kinetic energy on the particles.
- Return type
Quantity
- plonk.analysis.particles.momentum(snap, ignore_accreted=False)¶
Calculate the momentum.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The linear momentum on the particles.
- Return type
Quantity
- plonk.analysis.particles.polar_angle(snap, origin=None, ignore_accreted=False)¶
Calculate the polar angle.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the polar angle as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The azimuthal angle on the particles.
- Return type
Quantity
- plonk.analysis.particles.radius_cylindrical(snap, origin=None, ignore_accreted=False)¶
Calculate the cylindrical radial distance.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the cylindrical radius as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The radial distance on the particles.
- Return type
Quantity
- plonk.analysis.particles.radius_spherical(snap, origin=None, ignore_accreted=False)¶
Calculate the spherical radial distance.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the spherical radius as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The radial distance on the particles.
- Return type
Quantity
- plonk.analysis.particles.specific_angular_momentum(snap, origin=None, ignore_accreted=False)¶
Calculate the specific angular momentum.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the specific angular momentum as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The specific angular momentum on the particles.
- Return type
Quantity
- plonk.analysis.particles.specific_kinetic_energy(snap, ignore_accreted=False)¶
Calculate the specific kinetic energy.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The specific kinetic energy on the particles.
- Return type
Quantity
- plonk.analysis.particles.temperature(snap, molecular_weight=None, ignore_accreted=False)¶
Calculate the gas temperature.
- Parameters
snap (SnapLike) – The Snap object.
molecular_weight (float) – The gas molecular weight in gram / mole. E.g. 2.381 for molecular hydrogen.
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The gas temperature on the particles.
- Return type
Quantity
- plonk.analysis.particles.velocity_radial_cylindrical(snap, origin=None, ignore_accreted=False)¶
Calculate the cylindrical radial velocity.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the cylindrical radial velocity as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The radial velocity on the particles.
- Return type
Quantity
- plonk.analysis.particles.velocity_radial_spherical(snap, origin=None, ignore_accreted=False)¶
Calculate the spherical radial velocity.
- Parameters
snap (Union[SnapLike, Sinks]) – The Snap object.
origin (optional) – The origin around which to compute the spherical radial velocity as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
ignore_accreted (optional) – Ignore accreted particles. Default is False.
- Returns
The radial velocity on the particles.
- Return type
Quantity