Class template Dune::GDT::EulerTools

template<size_t d, class R = double>
class Dune::GDT::EulerTools

A collection of useful tools in the context of the Euler equations.

In paritcular, provides

conversion between primitive (physical) variables - density rho: R^d -> R - velocity v: R^d -> R^d - pressure p: R^d -> R and conservative variables w = (rho, rhov[1], …, rhov[d], E): R^d -> R^m, with m = d + 2 and - total energy E: R^d -> R;

evaluation of the euler fluxes f_1, …, f_d: R^m -> R^m and their respective jacobians A_1, …, A_d;

the eigendecomposition T^{-1} P T = diagonal( lambda_1 , …, lambda_m ) with - P = A * n (n being a unit normal) - the eigenvalues lambda_i of P - the (right) eigenvectors T of P - the (left eigenvectors) inverse of the (right) eigenvectors T^{-1} of P;

some quantities of interest - speed of sound - mach number - enthalpy;

a means to visualize a function representing the conservative variables w.

See also: [Dolejsi, Feistauer, 2016, pp. 404 and following], [Kröner, 1997, p. 387] for 1d and 2d

static size_t Dune::GDT::EulerTools::density_index()

\ {

To convert between primitive and conservative variables.

Note

While the indices may seem silly, using them helps to reduce typo induced errors.

static std::array<size_t, d> Dune::GDT::EulerTools::velocity_indices()

No documentation provided.

static size_t Dune::GDT::EulerTools::energy_index()

No documentation provided.

static size_t Dune::GDT::EulerTools::pressure_index()

No documentation provided.

XT::Common::FieldVector<R, 1> Dune::GDT::EulerTools::density(const FieldVector<R, m> &w) const

No documentation provided.

XT::Common::FieldVector<R, d> Dune::GDT::EulerTools::velocity(const FieldVector<R, m> &w) const

No documentation provided.

XT::Common::FieldVector<R, 1> Dune::GDT::EulerTools::energy(const FieldVector<R, m> &w) const

No documentation provided.

XT::Common::FieldVector<R, 1> Dune::GDT::EulerTools::energy(const FieldVector<R, 1> &rho, const FieldVector<R, d> &v, const FieldVector<R, 1> &p) const

No documentation provided.

XT::Common::FieldVector<R, m> Dune::GDT::EulerTools::primitive(const FieldVector<R, m> &w) const

No documentation provided.

std::tuple<XT::Common::FieldVector<R, 1>, XT::Common::FieldVector<R, d>, XT::Common::FieldVector<R, 1>> Dune::GDT::EulerTools::primitives(const FieldVector<R, m> &w) const

No documentation provided.

XT::Common::FieldVector<R, 1> Dune::GDT::EulerTools::pressure(const FieldVector<R, m> &w) const

No documentation provided.

XT::Common::FieldVector<R, m> Dune::GDT::EulerTools::conservative(const FieldVector<R, 1> &rho, const XT::Common::FieldVector<R, d> &v, const FieldVector<R, 1> &p) const

No documentation provided.

R Dune::GDT::EulerTools::speed_of_sound2(const FieldVector<R, m> &w) const

\ }

To compute some relevant quantities

\ {

R Dune::GDT::EulerTools::speed_of_sound2(const FieldVector<R, 1> &rho, const FieldVector<R, 1> &p) const

No documentation provided.

R Dune::GDT::EulerTools::speed_of_sound(const FieldVector<R, m> &w) const

No documentation provided.

R Dune::GDT::EulerTools::speed_of_sound(const FieldVector<R, 1> &rho, const FieldVector<R, 1> &p) const

No documentation provided.

R Dune::GDT::EulerTools::mach_number(const FieldVector<R, m> &w) const

No documentation provided.

R Dune::GDT::EulerTools::mach_number(const FieldVector<R, 1> &rho, const FieldVector<R, d> &v, const FieldVector<R, 1> &p) const

No documentation provided.

R Dune::GDT::EulerTools::enthalpy(const FieldVector<R, m> &w) const

No documentation provided.

R Dune::GDT::EulerTools::enthalpy(const FieldVector<R, 1> &rho, const FieldVector<R, 1> &E, const FieldVector<R, 1> &p) const

No documentation provided.

int Dune::GDT::EulerTools::flux_order() const

\ }

To access the flux f and its jacobian.

\ {

XT::Common::FieldMatrix<R, d, m> Dune::GDT::EulerTools::flux(const FieldVector<R, m> &w) const

No documentation provided.

XT::Common::FieldVector<R, m> Dune::GDT::EulerTools::flux_at_impermeable_walls(const FieldVector<R, m> &w, const XT::Common::FieldVector<double, d> &n) const

The Euler flux at impermeable walls (e.g., v*n = 0).

See also: [DF2015, p. 414, (8.58)]

XT::Common::FieldVector<XT::Common::FieldMatrix<R, m, m>, d> Dune::GDT::EulerTools::flux_jacobian(const FieldVector<R, m> &w) const

No documentation provided.

XT::Common::FieldVector<R, m> Dune::GDT::EulerTools::eigenvalues_flux_jacobian(const FieldVector<R, m> &w, const FieldVector<double, d> &n) const

See also: [Kröner, 1997, p. 387] for 1d and 2d

XT::Common::FieldMatrix<R, m, m> Dune::GDT::EulerTools::eigenvectors_flux_jacobian(const FieldVector<R, m> &w, const FieldVector<double, d> &n) const

See also: [Kröner, 1997, p. 387, M T] for 1d and 2d

XT::Common::FieldMatrix<R, m, m> Dune::GDT::EulerTools::eigenvectors_inv_flux_jacobian(const FieldVector<R, m> &w, const FieldVector<double, d> &n) const

See also: [Kröner, 1997, p. 387, (M T)^{-1}] (with q = 1 in the top left entry) for 1d and 2d

template<>
Dune::GDT::EulerTools::EulerTools<d, R>(const double &gmma)

No documentation provided.

const double Dune::GDT::EulerTools::gamma_

No documentation provided.

const size_t Dune::GDT::EulerTools::m

No documentation provided.

template<class E, class GL>
int Dune::GDT::EulerTools::visualize(const XT::Functions::GridFunctionInterface<E, m, 1, R> &u_conservative, const GL &grid_layer, const std::string filename_prefix = <recovery-expr>(""), const std::string filename_suffix = <recovery-expr>(""), const bool subsampling = false) const