![]() |
ryujin 2.1.1 revision 9dcb748690310d6a540ebb8b066d1a0834fc7604
|
#include <source/navier_stokes/parabolic_solver.h>
Public Types | |
using | HyperbolicSystem = typename Description::HyperbolicSystem |
using | ParabolicSystem = typename Description::ParabolicSystem |
using | HyperbolicSystemView = typename HyperbolicSystem::template View< dim, Number > |
using | scalar_type = typename OfflineData< dim, Number >::scalar_type |
using | vector_type = typename HyperbolicSystemView::vector_type |
using | block_vector_type = dealii::LinearAlgebra::distributed::BlockVector< Number > |
Public Member Functions | |
ParabolicSolver (const MPI_Comm &mpi_communicator, std::map< std::string, dealii::Timer > &computing_timer, const HyperbolicSystem &hyperbolic_system, const ParabolicSystem ¶bolic_system, const OfflineData< dim, Number > &offline_data, const InitialValues< Description, dim, Number > &initial_values, const std::string &subsection="ParabolicSolver") | |
void | prepare () |
Functions for performing implicit time steps | |
void | crank_nicolson_step (const vector_type &old_U, const Number old_t, vector_type &new_U, Number tau, const IDViolationStrategy id_violation_strategy, const bool reinitialize_gmg) const |
void | print_solver_statistics (std::ostream &output) const |
Minimum entropy guaranteeing second-order 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 explicit second order Crank-Nicolson step updating the velocity [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+\frac{1}{2}} + \tfrac12 \dt\sum_{j\in\calI(i)} \polB_{ij} \bsfV^{n+\frac{1}{2}} = m_i \bsfM_i^{n} + \tfrac12 \dt m_i \bsfF_i^{n+\frac12}, & \forall i\in \calV\upint \\[0.3em] \bsfV_i^{n+\frac{1}{2}} = \boldsymbol 0, & \forall i\in \calV\upbnd, \end{cases} \end{align}
We then postprocess and compute an internal energy update with a second Crank-Nicolson step, [10], Eq. 5.13:
\begin{align} \newcommand\sfe{{\mathsf e}} \newcommand{\upHnph}{^{\text{H},n+\frac{1}{2}}} \newcommand{\calI}{{\mathcal I}} \newcommand\sfK{{\mathsf K}} \newcommand{\calV}{{\mathcal V}} m_i \varrho_i^{n}(\sfe_i{\upHnph} - \sfe_i^{n})+\tfrac12\dt \sum_{j\in\calI(i)} \beta_{ij}\sfe_i{\upHnph} = \tfrac12 \dt m_i\sfK_i^{n+\frac{1}{2}}, \qquad \forall i\in \calV. \end{align}
Definition at line 101 of file parabolic_solver.h.
using ryujin::NavierStokes::ParabolicSolver< Description, dim, Number >::HyperbolicSystem = typename Description::HyperbolicSystem |
Definition at line 107 of file parabolic_solver.h.
using ryujin::NavierStokes::ParabolicSolver< Description, dim, Number >::ParabolicSystem = typename Description::ParabolicSystem |
Definition at line 112 of file parabolic_solver.h.
using ryujin::NavierStokes::ParabolicSolver< Description, dim, Number >::HyperbolicSystemView = typename HyperbolicSystem::template View<dim, Number> |
Definition at line 117 of file parabolic_solver.h.
using ryujin::NavierStokes::ParabolicSolver< Description, dim, Number >::scalar_type = typename OfflineData<dim, Number>::scalar_type |
Shorthand typedef for dealii::LinearAlgebra::distributed::Vector<Number>.
Definition at line 123 of file parabolic_solver.h.
using ryujin::NavierStokes::ParabolicSolver< Description, dim, Number >::vector_type = typename HyperbolicSystemView::vector_type |
MulticomponentVector for storing a vector of conserved states:
Definition at line 128 of file parabolic_solver.h.
using ryujin::NavierStokes::ParabolicSolver< Description, dim, Number >::block_vector_type = dealii::LinearAlgebra::distributed::BlockVector<Number> |
A distributed block vector used for temporary storage of the velocity field.
Definition at line 134 of file parabolic_solver.h.
ryujin::NavierStokes::ParabolicSolver< Description, dim, Number >::ParabolicSolver | ( | const MPI_Comm & | mpi_communicator, |
std::map< std::string, dealii::Timer > & | computing_timer, | ||
const HyperbolicSystem & | hyperbolic_system, | ||
const ParabolicSystem & | parabolic_system, | ||
const OfflineData< dim, Number > & | offline_data, | ||
const InitialValues< Description, dim, Number > & | initial_values, | ||
const std::string & | subsection = "ParabolicSolver< Description, dim, Number >" |
||
) |
Constructor.
Definition at line 35 of file parabolic_solver.template.h.
void ryujin::NavierStokes::ParabolicSolver< Description, 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 126 of file parabolic_solver.template.h.
References ryujin::dirichlet, and ryujin::no_slip.
void ryujin::NavierStokes::ParabolicSolver< Description, dim, Number >::crank_nicolson_step | ( | const vector_type & | old_U, |
const Number | old_t, | ||
vector_type & | new_U, | ||
Number | tau, | ||
const IDViolationStrategy | id_violation_strategy, | ||
const bool | reinitialize_gmg | ||
) | const |
Given a reference to a previous state vector old_U
at time old_t
and a time-step size tau
perform an implicit Crank-Nicolson step (and store the result in new_U
).
Definition at line 208 of file parabolic_solver.template.h.
References CALLGRIND_START_INSTRUMENTATION, CALLGRIND_STOP_INSTRUMENTATION, ryujin::dirichlet, ryujin::NavierStokes::EnergyMatrix< dim, Number, Number2 >::initialize(), ryujin::NavierStokes::VelocityMatrix< dim, Number, Number2 >::initialize(), LIKWID_MARKER_START, LIKWID_MARKER_STOP, ryujin::negative_part(), ryujin::no_slip, ryujin::raise_exception, ryujin::NavierStokes::DiagonalMatrix< dim, Number >::reinit(), RYUJIN_OMP_FOR, RYUJIN_PARALLEL_REGION_BEGIN, RYUJIN_PARALLEL_REGION_END, ryujin::slip, and ryujin::warn.
void ryujin::NavierStokes::ParabolicSolver< Description, 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 872 of file parabolic_solver.template.h.