SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
angular_momentum.hpp File Reference

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

#include <cmath>
#include <string_view>
#include "serif/equations/contributions.hpp"
#include "serif/equations/point.hpp"
#include "serif/equations/rigid_rotation.hpp"
Include dependency graph for angular_momentum.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  serif::equations::AngularMomentumConstraint
 Angular momentum constraint equation, which enforces a global constraint on the total angular momentum of a system. More...
 

Namespaces

namespace  serif
 
namespace  serif::equations
 

Detailed Description

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

Author
Emily M. Boudreaux
Note
The angular momentum constraint is a global constraint that is enforced by integrating the point-wise contributions of the angular momentum density over the entire domain. The 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.

A few important notes about the implementation

  • The way the equation system plugs into the mfem backend is such that equations should only ever return point wise contributions to the residual, not a global integrated residual. This is why we return \( j_\parallel = \rho \Omega s^2\) as the residual, rather than \( j_\parallel - J_{\text{target}}\). However we still need to subtract the target angular momentum from the integrated residual to enforce the constraint. This is done by implementing the method ::residual_offset() which returns \( -J_{\text{target}}\). The backend will automatically detect and, if present, subtract this from the integrated residual to enforce the constraint.
  • The solver can choose to validate the angular momentum constraint by integrating the ::validation_integrand() over the domain and then passing this result to ::validate_integral(double result). Note that this is not specific to this equation but a feature of the overall system