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)
61 lines
3.5 KiB
TeX
61 lines
3.5 KiB
TeX
\doxysection{src/include/serif/equations/angular\+\_\+momentum.hpp File Reference}
|
||
\hypertarget{angular__momentum_8hpp}{}\label{angular__momentum_8hpp}\index{src/include/serif/equations/angular\_momentum.hpp@{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.
|
||
|
||
|
||
{\ttfamily \#include $<$cmath$>$}\newline
|
||
{\ttfamily \#include $<$string\+\_\+view$>$}\newline
|
||
{\ttfamily \#include "{}serif/equations/contributions.\+hpp"{}}\newline
|
||
{\ttfamily \#include "{}serif/equations/point.\+hpp"{}}\newline
|
||
{\ttfamily \#include "{}serif/equations/rigid\+\_\+rotation.\+hpp"{}}\newline
|
||
Include dependency graph for angular\+\_\+momentum.\+hpp\+:
|
||
\nopagebreak
|
||
\begin{figure}[H]
|
||
\begin{center}
|
||
\leavevmode
|
||
\includegraphics[width=350pt]{angular__momentum_8hpp__incl}
|
||
\end{center}
|
||
\end{figure}
|
||
This graph shows which files directly or indirectly include this file\+:
|
||
\nopagebreak
|
||
\begin{figure}[H]
|
||
\begin{center}
|
||
\leavevmode
|
||
\includegraphics[width=350pt]{angular__momentum_8hpp__dep__incl}
|
||
\end{center}
|
||
\end{figure}
|
||
\doxysubsubsection*{Classes}
|
||
\begin{DoxyCompactItemize}
|
||
\item
|
||
class \mbox{\hyperlink{classserif_1_1equations_1_1_angular_momentum_constraint}{serif\+::equations\+::\+Angular\+Momentum\+Constraint}}
|
||
\begin{DoxyCompactList}\small\item\em Angular momentum constraint equation, which enforces a global constraint on the total angular momentum of a system. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||
\doxysubsubsection*{Namespaces}
|
||
\begin{DoxyCompactItemize}
|
||
\item
|
||
namespace \mbox{\hyperlink{namespaceserif}{serif}}
|
||
\item
|
||
namespace \mbox{\hyperlink{namespaceserif_1_1equations}{serif\+::equations}}
|
||
\end{DoxyCompactItemize}
|
||
|
||
|
||
\doxysubsection{Detailed Description}
|
||
File containing the angular momentum constraint equation, which enforces a global constraint on the total angular momentum of a system.
|
||
|
||
\begin{DoxyAuthor}{Author}
|
||
Emily M. Boudreaux
|
||
\end{DoxyAuthor}
|
||
|
||
|
||
\begin{DoxyNote}{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.
|
||
\end{DoxyNote}
|
||
A few important notes about the implementation
|
||
|
||
|
||
\begin{DoxyItemize}
|
||
\item 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.
|
||
\item 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
|
||
\end{DoxyItemize}
|