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

#include <include/ryujin/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< HyperbolicDescription, dim, Number > &initial_values, const std::string &subsection="ParabolicModule")
 
void prepare () override
 
Functions for performing explicit time steps
void reinit_state_vector (StateVector< Number > &) const override
 
void prepare_state_vector (StateVector< Number > &state_vector, Number t) const override
 
Number backward_euler_step (const StateVector< Number > &old_state_vector, StageVectors stage_state_vectors, StageWeights stage_weights, StateVector< Number > &new_state_vector, Number t, Number tau, Number tau_max=std::numeric_limits< Number >::max()) const override
 
Number crank_nicolson_step (const StateVector< Number > &old_state_vector, StateVector< Number > &new_state_vector, Number t, Number tau, Number tau_max=std::numeric_limits< Number >::max()) const override
 
Information and statistics
void print_solver_statistics (std::ostream &output) const override
 
Functions for performing implicit time steps

Typedefs and constexpr constants

using StageVectors = typename Interface::ParabolicModule< dim, Number >::StageVectors
 
using StageWeights = typename Interface::ParabolicModule< dim, Number >::StageWeights
 
using HyperbolicDescription = Euler::HyperbolicDescription
 
using HyperbolicSystem = Euler::HyperbolicSystem
 
using View = Euler::HyperbolicSystemView< dim, Number >
 
using ParabolicSystem = NavierStokes::ParabolicSystem
 
using BlockHostVector = dealii::LinearAlgebra::distributed::BlockVector< 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 [13], 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 [13], 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. [13], 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 [13] where the extrapolation step is performed on the primitive quantities (velocity and internal energy) instead of the conserved quantities.

Definition at line 116 of file parabolic_module.h.

Member Typedef Documentation

◆ StageVectors

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

Definition at line 124 of file parabolic_module.h.

◆ StageWeights

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

Definition at line 127 of file parabolic_module.h.

◆ HyperbolicDescription

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

Definition at line 130 of file parabolic_module.h.

◆ HyperbolicSystem

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

Definition at line 132 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 134 of file parabolic_module.h.

◆ ParabolicSystem

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

Definition at line 136 of file parabolic_module.h.

◆ BlockHostVector

template<int dim, typename Number = double>
using ryujin::NavierStokes::ParabolicModule< dim, Number >::BlockHostVector = dealii::LinearAlgebra::distributed::BlockVector<Number>

Definition at line 138 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 141 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 145 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< HyperbolicDescription, dim, Number > &  initial_values,
const std::string &  subsection = "ParabolicModule< dim, Number >" 
)

Constructor.

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

Member Function Documentation

◆ prepare()

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

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 123 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< Number > &  ) const
inlineoverride

(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 185 of file parabolic_module.h.

◆ prepare_state_vector()

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

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

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

◆ backward_euler_step()

template<int dim, typename Number >
Number ryujin::NavierStokes::ParabolicModule< dim, Number >::backward_euler_step ( const StateVector< Number > &  old_state_vector,
StageVectors  stage_state_vectors,
StageWeights  stage_weights,
StateVector< Number > &  new_state_vector,
Number  t,
Number  tau,
Number  tau_max = std::numeric_limits<Number>::max() 
) const
overridevirtual

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

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

Implements ryujin::Interface::ParabolicModule< dim, Number >.

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

◆ crank_nicolson_step()

template<int dim, typename Number >
Number ryujin::NavierStokes::ParabolicModule< dim, Number >::crank_nicolson_step ( const StateVector< Number > &  old_state_vector,
StateVector< Number > &  new_state_vector,
Number  t,
Number  tau,
Number  tau_max = std::numeric_limits<Number>::max() 
) const
overridevirtual

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

Implements ryujin::Interface::ParabolicModule< dim, Number >.

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

References ryujin::step.

◆ print_solver_statistics()

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

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

Definition at line 356 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 143 of file parabolic_module.h.


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