sailfish.physics.circumbinary.PointMass
- class sailfish.physics.circumbinary.PointMass(mass: float = 0.0, position_x: float = 0.0, position_y: float = 0.0, velocity_x: float = 0.0, velocity_y: float = 0.0, softening_length: float = 0.0, sink_model: SinkModel = SinkModel.INACTIVE, sink_rate: float = 0.0, sink_radius: float = 0.0)[source]
Bases:
NamedTuple
Describes a gravitating point mass
The point mass’s mass, x-y position, and softening length fully determine the gravitational potential:
\[\phi = \frac{G M}{\sqrt{\Delta r^2 + r_{\rm soft}^2}} \, .\]Here, \(\Delta r\) is the distance from the particle to the field point, and \(r_{\rm soft}\) is the
softening_length
parameter below. Note that the gravitational constant is assumed to be 1 by the physics solvers.Point masses can also act as sinks of mass and momentum. This behavior is controlled by the sink model, sink rate, and a sink radius. If the sink model has the value
SINK_MODEL_INACTIVE
, then that particle may still be a source of gravitational potential, but it does model accretion by subtracting mass or momentum. The acceleration-free and torque-free modes are described in literature here:The acceleration-free sink model is there for logical completeness, but it should not be used in practice.
- __init__()
Methods
__init__
()count
(value, /)Return number of occurrences of value.
index
(value[, start, stop])Return first index of value.
Attributes
The mass (really G * M since solvers assume G = 1)
The x-position
The y-position
The equation used to control how momentum is subtracted
The sink radius: how far from the particle the sink extends
The sink rate: how fast mass and momentum are removed
Gravitational softening length
The x-velocity
The y-velocity
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- mass: float
The mass (really G * M since solvers assume G = 1)
- position_x: float
The x-position
- position_y: float
The y-position
- sink_radius: float
The sink radius: how far from the particle the sink extends
- sink_rate: float
The sink rate: how fast mass and momentum are removed
- softening_length: float
Gravitational softening length
- velocity_x: float
The x-velocity
- velocity_y: float
The y-velocity