SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::equations::AngularMomentumConstraint Class Referencefinal

Angular momentum constraint equation, which enforces a global constraint on the total angular momentum of a system. More...

#include <angular_momentum.hpp>

Inheritance diagram for serif::equations::AngularMomentumConstraint:
[legend]
Collaboration diagram for serif::equations::AngularMomentumConstraint:
[legend]

Public Types

using Density = discretization::blocks::density::mass
 
using ResidualQuantity = dimensions::AngularMomentum
 
using AngularVelocity = discretization::blocks::rotation::angular_velocity
 
using DensityValue = discretization::forms::Operand<Density>
 
using AngularVelocityValue = discretization::forms::Operand<AngularVelocity>
 
using Operands = utils::types::TypeList<DensityValue, AngularVelocityValue>
 
- Public Types inherited from serif::equations::Contribution< discretization::forms::Operand< discretization::blocks::rotation::angular_velocity > >
using Test
 The test type of the contribution.
 
using TestOperand
 The operand type of the contribution (associating a test function and a term)
 
using Support
 The domain support of the contribution (which then boils down to the dofs which are supported by the term on that test function)
 

Public Member Functions

 AngularMomentumConstraint (const double target_axial_angular_momentum, const RigidRotation::Vector &rotation_axis={0.0, 0.0, 1.0}, const RigidRotation::Vector &axis_origin={})
 Prescribe Jₜ ≥ 0 and the axis through rₐ; Ω remains an unknown and may be signed in trial states.
 
PointLinearization< Operands > evaluate (const EquationPoint< Operands > &point) const
 Evaluate the angular-momentum constraints point-wise integrand and its partial derivatives.
 
double residual_offset () const
 Return the residual offset for the angular-momentum constraint.
 
const RigidRotation & rotation () const noexcept
 Inspect the physical rotation axis and origin.
 

Static Public Member Functions

static int additional_order (DensityValue, int position_order)
 Return the additional quadrature degree for the density coupling.
 
static int additional_order (AngularVelocityValue, int position_order)
 Return the additional quadrature degree for the angular-velocity coupling.
 
static double validation_integrand (const EquationPoint< Operands > &, const PointLinearization< Operands > &physics)
 Return the already computed inertia density, \(\rho s^{2}\), for validation.
 
static void validate_integral (const double axial_moment_of_inertia)
 Require the integrated axial moment of inertia to be finite and nonnegative.
 

Static Public Attributes

static constexpr std::string_view name = "angular momentum"
 

Private Attributes

double m_target_axial_angular_momentum
 The prescribed total angular momentum along the rotation axis, \( J_{\text{target}} \geq 0 \).
 
RigidRotation m_unit_rotation
 The unit rotation, storing the normalized axis and its origin, used to compute \(s^{2}\) and its gradient.
 

Detailed Description

Angular momentum constraint equation, which enforces a global constraint on the total angular momentum of a system.

The point-wise integrand is given by \( j_\parallel = \rho \Omega s^2\), where \(s^2 = |\hat{n} × (r − r_{c})|^2\) is the cylindrical radius squared, and \(\hat{n}\) is the unit rotation axis. The solver will integrate this over the domain and compare it to the target angular momentum to enforce the constraint.

Use this equation in conjunction with a RigidRotation object to constrain the angular momentum of a system to some fixed value. Note that this constraint is weakly applied and therefore should be checked for convergence in the final solution.

Equation Contributions
  • Residuals to the global angular momentum

Member Typedef Documentation

◆ AngularVelocity

◆ AngularVelocityValue

◆ Density

◆ DensityValue

◆ Operands

◆ ResidualQuantity

Constructor & Destructor Documentation

◆ AngularMomentumConstraint()

serif::equations::AngularMomentumConstraint::AngularMomentumConstraint ( const double target_axial_angular_momentum,
const RigidRotation::Vector & rotation_axis = {0.0, 0.0, 1.0},
const RigidRotation::Vector & axis_origin = {} )
inlineexplicit

Prescribe Jₜ ≥ 0 and the axis through rₐ; Ω remains an unknown and may be signed in trial states.

Member Function Documentation

◆ additional_order() [1/2]

static int serif::equations::AngularMomentumConstraint::additional_order ( AngularVelocityValue ,
int position_order )
inlinestaticnodiscard

Return the additional quadrature degree for the angular-velocity coupling.

At fixed density and position, \(\delta j_{\parallel} = \rho s^{2}\delta \Omega\). The angular-velocity trial function is spatially constant. The remaining coefficient \(\rho s^{2}\) has polynomial degree at most \(p_{\rho} + 2p_{r}\).

Parameters
position_orderPolynomial degree bound for physical position expressed in reference-element coordinates.
Returns
The coefficient degree bound \(p_{\rho} + 2p_{r}\), excluding the geometry weight.

◆ additional_order() [2/2]

static int serif::equations::AngularMomentumConstraint::additional_order ( DensityValue ,
int position_order )
inlinestaticnodiscard

Return the additional quadrature degree for the density coupling.

