265 lines
11 KiB
Groff
265 lines
11 KiB
Groff
|
|
.TH "serif::equations::BarotropicClosure< EOST >" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
|
||
|
|
.ad l
|
||
|
|
.nh
|
||
|
|
.SH NAME
|
||
|
|
serif::equations::BarotropicClosure< EOST >
|
||
|
|
.SH SYNOPSIS
|
||
|
|
.br
|
||
|
|
.PP
|
||
|
|
.PP
|
||
|
|
\fR#include <barotropic_closure\&.hpp>\fP
|
||
|
|
.SS "Public Types"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "using \fBTest\fP = \fBdiscretization::blocks::density::mass\fP"
|
||
|
|
.br
|
||
|
|
.RI "The test type is the model density, which is the quantity being constrained by the barotropic closure\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "using \fBResidualQuantity\fP = \fBdimensions::MassDensity\fP"
|
||
|
|
.br
|
||
|
|
.RI "The residual quantity is the mass density, which is the difference between the model density and the density given by the equation of state\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "using \fBEnthalpy\fP = \fBdiscretization::blocks::enthalpy::specific\fP"
|
||
|
|
.br
|
||
|
|
.RI "The enthalpy type is the model specific enthalpy, which is the quantity being used to compute the density from the equation of state\&. Really this is just an alias\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "using \fBOperands\fP = \fButils::types::TypeList\fP<\fBdiscretization::forms::Operand\fP<\fBTest\fP>, \fBdiscretization::forms::Operand\fP<\fBEnthalpy\fP>>"
|
||
|
|
.br
|
||
|
|
.RI "The operand here is a pack of the model mass density and the model enthalpy\&. "
|
||
|
|
.in -1c
|
||
|
|
.SS "Public Member Functions"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "\fBBarotropicClosure\fP (EOST equation_of_state, const double enthalpy_power)"
|
||
|
|
.br
|
||
|
|
.RI "Construct a barotropic closure equation\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "\fBBarotropicClosure\fP (EOST equation_of_state)"
|
||
|
|
.br
|
||
|
|
.RI "Construct a barotropic closure equation for a polytropic equation of state\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "\fBPointLinearization\fP< \fBOperands\fP > \fBevaluate\fP (const \fBEquationPoint\fP< \fBOperands\fP > &point) const"
|
||
|
|
.br
|
||
|
|
.RI "Evaluate the barotropic closure equation point-wise integrand and its partial derivatives\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<typename OperandT> int \fBadditional_order\fP (OperandT, int) const"
|
||
|
|
.br
|
||
|
|
.RI "Return the additional quadrature order required for the barotropic closure equation\&. "
|
||
|
|
.in -1c
|
||
|
|
.SS "Static Public Attributes"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "static constexpr std::string_view \fBname\fP = 'barotropic closure'"
|
||
|
|
.br
|
||
|
|
.RI "Compile time name for the barotropic closure equation, used for debugging and logging\&. "
|
||
|
|
.in -1c
|
||
|
|
.SS "Private Attributes"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "EOST \fBm_eos\fP"
|
||
|
|
.br
|
||
|
|
.RI "The equation of state to use for the barotropic closure\&. (\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "double \fBm_enthalpy_power\fP"
|
||
|
|
.br
|
||
|
|
.RI "The power of the enthalpy to use for the quadrature\&. Must be positive and finite\&. This is only used if the \fBadditional_order\fP method is called\&. "
|
||
|
|
.in -1c
|
||
|
|
.SH "Detailed Description"
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST>
|
||
|
|
.br
|
||
|
|
class serif::equations::BarotropicClosure< EOST >"
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIEOST\fP The equation of state type, this must satisfy the BarotropicClosureEOS concept\&. The requires section below lays out what the BarotriopicClosureEOS concept requires\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
Requirements
|
||
|
|
.PD 0
|
||
|
|
.IP "\(bu" 2
|
||
|
|
The equation of state type must publish a valid Relation catalog
|
||
|
|
.IP "\(bu" 2
|
||
|
|
The equation of state type must implement all relations required by the catalog it publishes
|
||
|
|
.IP "\(bu" 2
|
||
|
|
The equation of state type must support the relation density from specific enthalpy
|
||
|
|
.IP "\(bu" 2
|
||
|
|
The equation of state type must support the partial deriviative density from specific enthalpy with respect to specific enthalpy
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.PP
|
||
|
|
In a barotropic model surfaces of constant pressure coincide with surfaces of constant density and constant specific enthalpy\&. The barotropic closure equation enforces that the density of the model argrees with the density of the the equation of state given the model specific enthalpy\&. Put another way, for a barotropic model, this equation is what enforces that the ethalpy and density must be consistent with each other and with the equation of state\&. The residual is given by $ \rho - \rho_{\text{EOS}}(h) $, where $ \rho $ is the model density, $ h $ is the model specific enthalpy\&.
|
||
|
|
|
||
|
|
.PP
|
||
|
|
The partial derivatives implemented are
|
||
|
|
.IP "\(bu" 2
|
||
|
|
$ \frac{\partial r}{\partial \rho} = 1 $
|
||
|
|
.IP "\(bu" 2
|
||
|
|
$ \frac{\partial \rho}{\partial h} = -\frac{\partial \rho_{\text{EOS}}(h)}{\partial h} $
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.PP
|
||
|
|
\fBNote\fP
|
||
|
|
.RS 4
|
||
|
|
The eos derivative is implemented by the \fBeos::partial_derivative\fP function and is up to the eos model to implement correctly\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SH "Member Typedef Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> using \fBserif::equations::BarotropicClosure\fP< EOST >::Enthalpy = \fBdiscretization::blocks::enthalpy::specific\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
The enthalpy type is the model specific enthalpy, which is the quantity being used to compute the density from the equation of state\&. Really this is just an alias\&.
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> using \fBserif::equations::BarotropicClosure\fP< EOST >::Operands = \fButils::types::TypeList\fP<\fBdiscretization::forms::Operand\fP<\fBTest\fP>, \fBdiscretization::forms::Operand\fP<\fBEnthalpy\fP>>"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
The operand here is a pack of the model mass density and the model enthalpy\&.
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> using \fBserif::equations::BarotropicClosure\fP< EOST >::ResidualQuantity = \fBdimensions::MassDensity\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
The residual quantity is the mass density, which is the difference between the model density and the density given by the equation of state\&.
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> using \fBserif::equations::BarotropicClosure\fP< EOST >::Test = \fBdiscretization::blocks::density::mass\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
The test type is the model density, which is the quantity being constrained by the barotropic closure\&.
|
||
|
|
.SH "Constructor & Destructor Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> \fBserif::equations::BarotropicClosure\fP< EOST >::BarotropicClosure (EOST equation_of_state, const double enthalpy_power)\fR [inline]\fP, \fR [explicit]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Construct a barotropic closure equation\&.
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIequation_of_state\fP The equation of state to use for the closure\&.
|
||
|
|
.br
|
||
|
|
\fIenthalpy_power\fP The power of the enthalpy to use for the quadrature\&. Must be positive and finite\&. This is only used if the \fBadditional_order\fP method is called\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBExceptions\fP
|
||
|
|
.RS 4
|
||
|
|
\fIstd::invalid_argument\fP If the enthalpy power is not positive and finite\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBTodo\fP
|
||
|
|
.RS 4
|
||
|
|
should we add a requires that the equation of state is the same as \fBeos::models::Polytrope\fP here?
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> \fBserif::equations::BarotropicClosure\fP< EOST >::BarotropicClosure (EOST equation_of_state)\fR [inline]\fP, \fR [explicit]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Construct a barotropic closure equation for a polytropic equation of state\&.
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIequation_of_state\fP The polytropic equation of state to use for the closure\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
Requirements
|
||
|
|
.PD 0
|
||
|
|
.IP "\(bu" 2
|
||
|
|
The equation of state type must be a polytropic equation of state\&.
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.PP
|
||
|
|
\fBNote\fP
|
||
|
|
.RS 4
|
||
|
|
This constructor is only available for polytropic equations of state\&. It uses the polytropic index as the enthalpy power\&.
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Generally this is the constructor that you should likely use\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SH "Member Function Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> template<typename OperandT> int \fBserif::equations::BarotropicClosure\fP< EOST >::additional_order (OperandT , int ) const\fR [inline]\fP, \fR [nodiscard]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Return the additional quadrature order required for the barotropic closure equation\&. The additional order is calculated as $ \text{order} = \text{density order} + 2 \times \text{position order} $, where the density order is the order of the functional space of the model density, and the position order is the order of the position functional space\&.
|
||
|
|
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIOperandT\fP The operand type for which to calculate the additional order\&. This is only used to determine if the operand is the enthalpy or not\&. If not enthalpy then the additional order is returned as 0\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIoperand\fP The operand type for which to calculate the additional order\&. This is only used to determine if the operand is the enthalpy or not\&. If not enthalpy then the additional order is returned as 0\&.
|
||
|
|
.br
|
||
|
|
\fIposition_order\fP The order of the position functional space\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
The additional quadrature order required for the barotropic closure equation\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBExceptions\fP
|
||
|
|
.RS 4
|
||
|
|
\fIstd::invalid_argument\fP If the extra order exceeds the supported range of int\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> \fBPointLinearization\fP< \fBOperands\fP > \fBserif::equations::BarotropicClosure\fP< EOST >::evaluate (const \fBEquationPoint\fP< \fBOperands\fP > & point) const\fR [inline]\fP, \fR [nodiscard]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Evaluate the barotropic closure equation point-wise integrand and its partial derivatives\&. The point-wise integrand is calculated as $ \rho - \rho_{\text{EOS}}(h) $, where $ \rho $ is the model density, and $ h $ is the model specific enthalpy\&. The partial derivatives are calculated as:
|
||
|
|
.IP "\(bu" 2
|
||
|
|
$ \frac{\partial r}{\partial \rho} = 1 $
|
||
|
|
.IP "\(bu" 2
|
||
|
|
$ \frac{\partial \rho}{\partial h} = -\frac{\partial \rho_{\text{EOS}}(h)}{\partial h} $
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIpoint\fP The point at which to evaluate the equation\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
The point-wise linearization of the barotropic closure equation, which contains the residual and the partial derivatives with respect to the model density and enthalpy\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBExceptions\fP
|
||
|
|
.RS 4
|
||
|
|
\fI\fBeos::EOSEvaluationError\fP\fP If the density or enthalpy are not finite, or if the enthalpy is negative, or if the equation of state returns a non-finite density or derivative\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SH "Member Data Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> double \fBserif::equations::BarotropicClosure\fP< EOST >::m_enthalpy_power\fR [private]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
The power of the enthalpy to use for the quadrature\&. Must be positive and finite\&. This is only used if the \fBadditional_order\fP method is called\&.
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> EOST \fBserif::equations::BarotropicClosure\fP< EOST >::m_eos\fR [private]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
The equation of state to use for the barotropic closure\&. (\&.
|
||
|
|
.PP
|
||
|
|
\fBTodo\fP
|
||
|
|
.RS 4
|
||
|
|
should this be a reference?)
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<eos::models::BarotropicClosureEOS EOST> std::string_view \fBserif::equations::BarotropicClosure\fP< EOST >::name = 'barotropic closure'\fR [static]\fP, \fR [constexpr]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Compile time name for the barotropic closure equation, used for debugging and logging\&.
|
||
|
|
|
||
|
|
.SH "Author"
|
||
|
|
.PP
|
||
|
|
Generated automatically by Doxygen for SERiF from the source code\&.
|