|
SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
|
Prescribe central density through the continuous enthalpy: \(h(0) - h_{EOS}(\rho_c) = 0\). Generally this is not needed; however, in the particular case of an n=3 polytrope with no rotation the central density becomes ill-defined and must be prescribed to avoid a singularity in the solution. Note that this equation is not responsible for sorting out what point is the center of the star; rather, this is provided to the evaluate method. More...
#include <central_density.hpp>
Public Types | |
| using | Operands = utils::types::TypeList<TestOperand> |
| The operand types of the equation, that is the types of the fields which are used to evaluate the equation. | |
| using | Border = discretization::blocks::central_density::border |
| The border type of the equation, that is what row of the global system this equation contributes to. | |
| using | ResidualQuantity = dimensions::SpecificEnthalpy |
| The physical quantity which is being constrained by this equation, that is the quantity which is being set to a target value. | |
Public Types inherited from serif::equations::Contribution< discretization::forms::Operand< discretization::blocks::enthalpy::specific > > | |
| 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 | |
| CentralDensityConstraint (EOST equation_of_state, dimensions::DensityValue target_density) | |
| Construct a central density constraint. | |
| PointLinearization< Operands > | evaluate (const EquationPoint< Operands > &point) const |
| Evaluate the central density constraint at a given point. | |
| dimensions::DensityValue | target_density () const noexcept |
| Return the prescribed central density. | |
| dimensions::SpecificEnthalpyValue | target_enthalpy () const noexcept |
| Return the target enthalpy corresponding to the prescribed central density. | |
| dimensions::DensityValue | density_from_enthalpy (dimensions::SpecificEnthalpyValue enthalpy) const |
| Convert some enthalpy to a density for physical diagnostics, when the inverse relation exists. | |
Static Public Attributes | |
| static constexpr std::string_view | name = "central density constraint" |
| Compile time name for the equation, used for debugging and logging. | |
| static constexpr bool | position_independent = true |
| Whether the equation is independent of the position of the point being evaluated, that is whether the equation is invariant under translations and rotations of the point. This is only used for compile-time checks. | |
| static constexpr bool | affine = true |
| Whether the equation is affine, that is whether the equation is linear in the fields being evaluated. This is only used for compile-time checks. | |
| static constexpr std::array< double, 3 > | reference_position {} |
| The reference position of the equation, this is only used for compile-time checks and is not used in the evaluation of the equation. | |
Private Attributes | |
| EOST | m_eos |
| The EOS model to use for evaluating the enthalpy from the prescribed density. | |
| dimensions::DensityValue | m_target_density |
| The prescribed central density, which must be finite and strictly positive. | |
| double | m_target_enthalpy |
| The target enthalpy corresponding to the prescribed central density, which is computed from the EOS and must be finite. | |
Prescribe central density through the continuous enthalpy: \(h(0) - h_{EOS}(\rho_c) = 0\). Generally this is not needed; however, in the particular case of an n=3 polytrope with no rotation the central density becomes ill-defined and must be prescribed to avoid a singularity in the solution. Note that this equation is not responsible for sorting out what point is the center of the star; rather, this is provided to the evaluate method.
| EOST | The EOS model type to use for evaluating the enthalpy from the prescribed density. |
| Requirements |
|---|
|
| Equation Contributions |
|---|
|
| std::invalid_argument | If the prescribed density is not finite and strictly positive. |
| std::domain_error | If the EOS returns a non-finite enthalpy for the prescribed density. |
| using serif::equations::CentralDensityConstraint< EOST >::Border = discretization::blocks::central_density::border |
The border type of the equation, that is what row of the global system this equation contributes to.
| using serif::equations::CentralDensityConstraint< EOST >::Operands = utils::types::TypeList<TestOperand> |
The operand types of the equation, that is the types of the fields which are used to evaluate the equation.
| using serif::equations::CentralDensityConstraint< EOST >::ResidualQuantity = dimensions::SpecificEnthalpy |
The physical quantity which is being constrained by this equation, that is the quantity which is being set to a target value.
|
inline |
Construct a central density constraint.
| equation_of_state | The EOS model to use for evaluating the enthalpy from the prescribed density. |
| target_density | The prescribed central density, which must be finite and strictly positive. |
| std::invalid_argument | If the prescribed density is not finite and strictly positive. |
| std::domain_error | If the EOS returns a non-finite enthalpy for the prescribed density. |
|
inlinenodiscard |
Convert some enthalpy to a density for physical diagnostics, when the inverse relation exists.
| enthalpy | The specific enthalpy to convert. |
| Requirements |
|---|
|
|
inlinenodiscard |
Evaluate the central density constraint at a given point.
| point | The point at which to evaluate the equation, which must be the center of the star. |
|
inlinenodiscardnoexcept |
Return the prescribed central density.
|
inlinenodiscardnoexcept |
Return the target enthalpy corresponding to the prescribed central density.
|
staticconstexpr |
Whether the equation is affine, that is whether the equation is linear in the fields being evaluated. This is only used for compile-time checks.
|
private |
The EOS model to use for evaluating the enthalpy from the prescribed density.
|
private |
The prescribed central density, which must be finite and strictly positive.
|
private |
The target enthalpy corresponding to the prescribed central density, which is computed from the EOS and must be finite.
|
staticconstexpr |
Compile time name for the equation, used for debugging and logging.
|
staticconstexpr |
Whether the equation is independent of the position of the point being evaluated, that is whether the equation is invariant under translations and rotations of the point. This is only used for compile-time checks.
|
staticconstexpr |
The reference position of the equation, this is only used for compile-time checks and is not used in the evaluation of the equation.