At fixed position and angular velocity, \(\delta j_{\parallel} = \Omega s^{2} \delta \rho\). The backend already counts the density trial degree \(p_{\rho}\). Since \(\Omega\) is spatially constant and \(s^{2}\) is quadratic in position, the remaining coefficient \(\Omega s^{2}\) has polynomial degree at most \(2p_{r}\).

Parameters
position_orderPolynomial degree bound for physical position expressed in reference-element coordinates.
Returns
The coefficient degree bound \(2p_{r}\), excluding the geometry weight.

◆ evaluate()

PointLinearization< Operands > serif::equations::AngularMomentumConstraint::evaluate ( const EquationPoint< Operands > & point) const
inlinenodiscard

Evaluate the angular-momentum constraints point-wise integrand and its partial derivatives.

The point-wise integrand is calculated as \( j_\parallel = \rho \Omega s^2\) where \(s^2 = |\hat{n} × (r − r_{c})|^2\) is the cylindrical radius squared. The partial derivatives are calculated as:

  • \( \frac{\partial j_\parallel}{\partial \rho} = \Omega s^2\)
  • \( \frac{\partial j_\parallel}{\partial \Omega} = \rho s^2\)
  • \( \nabla j_\parallel = 2 \rho\Omega\lambda_{\perp}\) where \(\lambda_{\perp} = \hat{n} × (r − r_{c})\) is the displacement perpendicular to the rotation axis.
Note
There is a subtly here which may trick the careful programmer up. Note that we set the residual to \(R = \rho\Omega s^{2}\); rather that the more obvious choice of \(R = \rho\Omega s^{2} - J_{\text{target}}\). The important thing to remember is that these equations are evaluated point-wise. Put another way if you were to evaluate the physical residual as the local angular momentum contribution - the global angular momentum at some single point the meaning would be ill-defined. There is no local angular momentum constraint, we only have a global one. What we actually need to do is give the backend someone of knowing what the total angular momentum of the system is. Therefore what we return here is integrand of the residual which is then automatically integrated over the volume by the backend (so when integrating all these point wise contributions over the domain the backend will get the total angular momentum). Further, if an equation supplies the method residual_offset() (as this one does) then the backend will automatically subtract that from the integrated residual (e.g. the backend has computed the total angular momentum and then subtracts residual_offset to find the actual residual, which will approach 0 as the total angular momentum approaches the supplied value). A heuristic which may be useful to keep in mind is that global constraints should supply a residual offset whereas local equations often will not need to.
Parameters
pointThe point at which to evaluate the integrand and its partial derivatives.

◆ residual_offset()

double serif::equations::AngularMomentumConstraint::residual_offset ( ) const
inlinenodiscard

Return the residual offset for the angular-momentum constraint.

The backend integrates the point-wise residual contributions over the domain. The global constraint is satisfied when the total angular momentum equals the target value. Therefore we subtract the target from the integrated residual to get the actual residual.

Note
The backend automatically looks for this method and calls it if it exists.
Returns
The negative of the target axial angular momentum, $-J_{\text{target}}$.

◆ rotation()

const RigidRotation & serif::equations::AngularMomentumConstraint::rotation ( ) const
inlinenodiscardnoexcept

Inspect the physical rotation axis and origin.

◆ validate_integral()

static void serif::equations::AngularMomentumConstraint::validate_integral ( const double axial_moment_of_inertia)
inlinestatic

Require the integrated axial moment of inertia to be finite and nonnegative.

The operator backend supplies the integral of validation_integrand(). Failure rejects preparation of the candidate state. Passing this check does not establish nonnegative density everywhere or satisfaction of \(\Omega I_{\parallel} - J_{\mathrm{target}} = 0\).

Parameters
axial_moment_of_inertiaThe integrated axial moment of inertia, \(I_{\parallel} = \int_\star \rho s^{2}\,dV\).

◆ validation_integrand()

static double serif::equations::AngularMomentumConstraint::validation_integrand ( const EquationPoint< Operands > & ,
const PointLinearization< Operands > & physics )
inlinestaticnodiscard

Return the already computed inertia density, \(\rho s^{2}\), for validation.

When an equation provides validate_integral(), the operator backend integrates this quantity over the equation's domain and passes the result to that method. Here the integral is the axial moment of inertia, \(I_{\parallel} = \int_\star \rho s^{2}\,dV\).

The equation defines both the quantity to integrate and its admissibility requirements; the backend performs the integration. Here we require finite, nonnegative inertia as a necessary, but not sufficient, condition for a physically admissible mass distribution.

Parameters
physicsThe point-wise linearization, whose angular-velocity derivative already contains \(\partial j_{\parallel}/\partial\Omega = \rho s^{2}\).

Member Data Documentation

◆ m_target_axial_angular_momentum

double serif::equations::AngularMomentumConstraint::m_target_axial_angular_momentum
private

The prescribed total angular momentum along the rotation axis, \( J_{\text{target}} \geq 0 \).

◆ m_unit_rotation

RigidRotation serif::equations::AngularMomentumConstraint::m_unit_rotation
private

The unit rotation, storing the normalized axis and its origin, used to compute \(s^{2}\) and its gradient.

◆ name

std::string_view serif::equations::AngularMomentumConstraint::name = "angular momentum"
staticconstexpr

The documentation for this class was generated from the following file: