SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::equations::GravityForce Class Reference

The gravitational force contribution to the mechanical balance equation. More...

#include <gravity_force.hpp>

Inheritance diagram for serif::equations::GravityForce:
[legend]
Collaboration diagram for serif::equations::GravityForce:
[legend]

Public Types

using Density = discretization::blocks::density::mass
 The density type is the model's mass density,.
 
using Gradient = discretization::blocks::gravity::gradient
 The gradient type is the model's negative gravitational acceleration (see class comment for why this is negative).
 
using DensityValue = discretization::forms::Operand<Density>
 The density value type is a density Operand.
 
using GradientValue = discretization::forms::Operand<Gradient>
 The gradient value type is a gradient Operand.
 
using Operands = utils::types::TypeList<DensityValue, GradientValue>
 The operands for this equation are the density and gradient operands.
 
using Result = discretization::forms::VectorValue
 This equation's results are vector valued.
 
- Public Types inherited from serif::equations::Contribution< discretization::forms::Operand< discretization::blocks::displacement::vector >, discretization::domain::StellarDomains >
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)
 

Static Public Member Functions

static PointLinearization< Operands, Result > evaluate (const EquationPoint< Operands > &point)
 Evaluate the gravitational force equation at a given point.
 
template<typename OperandT>
static int additional_order (OperandT, int)
 Return the additional quadrature order required for the gravitational force equation. We add one to the registered order of the gradient functional space to satisfy the InfSup condition for the density operand (which is in L2)
 

Static Public Attributes

static constexpr std::string_view name = "gravitational force"
 Compile time name for the gravitational force equation, used for debugging and logging.
 

Detailed Description

The gravitational force contribution to the mechanical balance equation.

Equation Contributions
  • Residuals to the global displacement vector supported on the stellar domain.
Note
The gravitational force is given by \( \mathbf{F} = \rho \mathbf{g} \), where \( \rho \) is the mass density and \( \mathbf{g} \) is the gravitational acceleration. The residual is given by the difference between the model gravitational force and the gravitational force given by the equation of state. The partial derivatives implemented are:
  • \( \frac{\partial F}{\partial \rho} = g \)
  • \( \frac{\partial F}{\partial g} = \rho I \)
For some reason which only past me can fathom I adopted \( \mathbf{g} = \nabla \Phi \) rather than \( \mathbf{g} = -\nabla \Phi \). The implication of this is that acceleration is \( -\mathbf{g} \). We may want to change this but we will need to be careful.
The reason is actually completely fathomable: I just didn't think. Carry on now.
You know I've written, over the last year about 60k lines of code for this project, much of it deleted and rewritten multiple time. I am going through now and adding comments to this version which I am finally happy with. In doing so I suspect that a reader can see the slow(ish?) deterioration of my mental state as these comments get more and more conversational. I wonder if anyone will have anything to say about this or if it will simply become some marginal curiosity buried in the docs. I suspect the former, though I am not so selfless as to not hope for the latter.

Member Typedef Documentation

◆ Density

The density type is the model's mass density,.

◆ DensityValue

The density value type is a density Operand.

◆ Gradient

The gradient type is the model's negative gravitational acceleration (see class comment for why this is negative).

◆ GradientValue

The gradient value type is a gradient Operand.

◆ Operands

The operands for this equation are the density and gradient operands.

◆ Result

This equation's results are vector valued.

Member Function Documentation

◆ additional_order()

template<typename OperandT>
static int serif::equations::GravityForce::additional_order ( OperandT ,
int  )
inlinestaticnodiscard

Return the additional quadrature order required for the gravitational force equation. We add one to the registered order of the gradient functional space to satisfy the InfSup condition for the density operand (which is in L2)

Parameters
operandThe operand for which to determine the additional quadrature order.
position_orderThe order of the position operand, which is not used in this implementation.
Returns
The additional quadrature order required for the given operand.

This function returns the additional quadrature order required for the gravitational force equation. For the density operand, it returns the order of the gradient functional space plus one. For other operands, it returns the order of the density functional space.

◆ evaluate()

static PointLinearization< Operands, Result > serif::equations::GravityForce::evaluate ( const EquationPoint< Operands > & point)
inlinestaticnodiscard

Evaluate the gravitational force equation at a given point.

Parameters
pointThe point at which to evaluate the gravitational force equation.
Returns
A PointLinearization object containing the residual and field derivatives for the gravitational force equation at the given point.

This function evaluates

  • \( F = \rho g \)
  • \( \frac{\partial F}{\partial \rho} = g \)
  • \( \frac{\partial F}{\partial g} = \rho I \)

Member Data Documentation

◆ name

std::string_view serif::equations::GravityForce::name = "gravitational force"
staticconstexpr

Compile time name for the gravitational force equation, used for debugging and logging.


The documentation for this class was generated from the following file: