![]() |
ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
|
#include <include/ryujin/euler_aeos/hyperbolic_system.h>
Public Member Functions | |
Constructor and setup | |
| HyperbolicSystemView (const HyperbolicSystem &hyperbolic_system) | |
Access to runtime parameters | |
| DEAL_II_ALWAYS_INLINE const std::string & | equation_of_state () const |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber | reference_density () const |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber | vacuum_state_relaxation_small () const |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber | vacuum_state_relaxation_large () const |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE bool | compute_strict_bounds () const |
Low-level access to the selected equation of state | |
| |
| DEAL_II_ALWAYS_INLINE Number | eos_pressure (const Number &rho, const Number &e) const |
| DEAL_II_ALWAYS_INLINE Number | eos_specific_internal_energy (const Number &rho, const Number &p) const |
| DEAL_II_ALWAYS_INLINE Number | eos_specific_entropy (const Number &rho, const Number &e) const |
| DEAL_II_ALWAYS_INLINE Number | eos_cold_curve_bound (const Number &rho) const |
| DEAL_II_ALWAYS_INLINE Number | eos_temperature (const Number &rho, const Number &e) const |
| DEAL_II_ALWAYS_INLINE Number | eos_speed_of_sound (const Number &rho, const Number &e) const |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber | eos_covolume_constant () const |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber | eos_interpolation_pinfty () const |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber | eos_interpolation_q () const |
Surrogate functions for computing various interpolatory | |
physical quantities that are needed for Riemann solver, indicator and limiter. | |
| DEAL_II_HOST_DEVICE Number | surrogate_specific_entropy (const state_type &U, const Number &gamma_min) const |
| DEAL_II_HOST_DEVICE Number | surrogate_harten_entropy (const state_type &U, const Number &gamma_min) const |
| DEAL_II_HOST_DEVICE state_type | surrogate_harten_entropy_derivative (const state_type &U, const Number &eta, const Number &gamma_min) const |
| DEAL_II_HOST_DEVICE Number | surrogate_gamma (const state_type &U, const Number &p) const |
| DEAL_II_HOST_DEVICE Number | surrogate_pressure (const state_type &U, const Number &gamma) const |
| DEAL_II_HOST_DEVICE Number | surrogate_speed_of_sound (const state_type &U, const Number &gamma) const |
| DEAL_II_HOST_DEVICE bool | is_admissible (const state_type &U) const |
Special functions for boundary states | |
| template<int component> | |
| DEAL_II_HOST_DEVICE state_type | prescribe_riemann_characteristic (const state_type &U, const Number &p, const state_type &U_bar, const Number &p_bar, const dealii::Tensor< 1, dim, Number > &normal) const |
| template<typename Lambda > | |
| state_type | apply_boundary_conditions (const dealii::types::boundary_id id, const state_type &U, const dealii::Tensor< 1, dim, Number > &normal, const Lambda &get_dirichlet_data) const |
State transformations | |
| template<typename ST > | |
| DEAL_II_HOST_DEVICE state_type | expand_state (const ST &state) const |
| template<typename ST > | |
| state_type | from_initial_state (const ST &initial_state) const |
| DEAL_II_HOST_DEVICE state_type | from_primitive_state (const state_type &primitive_state) const |
| DEAL_II_HOST_DEVICE state_type | to_primitive_state (const state_type &state) const |
| template<typename Lambda > | |
| DEAL_II_HOST_DEVICE state_type | apply_galilei_transform (const state_type &state, const Lambda &lambda) const |
Static Public Attributes | |
Constexpr booleans used in the EulerInitialStates namespace | |
| static constexpr bool | have_gamma = false |
| static constexpr bool | have_covolume_constant = true |
| static constexpr bool | have_energy_equation = true |
Typedefs and constexpr constants | |
| using | ScalarNumber = typename get_value_type< Number >::type |
| using | state_type = dealii::Tensor< 1, problem_dimension, Number > |
| using | flux_type = dealii::Tensor< 1, problem_dimension, dealii::Tensor< 1, dim, Number > > |
| using | flux_contribution_type = flux_type |
| using | precomputed_type = std::array< Number, n_precomputed_values > |
| using | initial_precomputed_type = std::array< Number, n_initial_precomputed_values > |
| template<int n_comp> | |
| using | VectorView = MultiComponentVectorView< ScalarNumber, n_comp, MemorySpace, false > |
| using | PrecomputedVectorView = VectorView< n_precomputed_values > |
| using | InitialPrecomputedVectorView = VectorView< n_initial_precomputed_values > |
| static constexpr unsigned int | problem_dimension = 2 + dim |
| static constexpr unsigned int | n_precomputed_values = 4 |
| static constexpr unsigned int | n_initial_precomputed_values = 0 |
Flux computations | |
| static constexpr bool | have_high_order_flux = false |
| DEAL_II_HOST_DEVICE flux_type | f (const state_type &U, const Number &p) const |
| DEAL_II_HOST_DEVICE flux_contribution_type | flux_contribution (const PrecomputedVectorView &pv, const InitialPrecomputedVectorView &piv, const unsigned int i, const state_type &U_i) const |
| DEAL_II_HOST_DEVICE flux_contribution_type | flux_contribution (const PrecomputedVectorView &pv, const InitialPrecomputedVectorView &piv, const unsigned int *js, const state_type &U_j) const |
| DEAL_II_HOST_DEVICE state_type | flux_divergence (const flux_contribution_type &flux_i, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &c_ij) const |
| DEAL_II_HOST_DEVICE state_type | high_order_flux_divergence (const flux_contribution_type &flux_i, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &c_ij) const =delete |
Computing stencil source terms | |
| static constexpr bool | have_source_terms = false |
| DEAL_II_HOST_DEVICE state_type | nodal_source (const PrecomputedVectorView &pv, const unsigned int i, const state_type &U_i, const ScalarNumber tau) const =delete |
| DEAL_II_HOST_DEVICE state_type | nodal_source (const PrecomputedVectorView &pv, const unsigned int *js, const state_type &U_j, const ScalarNumber tau) const =delete |
Computing derived physical quantities | |
| DEAL_II_HOST_DEVICE Number | filter_vacuum_density (const Number &rho) const |
| static DEAL_II_HOST_DEVICE Number | density (const state_type &U) |
| static DEAL_II_HOST_DEVICE dealii::Tensor< 1, dim, Number > | momentum (const state_type &U) |
| static DEAL_II_HOST_DEVICE Number | total_energy (const state_type &U) |
| static DEAL_II_HOST_DEVICE Number | internal_energy (const state_type &U) |
| static DEAL_II_HOST_DEVICE state_type | internal_energy_derivative (const state_type &U) |
A view of the HyperbolicSystem that makes methods available for a given dimension dim and choice of number type Number (which can be a scalar float, or double, as well as a VectorizedArray holding packed scalars.
Intended usage:
Definition at line 187 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::ScalarNumber = typename get_value_type<Number>::type |
The underlying scalar number type.
Definition at line 203 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::state_type = dealii::Tensor<1, problem_dimension, Number> |
Storage type for a (conserved) state vector \(\boldsymbol U\).
Definition at line 213 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::flux_type = dealii::Tensor<1, problem_dimension, dealii::Tensor<1, dim, Number> > |
Storage type for the flux \(\mathbf{f}\).
Definition at line 218 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::flux_contribution_type = flux_type |
The storage type used for flux contributions.
Definition at line 224 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::precomputed_type = std::array<Number, n_precomputed_values> |
Array type used for precomputed values.
Definition at line 234 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::initial_precomputed_type = std::array<Number, n_initial_precomputed_values> |
Array type used for precomputed initial values.
Definition at line 244 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::VectorView = MultiComponentVectorView<ScalarNumber, n_comp, MemorySpace, false> |
Definition at line 248 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::PrecomputedVectorView = VectorView<n_precomputed_values> |
MulticomponentVectorView for accessing a vector of precomputed states:
Definition at line 255 of file hyperbolic_system.h.
| using ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::InitialPrecomputedVectorView = VectorView<n_initial_precomputed_values> |
MulticomponentVectorView for accessing a vector of precomputed initial states:
Definition at line 261 of file hyperbolic_system.h.
|
inline |
Constructor taking a reference to the underlying HyperbolicSystem
Definition at line 274 of file hyperbolic_system.h.
|
inline |
Return the name of the selected equation of state.
Definition at line 292 of file hyperbolic_system.h.
|
inline |
Definition at line 297 of file hyperbolic_system.h.
References ryujin::EulerAEOS::HyperbolicSystem::Parameters::reference_density.
|
inline |
Definition at line 303 of file hyperbolic_system.h.
References ryujin::EulerAEOS::HyperbolicSystem::Parameters::vacuum_state_relaxation_small.
|
inline |
Definition at line 309 of file hyperbolic_system.h.
References ryujin::EulerAEOS::HyperbolicSystem::Parameters::vacuum_state_relaxation_large.
|
inline |
Definition at line 314 of file hyperbolic_system.h.
References ryujin::EulerAEOS::HyperbolicSystem::Parameters::compute_strict_bounds.
|
inline |
For a given density \(\rho\) and specific internal energy \(e\) return the pressure \(p\).
Definition at line 335 of file hyperbolic_system.h.
|
inline |
For a given density \(\rho\) and pressure \(p\) return the specific internal energy \(e\).
Definition at line 356 of file hyperbolic_system.h.
|
inline |
For a given density \(\rho\) and specific internal energy \(e\) return the specific entropy \(s\).
Definition at line 376 of file hyperbolic_system.h.
|
inline |
For a given density \(\rho\) return the cold curve bound \(e\ge e_{s_0}(\rho)\).
Definition at line 396 of file hyperbolic_system.h.
|
inline |
For a given density \(\rho\) and specific internal energy \(e\) return the temperature \(T\).
Definition at line 415 of file hyperbolic_system.h.
|
inline |
For a given density \(\rho\) and specific internal energy \(e\) return the sound speed \(a\).
Definition at line 436 of file hyperbolic_system.h.
|
inline |
Return the interpolatory covolume \(b_{\text{interp}}\).
Definition at line 455 of file hyperbolic_system.h.
References ryujin::EulerAEOS::HyperbolicSystem::Parameters::covolume_constant.
|
inline |
Return the interpolatory reference pressure \(p_{\infty}\).
Definition at line 464 of file hyperbolic_system.h.
References ryujin::EulerAEOS::HyperbolicSystem::Parameters::interpolation_pinfty.
|
inline |
Return the interpolatory reference specific internal energy \(q\).
Definition at line 473 of file hyperbolic_system.h.
References ryujin::EulerAEOS::HyperbolicSystem::Parameters::interpolation_q.
|
static |
For a given (2+dim dimensional) state vector U, return the density U[0]
Definition at line 1107 of file hyperbolic_system.h.
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::filter_vacuum_density | ( | const Number & | rho | ) | const |
Given a density rho this function returns 0 if the magniatude of rho is smaller or equal than relaxation_large * rho_cutoff. Otherwise rho is returned unmodified. Here, rho_cutoff is the reference density multiplied by eps.
Definition at line 1115 of file hyperbolic_system.h.
|
static |
For a given (2+dim dimensional) state vector U, return the momentum vector [U[1], ..., U[1+dim]].
Definition at line 1129 of file hyperbolic_system.h.
|
static |
For a given (2+dim dimensional) state vector U, return the total energy U[1+dim]
Definition at line 1141 of file hyperbolic_system.h.
|
static |
For a given (2+dim dimensional) state vector U, compute and return the internal energy \(\varepsilon = (\rho e)\).
Definition at line 1150 of file hyperbolic_system.h.
|
static |
For a given (2+dim dimensional) state vector U, compute and return the derivative of the internal energy \(\varepsilon = (\rho e)\).
Definition at line 1165 of file hyperbolic_system.h.
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::surrogate_specific_entropy | ( | const state_type & | U, |
| const Number & | gamma_min | ||
| ) | const |
For a given (2+dim dimensional) state vector U, compute and return a (scaled) surrogate specific entropy
\[ e^{(\gamma_{\text{min}} - 1)s} = \frac{\rho\,(e-q)-p_{\infty}(1-b\rho)}{\rho^\gamma_{\text{min}}} (1 - b\,\rho)^{\gamma_{\text{min}} -1}. \]
Definition at line 1192 of file hyperbolic_system.h.
References ryujin::pow().
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::surrogate_harten_entropy | ( | const state_type & | U, |
| const Number & | gamma_min | ||
| ) | const |
For a given (2+dim dimensional) state vector U, compute and return a surrogate Harten-type entropy
\[ \eta = (1-b\,\rho)^{\frac{\gamma_{\text{min}-1}}{\gamma_{\text{min}}+1}} \big(\rho^2 (e-q) - \rho p_{\infty}(1-b\,\rho)\big) ^{1/(\gamma_{\text{min}}+1)} \]
Definition at line 1212 of file hyperbolic_system.h.
References ryujin::positive_part(), and ryujin::pow().
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::surrogate_harten_entropy_derivative | ( | const state_type & | U, |
| const Number & | eta, | ||
| const Number & | gamma_min | ||
| ) | const |
For a given (2+dim dimensional) state vector U, compute and return the derivative \(\eta'\) of the Harten-type entropy
\[ \eta = (1-b\,\rho)^{\frac{\gamma_{\text{min}-1}}{\gamma_{\text{min}}+1}} \big(\rho^2 (e-q) - \rho p_{\infty}(1-b\,\rho)\big) ^{1/(\gamma_{\text{min}}+1)} \]
Definition at line 1239 of file hyperbolic_system.h.
References ryujin::pow(), and ryujin::safe_division().
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::surrogate_gamma | ( | const state_type & | U, |
| const Number & | p | ||
| ) | const |
For a given (2+dim dimensional) state vector U and pressure p, compute a surrogate gamma:
\[ \gamma(\rho, e, p) = 1 + \frac{(p + p_{\infty})(1 - b \rho)} {\rho (e-q) - p_{\infty}(1-b \rho)} \]
This function is used in various places to create interpolations of the pressure.
Definition at line 1297 of file hyperbolic_system.h.
References ryujin::safe_division().
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::surrogate_pressure | ( | const state_type & | U, |
| const Number & | gamma | ||
| ) | const |
For a given (2+dim dimensional) state vector U and gamma gamma, compute a surrogate pressure:
\[ p(\rho, e, \gamma) = (\gamma - 1) \frac{\rho (e - q)}{1 - b \rho} -\gamma\,p_{\infty} \]
This function is the complementary function to surrogate_gamma(), meaning the following property holds true:
Definition at line 1316 of file hyperbolic_system.h.
References ryujin::positive_part(), and ryujin::safe_division().
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::surrogate_speed_of_sound | ( | const state_type & | U, |
| const Number & | gamma | ||
| ) | const |
For a given (2+dim dimensional) state vector U and gamma gamma, compute a surrogate speed of sound:
\begin{align} c^2(\rho, e, \gamma) = \frac{\gamma (p + p_\infty)}{\rho X} = \frac{\gamma (\gamma -1)[\rho (e - q) - p_\infty X]}{\rho X^2} \end{align}
Definition at line 1335 of file hyperbolic_system.h.
References ryujin::positive_part().
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE bool ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::is_admissible | ( | const state_type & | U | ) | const |
Returns whether the state U is admissible. If U is a vectorized state then U is admissible if all vectorized values are admissible.
Definition at line 1355 of file hyperbolic_system.h.
| DEAL_II_HOST_DEVICE state_type ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::prescribe_riemann_characteristic | ( | const state_type & | U, |
| const Number & | p, | ||
| const state_type & | U_bar, | ||
| const Number & | p_bar, | ||
| const dealii::Tensor< 1, dim, Number > & | normal | ||
| ) | const |
Decomposes a given state U into Riemann invariants and then replaces the first or second Riemann characteristic from the one taken from U_bar state. Note that the U_bar state is just the prescribed dirichlet values.
| state_type ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::apply_boundary_conditions | ( | const dealii::types::boundary_id | id, |
| const state_type & | U, | ||
| const dealii::Tensor< 1, dim, Number > & | normal, | ||
| const Lambda & | get_dirichlet_data | ||
| ) | const |
Apply boundary conditions.
For the compressible Euler equations we have:
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::f | ( | const state_type & | U, |
| const Number & | p | ||
| ) | const |
Given a state U and a pressure p compute the flux
\[ \begin{pmatrix} \textbf m \\ \textbf v\otimes \textbf m + p\mathbb{I}_d \\ \textbf v(E+p) \end{pmatrix}, \]
Definition at line 1662 of file hyperbolic_system.h.
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::flux_contribution | ( | const PrecomputedVectorView & | pv, |
| const InitialPrecomputedVectorView & | piv, | ||
| const unsigned int | i, | ||
| const state_type & | U_i | ||
| ) | const |
Given a state U_i and an index i compute flux contributions.
Intended usage:
For the Euler equations we simply compute f(U_i).
Definition at line 1685 of file hyperbolic_system.h.
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::flux_contribution | ( | const PrecomputedVectorView & | pv, |
| const InitialPrecomputedVectorView & | piv, | ||
| const unsigned int * | js, | ||
| const state_type & | U_j | ||
| ) | const |
Definition at line 1699 of file hyperbolic_system.h.
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::flux_divergence | ( | const flux_contribution_type & | flux_i, |
| const flux_contribution_type & | flux_j, | ||
| const dealii::Tensor< 1, dim, Number > & | c_ij | ||
| ) | const |
Given flux contributions flux_i and flux_j compute the flux (-f(U_i) - f(U_j)
Definition at line 1713 of file hyperbolic_system.h.
References ryujin::add(), and ryujin::contract().
|
delete |
|
delete |
|
delete |
| DEAL_II_HOST_DEVICE state_type ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::expand_state | ( | const ST & | state | ) | const |
Given a state vector associated with a different spatial dimensions than the current one, return an "expanded" version of the state vector associated with dim spatial dimensions where the momentum vector of the conserved state state is expaned with zeros to a total length of dim entries.
| state_type ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::from_initial_state | ( | const ST & | initial_state | ) | const |
Given an initial state [rho, u_1, ..., u_d, p] return a conserved state [rho, m_1, ..., m_d, E]. Most notably, the specific equation of state oracle is queried to convert the pressure value into a specific internal energy.
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::from_primitive_state | ( | const state_type & | primitive_state | ) | const |
Given a primitive state [rho, u_1, ..., u_d, e] return a conserved state.
Definition at line 1766 of file hyperbolic_system.h.
References ryujin::state.
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::to_primitive_state | ( | const state_type & | state | ) | const |
Given a conserved state return a primitive state [rho, u_1, ..., u_d, e]
Definition at line 1789 of file hyperbolic_system.h.
References ryujin::state.
| DEAL_II_HOST_DEVICE state_type ryujin::EulerAEOS::HyperbolicSystemView< dim, Number, MemorySpace >::apply_galilei_transform | ( | const state_type & | state, |
| const Lambda & | lambda | ||
| ) | const |
Transform the current state according to a given operator lambda acting on a dim dimensional momentum (or velocity) vector.
|
staticconstexpr |
The dimension of the state space.
Definition at line 208 of file hyperbolic_system.h.
|
staticconstexpr |
The number of precomputed values.
Definition at line 229 of file hyperbolic_system.h.
|
staticconstexpr |
The number of precomputed initial values.
Definition at line 239 of file hyperbolic_system.h.
|
staticconstexpr |
Definition at line 484 of file hyperbolic_system.h.
|
staticconstexpr |
Definition at line 485 of file hyperbolic_system.h.
|
staticconstexpr |
Definition at line 486 of file hyperbolic_system.h.
|
staticconstexpr |
The low-order and high-order fluxes are the same:
Definition at line 747 of file hyperbolic_system.h.
|
staticconstexpr |
We do not have source terms
Definition at line 762 of file hyperbolic_system.h.