Files
MeanField_SERiF/docs/man/man3/angular_momentum.hpp.3
Emily Boudreaux 6b57738330 docs(docs): built docs
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)
2026-11-09 14:09:44 -05:00

69 lines
2.7 KiB
Groff
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.TH "src/include/serif/equations/angular_momentum.hpp" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
.ad l
.nh
.SH NAME
src/include/serif/equations/angular_momentum.hpp \- File containing the angular momentum constraint equation, which enforces a global constraint on the total angular momentum of a system\&.
.SH SYNOPSIS
.br
.PP
\fR#include <cmath>\fP
.br
\fR#include <string_view>\fP
.br
\fR#include 'serif/equations/contributions\&.hpp'\fP
.br
\fR#include 'serif/equations/point\&.hpp'\fP
.br
\fR#include 'serif/equations/rigid_rotation\&.hpp'\fP
.br
.SS "Classes"
.in +1c
.ti -1c
.RI "class \fBserif::equations::AngularMomentumConstraint\fP"
.br
.RI "Angular momentum constraint equation, which enforces a global constraint on the total angular momentum of a system\&. "
.in -1c
.SS "Namespaces"
.in +1c
.ti -1c
.RI "namespace \fBserif\fP"
.br
.ti -1c
.RI "namespace \fBserif::equations\fP"
.br
.in -1c
.SH "Detailed Description"
.PP
File containing the angular momentum constraint equation, which enforces a global constraint on the total angular momentum of a system\&.
.PP
\fBAuthor\fP
.RS 4
Emily M\&. Boudreaux
.RE
.PP
.PP
\fBNote\fP
.RS 4
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\&.
.RE
.PP
A few important notes about the implementation
.PP
.IP "\(bu" 2
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\&.
.IP "\(bu" 2
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
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for SERiF from the source code\&.