![]() |
ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
|
#include <source/navier_stokes/parabolic_module.h>


Public Member Functions | |
Constructor and setup | |
| ParabolicModule (const MPIEnsemble &mpi_ensemble, const OfflineData< dim, Number > &offline_data, const HyperbolicSystem &hyperbolic_system, const ParabolicSystem ¶bolic_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 |
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.
Definition at line 114 of file parabolic_module.h.
| using ryujin::NavierStokes::ParabolicModule< dim, Number >::HyperbolicSystem = Euler::HyperbolicSystem |
Definition at line 122 of file parabolic_module.h.
| using ryujin::NavierStokes::ParabolicModule< dim, Number >::View = Euler::HyperbolicSystemView<dim, Number> |
Definition at line 124 of file parabolic_module.h.
| using ryujin::NavierStokes::ParabolicModule< dim, Number >::ParabolicSystem = NavierStokes::ParabolicSystem |
Definition at line 126 of file parabolic_module.h.
| using ryujin::NavierStokes::ParabolicModule< dim, Number >::StateVector = typename View::StateVector |
Definition at line 128 of file parabolic_module.h.
| using ryujin::NavierStokes::ParabolicModule< dim, Number >::ScalarHostVector = Vectors::ScalarHostVector<Number> |
Definition at line 130 of file parabolic_module.h.
| using ryujin::NavierStokes::ParabolicModule< dim, Number >::BlockHostVector = Vectors::BlockHostVector<Number> |
Definition at line 132 of file parabolic_module.h.
| using ryujin::NavierStokes::ParabolicModule< dim, Number >::ScalarNumber = typename View::ScalarNumber |
Definition at line 134 of file parabolic_module.h.
| using ryujin::NavierStokes::ParabolicModule< dim, Number >::state_type = typename View::state_type |
Definition at line 138 of file parabolic_module.h.
| 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.
| 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.
|
inline |
(Re)initialize the parabolic state vector component of the state vector.
Definition at line 177 of file parabolic_module.h.
| 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.
| 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.
| 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.
|
inline |
Sets the invariant domain violation strategy.
Definition at line 220 of file parabolic_module.h.
| 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.
|
staticconstexpr |
Definition at line 136 of file parabolic_module.h.