SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
NewtonianEuler::BoundaryCorrections::Hllc< Dim > Class Template Referencefinal

The HLLC (Harten-Lax-van Leer-Contact) Riemann solver for the NewtonianEuler system. More...

#include <Hllc.hpp>

Classes

struct  LargestIngoingCharSpeed
 
struct  LargestOutgoingCharSpeed
 

Public Types

using options = implementation defined
 
using dg_package_field_tags = implementation defined
 
using dg_package_data_temporary_tags = implementation defined
 
using dg_package_data_primitive_tags = implementation defined
 
using dg_package_data_volume_tags = implementation defined
 
using dg_boundary_terms_volume_tags = implementation defined
 
- Public Types inherited from NewtonianEuler::BoundaryCorrections::BoundaryCorrection< Dim >
using creatable_classes = implementation defined
 

Public Member Functions

 Hllc (const Hllc &)=default
 
Hllcoperator= (const Hllc &)=default
 
 Hllc (Hllc &&)=default
 
Hllcoperator= (Hllc &&)=default
 
void pup (PUP::er &p) override
 
std::unique_ptr< BoundaryCorrection< Dim > > get_clone () const override
 
double dg_package_data (gsl::not_null< Scalar< DataVector > * > packaged_mass_density, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > packaged_momentum_density, gsl::not_null< Scalar< DataVector > * > packaged_energy_density, gsl::not_null< Scalar< DataVector > * > packaged_pressure, gsl::not_null< Scalar< DataVector > * > packaged_normal_dot_flux_mass_density, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > packaged_normal_dot_flux_momentum_density, gsl::not_null< Scalar< DataVector > * > packaged_normal_dot_flux_energy_density, gsl::not_null< tnsr::i< DataVector, Dim, Frame::Inertial > * > packaged_interface_unit_normal, gsl::not_null< Scalar< DataVector > * > packaged_normal_dot_velocity, gsl::not_null< Scalar< DataVector > * > packaged_largest_outgoing_char_speed, gsl::not_null< Scalar< DataVector > * > packaged_largest_ingoing_char_speed, const Scalar< DataVector > &mass_density, const tnsr::I< DataVector, Dim, Frame::Inertial > &momentum_density, const Scalar< DataVector > &energy_density, const tnsr::I< DataVector, Dim, Frame::Inertial > &flux_mass_density, const tnsr::IJ< DataVector, Dim, Frame::Inertial > &flux_momentum_density, const tnsr::I< DataVector, Dim, Frame::Inertial > &flux_energy_density, const tnsr::I< DataVector, Dim, Frame::Inertial > &velocity, const Scalar< DataVector > &specific_internal_energy, const tnsr::i< DataVector, Dim, Frame::Inertial > &normal_covector, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &, const std::optional< Scalar< DataVector > > &normal_dot_mesh_velocity, const EquationsOfState::EquationOfState< false, 2 > &equation_of_state) const
 
void dg_boundary_terms (gsl::not_null< Scalar< DataVector > * > boundary_correction_mass_density, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > boundary_correction_momentum_density, gsl::not_null< Scalar< DataVector > * > boundary_correction_energy_density, const Scalar< DataVector > &mass_density_int, const tnsr::I< DataVector, Dim, Frame::Inertial > &momentum_density_int, const Scalar< DataVector > &energy_density_int, const Scalar< DataVector > &pressure_int, const Scalar< DataVector > &normal_dot_flux_mass_density_int, const tnsr::I< DataVector, Dim, Frame::Inertial > &normal_dot_flux_momentum_density_int, const Scalar< DataVector > &normal_dot_flux_energy_density_int, const tnsr::i< DataVector, Dim, Frame::Inertial > &interface_unit_normal_int, const Scalar< DataVector > &normal_dot_velocity_int, const Scalar< DataVector > &largest_outgoing_char_speed_int, const Scalar< DataVector > &largest_ingoing_char_speed_int, const Scalar< DataVector > &mass_density_ext, const tnsr::I< DataVector, Dim, Frame::Inertial > &momentum_density_ext, const Scalar< DataVector > &energy_density_ext, const Scalar< DataVector > &pressure_ext, const Scalar< DataVector > &normal_dot_flux_mass_density_ext, const tnsr::I< DataVector, Dim, Frame::Inertial > &normal_dot_flux_momentum_density_ext, const Scalar< DataVector > &normal_dot_flux_energy_density_ext, const tnsr::i< DataVector, Dim, Frame::Inertial > &interface_unit_normal_ext, const Scalar< DataVector > &normal_dot_velocity_ext, const Scalar< DataVector > &largest_outgoing_char_speed_ext, const Scalar< DataVector > &largest_ingoing_char_speed_ext, dg::Formulation dg_formulation) const
 
