Note for now much of the docs is LLM written. This was done to save time and focus on code development. The docs have been LOOSLEY reviewed. However, the code itself has been either fully written by hand or fully reviewed. Therefore, the docs should at the moment be seen as a loose resource rather than authoratiative (and this is on top of the general ability for docs to drift)
272 lines
9.6 KiB
Groff
272 lines
9.6 KiB
Groff
.TH "serif::equations::RigidRotation" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
|
||
.ad l
|
||
.nh
|
||
.SH NAME
|
||
serif::equations::RigidRotation \- A class that implements rigid rotation, providing methods to compute the centrifugal potential, its gradient, and its Hessian\&.
|
||
|
||
.SH SYNOPSIS
|
||
.br
|
||
.PP
|
||
.PP
|
||
\fR#include <rigid_rotation\&.hpp>\fP
|
||
.SS "Public Types"
|
||
|
||
.in +1c
|
||
.ti -1c
|
||
.RI "using \fBVector\fP = \fBdiscretization::forms::VectorValue\fP"
|
||
.br
|
||
.RI "Alias for some vector (rank 1 tensor) type\&. "
|
||
.ti -1c
|
||
.RI "using \fBMatrix\fP = \fBdiscretization::forms::MatrixValue\fP"
|
||
.br
|
||
.RI "Alias for some matrix (rank 2 tensor) type\&. "
|
||
.in -1c
|
||
.SS "Public Member Functions"
|
||
|
||
.in +1c
|
||
.ti -1c
|
||
.RI "\fBRigidRotation\fP (const \fBVector\fP &\fBangular_velocity_vector\fP, const \fBVector\fP &\fBaxis_origin\fP={})"
|
||
.br
|
||
.RI "Construct a \fBRigidRotation\fP object with the given angular velocity vector and axis origin\&. "
|
||
.ti -1c
|
||
.RI "double \fBcentrifugal_potential\fP (const \fBVector\fP &position) const"
|
||
.br
|
||
.RI "Ψ = ½|ω × λ|²; using the cross product avoids subtracting nearly equal squared lengths near the axis\&. "
|
||
.ti -1c
|
||
.RI "\fBVector\fP \fBcentrifugal_potential_gradient\fP (const \fBVector\fP &position) const"
|
||
.br
|
||
.RI "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\&. "
|
||
.ti -1c
|
||
.RI "const \fBMatrix\fP & \fBcentrifugal_potential_hessian\fP () const"
|
||
.br
|
||
.RI "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$\&. "
|
||
.ti -1c
|
||
.RI "const \fBVector\fP & \fBangular_velocity_vector\fP () const"
|
||
.br
|
||
.RI "Get the angular velocity vector of the rigid rotation\&. "
|
||
.ti -1c
|
||
.RI "const \fBVector\fP & \fBaxis_origin\fP () const"
|
||
.br
|
||
.RI "Get the origin of the rotation axis\&. "
|
||
.in -1c
|
||
.SS "Static Public Member Functions"
|
||
|
||
.in +1c
|
||
.ti -1c
|
||
.RI "static \fBRigidRotation\fP \fBunit_rotation\fP (\fBVector\fP rotation_axis={0\&.0, 0\&.0, 1\&.0}, const \fBVector\fP &\fBaxis_origin\fP={})"
|
||
.br
|
||
.RI "Construct a \fBRigidRotation\fP object with a unit rotation axis and an axis origin\&. "
|
||
.in -1c
|
||
.SS "Private Attributes"
|
||
|
||
.in +1c
|
||
.ti -1c
|
||
.RI "\fBVector\fP \fBm_angular_velocity_vector\fP"
|
||
.br
|
||
.RI "The angular velocity vector of the rigid rotation, which must be finite\&. "
|
||
.ti -1c
|
||
.RI "\fBVector\fP \fBm_axis_origin\fP"
|
||
.br
|
||
.RI "The origin of the rotation axis, which must be finite\&. "
|
||
.ti -1c
|
||
.RI "\fBMatrix\fP \fBm_potential_hessian\fP {}"
|
||
.br
|
||
.RI "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$\&. "
|
||
.in -1c
|
||
.SH "Detailed Description"
|
||
.PP
|
||
A class that implements rigid rotation, providing methods to compute the centrifugal potential, its gradient, and its Hessian\&.
|
||
|
||
|
||
.PP
|
||
\fBNote\fP
|
||
.RS 4
|
||
This is not an equation in the same way that other parts of this module are; rather, this is a utility class used in other equations\&.
|
||
.RE
|
||
.PP
|
||
\fBTodo\fP
|
||
.RS 4
|
||
This should probably be refactored into its own submodule to clean up equations a bit
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
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\&.
|
||
|
||
.PP
|
||
The relations implemented are
|
||
.IP "\(bu" 2
|
||
Centrifugal potential: $\Psi = \frac{1}{2}|\omega \times \lambda|^2$ where $\lambda = r - r_a$ is the position relative to the axis origin\&. This can be further simplified to $\Psi = \frac{1}{2}\Omega^{2}s^{2}$ where $s$ is the cylindrical radius from the axis of rotation\&.
|
||
.IP "\(bu" 2
|
||
Centrifugal potential gradient: $\nabla \Psi = H\ lambda$ where $H = |\omega|^2 I - \omega \otimes \omega$ is the Hessian of the centrifugal potential\&.
|
||
.PP
|
||
|
||
.SH "Member Typedef Documentation"
|
||
.PP
|
||
.SS "using \fBserif::equations::RigidRotation::Matrix\fP = \fBdiscretization::forms::MatrixValue\fP"
|
||
|
||
.PP
|
||
Alias for some matrix (rank 2 tensor) type\&.
|
||
.SS "using \fBserif::equations::RigidRotation::Vector\fP = \fBdiscretization::forms::VectorValue\fP"
|
||
|
||
.PP
|
||
Alias for some vector (rank 1 tensor) type\&.
|
||
.SH "Constructor & Destructor Documentation"
|
||
.PP
|
||
.SS "serif::equations::RigidRotation::RigidRotation (const \fBVector\fP & angular_velocity_vector, const \fBVector\fP & axis_origin = \fR{}\fP)\fR [inline]\fP, \fR [explicit]\fP"
|
||
|
||
.PP
|
||
Construct a \fBRigidRotation\fP object with the given angular velocity vector and axis origin\&.
|
||
.PP
|
||
\fBParameters\fP
|
||
.RS 4
|
||
\fIangular_velocity_vector\fP The angular velocity vector, which must be finite\&.
|
||
.br
|
||
\fIaxis_origin\fP The origin of the rotation axis, which must be finite\&. (default to the origin, (0, 0, 0))
|
||
.RE
|
||
.PP
|
||
\fBExceptions\fP
|
||
.RS 4
|
||
\fIstd::invalid_argument\fP If the angular velocity vector or axis origin is not finite\&.
|
||
.RE
|
||
.PP
|
||
The constructor also evaluates the Hessian of the centrifugal potential at construction time\&. This is defined as
|
||
|
||
.PP
|
||
\[H = \nabla\nabla \Psi = |\omega|^2 I - \omega \otimes \omega
|
||
\]
|
||
.PP
|
||
\fBTodo\fP
|
||
.RS 4
|
||
We make an assumption here about the dimensionality of the space (e\&.g that the hessian is a 3x3 matrix)\&. This is likely fine; however, if we ever want to be able to model 1D or 2D systems we will need to refactor this to be more general\&.
|
||
.RE
|
||
.PP
|
||
|
||
.SH "Member Function Documentation"
|
||
.PP
|
||
.SS "const \fBVector\fP & serif::equations::RigidRotation::angular_velocity_vector () const\fR [inline]\fP, \fR [nodiscard]\fP"
|
||
|
||
.PP
|
||
Get the angular velocity vector of the rigid rotation\&.
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
The angular velocity vector\&.
|
||
.RE
|
||
.PP
|
||
|
||
.SS "const \fBVector\fP & serif::equations::RigidRotation::axis_origin () const\fR [inline]\fP, \fR [nodiscard]\fP"
|
||
|
||
.PP
|
||
Get the origin of the rotation axis\&.
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
The origin of the rotation axis\&.
|
||
.RE
|
||
.PP
|
||
|
||
.SS "double serif::equations::RigidRotation::centrifugal_potential (const \fBVector\fP & position) const\fR [inline]\fP, \fR [nodiscard]\fP"
|
||
|
||
.PP
|
||
Ψ = ½|ω × λ|²; 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\&.
|
||
|
||
.PP
|
||
\fBParameters\fP
|
||
.RS 4
|
||
\fIposition\fP The position at which to compute the centrifugal potential, which must be finite\&.
|
||
.RE
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
The centrifugal potential at the given position\&.
|
||
.RE
|
||
.PP
|
||
\fBTodo\fP
|
||
.RS 4
|
||
We should add some validation for position into this
|
||
.RE
|
||
.PP
|
||
|
||
.SS "\fBVector\fP serif::equations::RigidRotation::centrifugal_potential_gradient (const \fBVector\fP & position) const\fR [inline]\fP, \fR [nodiscard]\fP"
|
||
|
||
.PP
|
||
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\&.
|
||
.PP
|
||
\fBParameters\fP
|
||
.RS 4
|
||
\fIposition\fP The position at which to compute the gradient of the centrifugal potential, which must be finite\&.
|
||
.RE
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
The gradient of the centrifugal potential at the given position\&.
|
||
.RE
|
||
.PP
|
||
\fBTodo\fP
|
||
.RS 4
|
||
We should add some validation for position into this
|
||
.RE
|
||
.PP
|
||
|
||
.SS "const \fBMatrix\fP & serif::equations::RigidRotation::centrifugal_potential_hessian () const\fR [inline]\fP, \fR [nodiscard]\fP"
|
||
|
||
.PP
|
||
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$\&.
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
The Hessian of the centrifugal potential\&.
|
||
.RE
|
||
.PP
|
||
|
||
.SS "static \fBRigidRotation\fP serif::equations::RigidRotation::unit_rotation (\fBVector\fP rotation_axis = \fR{0\&.0, 0\&.0, 1\&.0}\fP, const \fBVector\fP & axis_origin = \fR{}\fP)\fR [inline]\fP, \fR [static]\fP, \fR [nodiscard]\fP"
|
||
|
||
.PP
|
||
Construct a \fBRigidRotation\fP object with a unit rotation axis and an axis origin\&.
|
||
.PP
|
||
\fBParameters\fP
|
||
.RS 4
|
||
\fIrotation_axis\fP The rotation axis, which must be finite and nonzero\&. (default to the z-axis, (0, 0, 1))
|
||
.br
|
||
\fIaxis_origin\fP The origin of the rotation axis, which must be finite\&. (default to the origin, (0, 0, 0))
|
||
.RE
|
||
.PP
|
||
\fBExceptions\fP
|
||
.RS 4
|
||
\fIstd::invalid_argument\fP If the norm of the rotation axis is not finite and positive\&.
|
||
.RE
|
||
.PP
|
||
This method normalizes the rotation axis to create a unit vector\&. It then constructs a \fBRigidRotation\fP object using this unit vector and the provided axis origin\&.
|
||
|
||
.PP
|
||
\fBNote\fP
|
||
.RS 4
|
||
This constructs a new \fBRigidRotation\fP object does not modify the original object in place\&.
|
||
.RE
|
||
.PP
|
||
\fBTodo\fP
|
||
.RS 4
|
||
This may make sense to turn into a free-function rather than a class method\&.
|
||
.RE
|
||
.PP
|
||
|
||
.SH "Member Data Documentation"
|
||
.PP
|
||
.SS "\fBVector\fP serif::equations::RigidRotation::m_angular_velocity_vector\fR [private]\fP"
|
||
|
||
.PP
|
||
The angular velocity vector of the rigid rotation, which must be finite\&.
|
||
.SS "\fBVector\fP serif::equations::RigidRotation::m_axis_origin\fR [private]\fP"
|
||
|
||
.PP
|
||
The origin of the rotation axis, which must be finite\&.
|
||
.SS "\fBMatrix\fP serif::equations::RigidRotation::m_potential_hessian {}\fR [private]\fP"
|
||
|
||
.PP
|
||
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$\&.
|
||
|
||
.SH "Author"
|
||
.PP
|
||
Generated automatically by Doxygen for SERiF from the source code\&.
|