|
SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
|
A class that implements rigid rotation, providing methods to compute the centrifugal potential, its gradient, and its Hessian. More...
#include <rigid_rotation.hpp>
Public Types | |
| using | Vector = discretization::forms::VectorValue |
| Alias for some vector (rank 1 tensor) type. | |
| using | Matrix = discretization::forms::MatrixValue |
| Alias for some matrix (rank 2 tensor) type. | |
Public Member Functions | |
| RigidRotation (const Vector &angular_velocity_vector, const Vector &axis_origin={}) | |
| Construct a RigidRotation object with the given angular velocity vector and axis origin. | |
| double | centrifugal_potential (const Vector &position) const |
| Ψ = ½|ω × λ|²; using the cross product avoids subtracting nearly equal squared lengths near the axis. | |
| Vector | centrifugal_potential_gradient (const Vector &position) const |
| Compute the gradient of the centrifugal potential at a given position. This is computed as \( \nabla \Psi = H \lambda\) where \(H = |\omega|^2 I - \omega \otimes \omega\) is the Hessian of the centrifugal potential. | |
| const Matrix & | centrifugal_potential_hessian () const |
| Get the Hessian of the centrifugal potential, which is independent of position for rigid rotation. This is computed as \( H = |\omega|^2 I - \omega \otimes \omega\). | |
| const Vector & | angular_velocity_vector () const |
| Get the angular velocity vector of the rigid rotation. | |
| const Vector & | axis_origin () const |
| Get the origin of the rotation axis. | |
Static Public Member Functions | |
| static RigidRotation | unit_rotation (Vector rotation_axis={0.0, 0.0, 1.0}, const Vector &axis_origin={}) |
| Construct a RigidRotation object with a unit rotation axis and an axis origin. | |
Private Attributes | |
| Vector | m_angular_velocity_vector |
| The angular velocity vector of the rigid rotation, which must be finite. | |
| Vector | m_axis_origin |
| The origin of the rotation axis, which must be finite. | |
| Matrix | m_potential_hessian {} |
| The Hessian of the centrifugal potential, which is independent of position for rigid rotation and is computed as \( H = |\omega|^2 I - \omega \otimes \omega\). | |
A class that implements rigid rotation, providing methods to compute the centrifugal potential, its gradient, and its Hessian.
Broadly this class handles a number of the details of rigid rotation. Note that this is really setup to be static physics; that is to say, there are a series of things you setup with the constructor (the angular velocity vector and the axis origin), then those are used to evaluate a series of relations. There is not however any way to update and re-evaluate the same object.
The relations implemented are
Alias for some matrix (rank 2 tensor) type.
Alias for some vector (rank 1 tensor) type.
|
inlineexplicit |
Construct a RigidRotation object with the given angular velocity vector and axis origin.
| angular_velocity_vector | The angular velocity vector, which must be finite. |
| axis_origin | The origin of the rotation axis, which must be finite. (default to the origin, (0, 0, 0)) |
| std::invalid_argument | If the angular velocity vector or axis origin is not finite. |
The constructor also evaluates the Hessian of the centrifugal potential at construction time. This is defined as
\[H = \nabla\nabla \Psi = |\omega|^2 I - \omega \otimes \omega \]
|
inlinenodiscard |
Get the angular velocity vector of the rigid rotation.
|
inlinenodiscard |
Get the origin of the rotation axis.
|
inlinenodiscard |
Ψ = ½|ω × λ|²; using the cross product avoids subtracting nearly equal squared lengths near the axis.
Compute the centrifugal potential at a given position. This is computed as \( \Psi = \frac{1}{2}|\omega \times \lambda|^2\) where \(\lambda = r - r_a\) is the position relative to the axis origin.
| position | The position at which to compute the centrifugal potential, which must be finite. |
|
inlinenodiscard |
Compute the gradient of the centrifugal potential at a given position. This is computed as \( \nabla \Psi = H \lambda\) where \(H = |\omega|^2 I - \omega \otimes \omega\) is the Hessian of the centrifugal potential.
| position | The position at which to compute the gradient of the centrifugal potential, which must be finite. |
|
inlinenodiscard |
Get the Hessian of the centrifugal potential, which is independent of position for rigid rotation. This is computed as \( H = |\omega|^2 I - \omega \otimes \omega\).
|
inlinestaticnodiscard |
Construct a RigidRotation object with a unit rotation axis and an axis origin.
| rotation_axis | The rotation axis, which must be finite and nonzero. (default to the z-axis, (0, 0, 1)) |
| axis_origin | The origin of the rotation axis, which must be finite. (default to the origin, (0, 0, 0)) |
| std::invalid_argument | If the norm of the rotation axis is not finite and positive. |
This method normalizes the rotation axis to create a unit vector. It then constructs a RigidRotation object using this unit vector and the provided axis origin.
|
private |
The angular velocity vector of the rigid rotation, which must be finite.
|
private |
The origin of the rotation axis, which must be finite.
|
private |
The Hessian of the centrifugal potential, which is independent of position for rigid rotation and is computed as \( H = |\omega|^2 I - \omega \otimes \omega\).