ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
Loading...
Searching...
No Matches
List of all members
ryujin::NavierStokes::ParabolicModule< dim, Number > Class Template Referencefinal

#include <source/navier_stokes/parabolic_module.h>

Inheritance diagram for ryujin::NavierStokes::ParabolicModule< dim, Number >:
Inheritance graph
[legend]
Collaboration diagram for ryujin::NavierStokes::ParabolicModule< dim, Number >:
Collaboration graph
[legend]

Public Member Functions

Constructor and setup
 ParabolicModule (const MPIEnsemble &mpi_ensemble, const OfflineData< dim, Number > &offline_data, const HyperbolicSystem &hyperbolic_system, const ParabolicSystem &parabolic_system, const InitialValues< Description, dim, Number > &initial_values, const std::string &subsection="ParabolicModule")
 
void prepare ()
 
Functions for performing explicit time steps
void reinit_state_vector (StateVector &) const
 
void prepare_state_vector (StateVector &state_vector, Number t) const
 
template<int stages>
void backward_euler_step (const StateVector &old_state_vector, const Number old_t, std::array< std::reference_wrapper< const StateVector >, stages > stage_state_vectors, const std::array< Number, stages > stage_weights, StateVector &new_state_vector, Number tau) const
 
void crank_nicolson_step (const StateVector &old_state_vector, const Number old_t, StateVector &new_state_vector, Number tau) const
 
void set_id_violation_strategy (const IDViolationStrategy &strategy) const
 
Information and statistics
void print_solver_statistics (std::ostream &output) const
 

Typedefs and constexpr constants

using HyperbolicSystem = Euler::HyperbolicSystem
 
using View = Euler::HyperbolicSystemView< dim, Number >
 
using ParabolicSystem = NavierStokes::ParabolicSystem
 
using StateVector = typename View::StateVector
 
using ScalarHostVector = Vectors::ScalarHostVector< Number >
 
using BlockHostVector = Vectors::BlockHostVector< Number >
 
using ScalarNumber = typename View::ScalarNumber
 
using state_type = typename View::state_type
 
static constexpr auto problem_dimension = View::problem_dimension
 

Detailed Description

template<int dim, typename Number = double>
class ryujin::NavierStokes::ParabolicModule< dim, Number >

Implicit backward-Euler time stepping for the parabolic limiting equation [10], Eq. 3.3:

\begin{align} \newcommand{\bbm}{{\boldsymbol m}} \newcommand{\bef}{{\boldsymbol f}} \newcommand{\bk}{{\boldsymbol k}} \newcommand{\bu}{{\boldsymbol u}} \newcommand{\bv}{{\boldsymbol v}} \newcommand{\bn}{{\boldsymbol n}} \newcommand{\pols}{{\mathbb s}} \newcommand{\Hflux}{\bk} &\partial_t \rho = 0, \\ &\partial_t \bbm - \nabla\cdot(\pols(\bv)) = \bef, \\ &\partial_t E + \nabla\cdot(\Hflux(\bu)- \pols(\bv) \bv) = \bef\cdot\bv, \\ &\bv_{|\partial D}=\boldsymbol 0, \qquad \Hflux(\bu)\cdot\bn_{|\partial D}=0 . \end{align}

Internally, the module first performs an implicit backward Euler step updating the velocity (see [10], Eq. 5.5):

\begin{align} \begin{cases} \newcommand\bsfV{{\textbf V}} \newcommand{\polB}{{\mathbb B}} \newcommand{\calI}{{\mathcal I}} \newcommand\bsfF{{\textbf F}} \newcommand\bsfM{{\textbf M}} \newcommand{\upint}{^\circ} \newcommand{\upbnd}{^\partial} \newcommand{\dt}{{\tau}} \newcommand{\calV}{{\mathcal V}} \varrho^{n}_i m_i \bsfV^{n+1} + \dt\sum_{j\in\calI(i)} \polB_{ij} \bsfV^{n+1} = m_i \bsfM_i^{n} + \dt m_i \bsfF_i^{n+1}, & \forall i\in \calV\upint \\[0.3em] \bsfV_i^{n+1} = \boldsymbol 0, & \forall i\in \calV\upbnd, \end{cases} \end{align}

We then postprocess and compute an internal energy update with an additional backward Euler step, (cf. [10], Eq. 5.13)

\begin{align} \newcommand\bsfV{{\textbf V}} \newcommand\sfe{{\mathsf e}} \newcommand{\upHnph}{^{\text{H},n+1}} \newcommand{\calI}{{\mathcal I}} \newcommand\sfK{{\mathsf K}} \newcommand{\calV}{{\mathcal V}} m_i \varrho_i^{n}(\sfe_i{\upHnph} - \sfe_i^{n})+\dt \sum_{j\in\calI(i)} \beta_{ij}\sfe_i{\upHnph} = \tfrac12 m_i\|\bsfV^{n+1}-\bsfV^{n}\|^2 + \dt m_i\sfK_i^{n+1}, \qquad \forall i\in \calV. \end{align}

The result is then transformed back into conserved quantities and written to the output vector.