- Public Member Functions inherited from NewtonianEuler::BoundaryCorrections::BoundaryCorrection< Dim >
 BoundaryCorrection (const BoundaryCorrection &)=default
 
BoundaryCorrectionoperator= (const BoundaryCorrection &)=default
 
 BoundaryCorrection (BoundaryCorrection &&)=default
 
BoundaryCorrectionoperator= (BoundaryCorrection &&)=default
 
virtual std::unique_ptr< BoundaryCorrection< Dim > > get_clone () const =0
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

template<size_t Dim>
class NewtonianEuler::BoundaryCorrections::Hllc< Dim >

The HLLC (Harten-Lax-van Leer-Contact) Riemann solver for the NewtonianEuler system.

Let U be the evolved variable, Fi the flux, vi the spatial velocity, and ni be the outward directed unit normal to the interface. Denoting F:=niFi and v:=nivi, the HLLC boundary correction is [196]

GHLLC={Fintif0λminFint+λmin(U*intUint)ifλmin0λ*Fext+λmax(U*extUext)ifλ*0λmaxFextifλmax0}

where "int" and "ext" stand for interior and exterior.

Intermediate ('star') states are given by

U*int=(λminvintλminλ)[ρintρint[vintx+(λvint)nxint]ρint[vinty+(λvint)nyint]ρint[vintz+(λvint)nzint]Eint+pintλvintλminvint+ρintλ(λvint)]

and

U*ext=(λmax+vextλmaxλ)[ρextρext[vextx(λ+vext)nxext]ρext[vexty(λ+vext)nyext]ρext[vextz(λ+vext)nzext]Eext+pextλ+vextλmax+vext+ρextλ(λ+vext)].

The contact wave speed λ is [197]

λ=pextpint+ρintvint(λminvint)+ρextvext(λmax+vext)ρint(λminvint)ρext(λmax+vext).

λmin and λmax are estimated by [45]

λmin=min(λint,λext+)λmax=max(λint+,λext)

where λ+ ( λ) is the largest characteristic speed in the outgoing (ingoing) direction for each domain.

Note the minus signs in front of λext±, which is because an outgoing speed w.r.t. the neighboring element is an ingoing speed w.r.t. the local element, and vice versa. Similarly, the Fext term in GHLLC and the vext term in U*ext have a positive sign because the outward directed normal of the neighboring element has the opposite sign, i.e. niext=niint.

For the NewtonianEuler system, λ± are given as

λ±=v±cs

where cs is the sound speed.

Note
  • In the strong form the dg_boundary_terms function returns GFint
  • In the implementation, we use

    GHLLC={Fint+λmin(U*intUint)if0λ*Fext+λmax(U*extUext)ifλ*0},

    with

    λmin=min(λint,λext+,0)λmax=max(λint+,λext,0).

    Provided that λ falls in the correct range i.e

    min(λint,λext+)<λ<max(λint+,λext),

    this prescription recovers the original HLLC boundary correction for all four cases. For either λmin=0 or λmax=0 (i.e. all characteristics move in the same direction), boundary correction reduces to pure upwinding.

  • Some references use S instead of λ for the signal/characteristic speeds.

Member Function Documentation

◆ get_clone()

template<size_t Dim>
std::unique_ptr< BoundaryCorrection< Dim > > NewtonianEuler::BoundaryCorrections::Hllc< Dim >::get_clone ( ) const
overridevirtual

Member Data Documentation

◆ help

template<size_t Dim>
constexpr Options::String NewtonianEuler::BoundaryCorrections::Hllc< Dim >::help
staticconstexpr
Initial value:
= {
"Computes the HLLC boundary correction term for the "
"Newtonian Euler/hydrodynamics system."}

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