Global quantities¶
Calculate global (total) quantities on the particles.
- plonk.analysis.total.accreted_mass(snap)¶
Calculate the accreted mass.
- Parameters
snap (SnapLike) – The Snap object.
- Returns
The accreted mass.
- Return type
Quantity
- plonk.analysis.total.angular_momentum(snap, sinks=True, origin=None)¶
Calculate the total angular momentum.
- Parameters
snap (SnapLike) – The Snap object.
sinks (optional) – Include sink particles specified by a list of indices, or a bool indicating all sinks or no sinks. Default is True (all sinks).
origin (optional) – The origin around which to compute the angular momentum as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
- Returns
The total angular momentum like (lx, ly, lz).
- Return type
Quantity
- plonk.analysis.total.center_of_mass(snap, sinks=True)¶
Calculate the center of mass.
- Parameters
snap (SnapLike) – The Snap object.
sinks (optional) – Include sink particles specified by a list of indices, or a bool indicating all sinks or no sinks. Default is True (all sinks).
- Returns
The center of mass as a vector (cx, cy, cz).
- Return type
Quantity
- plonk.analysis.total.dust_mass(snap, squeeze=False)¶
Calculate the total dust mass per species.
- plonk.analysis.total.gas_mass(snap)¶
Calculate the total gas mass.
- Parameters
snap (SnapLike) – The Snap object.
- Returns
The total gas mass.
- Return type
Quantity
- plonk.analysis.total.kinetic_energy(snap, sinks=True)¶
Calculate the total kinetic energy.
- Parameters
snap (SnapLike) – The Snap object.
sinks (optional) – Include sink particles specified by a list of indices, or a bool indicating all sinks or no sinks. Default is True (all sinks).
- Returns
The total kinetic energy.
- Return type
Quantity
- plonk.analysis.total.mass(snap, sinks=True)¶
Calculate the total mass.
- Parameters
snap (SnapLike) – The Snap object.
sinks (optional) – Include sink particles specified by a list of indices, or a bool indicating all sinks or no sinks. Default is True (all sinks).
- Returns
The total mass.
- Return type
Quantity
- plonk.analysis.total.momentum(snap, sinks=True)¶
Calculate the total momentum.
- Parameters
snap (SnapLike) – The Snap object.
sinks (optional) – Include sink particles specified by a list of indices, or a bool indicating all sinks or no sinks. Default is True (all sinks).
- Returns
The total linear momentum like (px, py, pz).
- Return type
Quantity
- plonk.analysis.total.specific_angular_momentum(snap, sinks=True, origin=None)¶
Calculate the total specific angular momentum.
- Parameters
snap (SnapLike) – The Snap object.
sinks (optional) – Include sink particles specified by a list of indices, or a bool indicating all sinks or no sinks. Default is True (all sinks).
origin (optional) – The origin around which to compute the angular momentum as a Quantity like (x, y, z) * au. Default is (0, 0, 0).
- Returns
The total specific angular momentum on the particles like (hx, hy, hz).
- Return type
Quantity
- plonk.analysis.total.specific_kinetic_energy(snap, sinks=True)¶
Calculate the total specific kinetic energy.
- Parameters
snap (SnapLike) – The Snap object.
sinks (optional) – Include sink particles specified by a list of indices, or a bool indicating all sinks or no sinks. Default is True (all sinks).
- Returns
The total specific kinetic energy.
- Return type
Quantity