Note
The backward Euler scheme is a fundamental building block for higher-order time stepping, including the well-known Crank-Nicolson scheme. The latter can be expressed algebraically as a backward Euler step (from time \(t\) to \(t+\tau\) followed by an extrapolation step \(U^{n+2}=2U^{n+1}-U^{n}\) from time \(t+\tau\) to \(t+2\tau\)). This approach differs from the Crank-Nicolson scheme discussed in [10] where the extrapolation step is performed on the primitive quantities (velocity and internal energy) instead of the conserved quantities.

Definition at line 114 of file parabolic_module.h.

Member Typedef Documentation

◆ HyperbolicSystem

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::HyperbolicSystem = Euler::HyperbolicSystem

Definition at line 122 of file parabolic_module.h.

◆ View

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::View = Euler::HyperbolicSystemView<dim, Number>

Definition at line 124 of file parabolic_module.h.

◆ ParabolicSystem

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::ParabolicSystem = NavierStokes::ParabolicSystem

Definition at line 126 of file parabolic_module.h.

◆ StateVector

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::StateVector = typename View::StateVector

Definition at line 128 of file parabolic_module.h.

◆ ScalarHostVector

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::ScalarHostVector = Vectors::ScalarHostVector<Number>

Definition at line 130 of file parabolic_module.h.

◆ BlockHostVector

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::BlockHostVector = Vectors::BlockHostVector<Number>

Definition at line 132 of file parabolic_module.h.

◆ ScalarNumber

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::ScalarNumber = typename View::ScalarNumber

Definition at line 134 of file parabolic_module.h.

◆ state_type

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::state_type = typename View::state_type

Definition at line 138 of file parabolic_module.h.

Constructor & Destructor Documentation

◆ ParabolicModule()

template<int dim, typename Number >
ryujin::NavierStokes::ParabolicModule< dim, Number >::ParabolicModule ( const MPIEnsemble mpi_ensemble,
const OfflineData< dim, Number > &  offline_data,
const HyperbolicSystem hyperbolic_system,
const ParabolicSystem parabolic_system,
const InitialValues< Description, dim, Number > &  initial_values,
const std::string &  subsection = "ParabolicModule< dim, Number >" 
)

Constructor.

Definition at line 33 of file parabolic_module.template.h.

Member Function Documentation

◆ prepare()

template<int dim, typename Number >
void ryujin::NavierStokes::ParabolicModule< dim, Number >::prepare ( )

Prepare time stepping. A call to prepare() allocates temporary storage and is necessary before any of the following time-stepping functions can be called.

Definition at line 125 of file parabolic_module.template.h.

References ryujin::cg_q1, ryujin::dirichlet, and ryujin::no_slip.

◆ reinit_state_vector()

template<int dim, typename Number = double>
void ryujin::NavierStokes::ParabolicModule< dim, Number >::reinit_state_vector ( StateVector ) const
inline

(Re)initialize the parabolic state vector component of the state vector.

Note
This routine does not modify the hyperbolic state vector or the precomputed vector component.

Definition at line 177 of file parabolic_module.h.

◆ prepare_state_vector()

template<int dim, typename Number >
void ryujin::NavierStokes::ParabolicModule< dim, Number >::prepare_state_vector ( StateVector state_vector,
Number  t 
) const

Prepare the parabolic part of the state vector prior to a backward Euler or Crank Nicolson step.

Definition at line 224 of file parabolic_module.template.h.

◆ backward_euler_step()

template<int dim, typename Number >
template<int stages>
void ryujin::NavierStokes::ParabolicModule< dim, Number >::backward_euler_step ( const StateVector old_state_vector,
const Number  old_t,
std::array< std::reference_wrapper< const StateVector >, stages >  stage_state_vectors,
const std::array< Number, stages >  stage_weights,
StateVector new_state_vector,
Number  tau 
) const

Given a reference to a previous state vector old_U at time old_t and a time-step size tau perform an implicit backward euler step (and store the result in new_U).

The function takes an optional array of states stage_U together with a an array of weights stage_weights to construct a modified high-order right-hand side / flux.

Definition at line 236 of file parabolic_module.template.h.

◆ crank_nicolson_step()

template<int dim, typename Number >
void ryujin::NavierStokes::ParabolicModule< dim, Number >::crank_nicolson_step ( const StateVector old_state_vector,
const Number  old_t,
StateVector new_state_vector,
Number  tau 
) const

Given a reference to a previous state vector old_state_vector at time old_t and a time-step size tau perform an implicit Crank Nicolson step (and store the result in new_state_vector).

Definition at line 256 of file parabolic_module.template.h.

◆ set_id_violation_strategy()

template<int dim, typename Number = double>
void ryujin::NavierStokes::ParabolicModule< dim, Number >::set_id_violation_strategy ( const IDViolationStrategy strategy) const
inline

Sets the invariant domain violation strategy.

Definition at line 220 of file parabolic_module.h.

◆ print_solver_statistics()

template<int dim, typename Number >
void ryujin::NavierStokes::ParabolicModule< dim, Number >::print_solver_statistics ( std::ostream &  output) const

Print a status line with solver statistics. This function is used for constructing the status message displayed periodically in the TimeLoop.

Definition at line 289 of file parabolic_module.template.h.

Member Data Documentation

◆ problem_dimension

template<int dim, typename Number = double>
constexpr auto ryujin::NavierStokes::ParabolicModule< dim, Number >::problem_dimension = View::problem_dimension
staticconstexpr

Definition at line 136 of file parabolic_module.h.


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