DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
Sfx::StVenant1D Class Reference

Shallow-water (one-dimension) is a system of conservation laws. Conserved quantities (state variables) are the mass and the momentum. It's the differential form of Newton law (f=ma) but for a mass of fluid in a movement under gravity. Forces that act on the mass of fluid are friction, gravity and pressure. More...

#include <Sfx_StVenant1DEquations.h>

Inheritance diagram for Sfx::StVenant1D:

Public Types

using valar64 = std::valarray<float64>

Public Member Functions

 StVenant1D (eFluxType aFtype=eFluxType::incomplete)
 default ctor (convective by default)
SCLEquation * Clone () override
 Clone type.
float64 flux (const Sfx::StateVector &aState, const eFluxType aFluxT=eFluxType::incomplete) override final
 convective flux function
std::valarray< float64 > flux (const Sfx::StateVectorField &aState, const eFluxType aFluxT=eFluxType::incomplete)
 physical flux
std::valarray< float64 > flux (const dbpp::Uh &aGblNval, const eFluxType aFluxT=eFluxType::incomplete)
 physical flux
float64 flux (const Sfx::StateVector &aState, const dbpp::SectionFlow &aSect)
 physical flux
std::string name () const override final
 name description
bool hasSourceTerm () const override final
 use term sucg friction and bed slope
uint32 getNumberOfEquations () const override final
 implement the physical flux
uint32 getDimension () const override final
 System dimension.
eFluxType getFluxType () const noexcept
 physical flux type
bool useFriction () const noexcept
 return false by default

Private Member Functions

valar64 EvaluationFlux_I_1D (const valar64 &U1, const valar64 &U2, float64 B=1.)
 Evaluate convective flux (incomplete)
valar64 CalculTermePressionHydrostatique1D (const valar64 &A, float64 B=1.)
 Hydrostatic pressure.
valar64 EvaluationFlux_C_1D (const valar64 &U1, const valar64 &U2, float64 B=1.)
 Evaluate convective flux and pressure (complete)

Private Attributes

eFluxType m_FluxType
bool m_useFriction

Detailed Description

Shallow-water (one-dimension) is a system of conservation laws. Conserved quantities (state variables) are the mass and the momentum. It's the differential form of Newton law (f=ma) but for a mass of fluid in a movement under gravity. Forces that act on the mass of fluid are friction, gravity and pressure.

Member Typedef Documentation

◆ valar64

using Sfx::StVenant1D::valar64 = std::valarray<float64>

Constructor & Destructor Documentation

◆ StVenant1D()

Sfx::StVenant1D::StVenant1D ( eFluxType aFtype = eFluxType::incomplete)
inline

default ctor (convective by default)

Parameters
aFtypeincomplete (without pressure term)

Member Function Documentation

◆ CalculTermePressionHydrostatique1D()

valar64 Sfx::StVenant1D::CalculTermePressionHydrostatique1D ( const valar64 & A,
float64 B = 1. )
inlineprivate

Hydrostatic pressure.

Parameters
Afirst state variable
Bsection width
Returns
pressure value

◆ Clone()

SCLEquation * Sfx::StVenant1D::Clone ( )
inlineoverride

Clone type.

Returns
Base class pointer

◆ EvaluationFlux_C_1D()

valar64 Sfx::StVenant1D::EvaluationFlux_C_1D ( const valar64 & U1,
const valar64 & U2,
float64 B = 1. )
inlineprivate

Evaluate convective flux and pressure (complete)

Parameters
U1first state variable
U2second state variable
Bsection width
Returns
flux value

◆ EvaluationFlux_I_1D()

valar64 Sfx::StVenant1D::EvaluationFlux_I_1D ( const valar64 & U1,
const valar64 & U2,
float64 B = 1. )
inlineprivate

Evaluate convective flux (incomplete)

Parameters
U1first state variable
U2second state variable
Bsection width
Returns
nodal values as array

◆ flux() [1/4]

std::valarray< float64 > Sfx::StVenant1D::flux ( const dbpp::Uh & aGblNval,
const eFluxType aFluxT = eFluxType::incomplete )

physical flux

Parameters
aGblNvalglobal nodal values
aFluxTflux type
Returns
array of values

◆ flux() [2/4]

float64 Sfx::StVenant1D::flux ( const Sfx::StateVector & aState,
const dbpp::SectionFlow & aSect )

physical flux

Parameters
aStateState vector
aSectSection flow
Returns
flux value

◆ flux() [3/4]

float64 Sfx::StVenant1D::flux ( const Sfx::StateVector & aState,
const eFluxType aFluxT = eFluxType::incomplete )
finaloverride

convective flux function

Parameters
aStatestate vector
aFluxTtype of flux (with pressure)
Returns
physical flux

◆ flux() [4/4]

std::valarray< float64 > Sfx::StVenant1D::flux ( const Sfx::StateVectorField & aState,
const eFluxType aFluxT = eFluxType::incomplete )

physical flux

Parameters
aStatestate variables
aFluxTflux type
Returns
array of values

◆ getDimension()

uint32 Sfx::StVenant1D::getDimension ( ) const
inlinefinaloverride

System dimension.

Returns
number of dimension

◆ getFluxType()

eFluxType Sfx::StVenant1D::getFluxType ( ) const
inlinenoexcept

physical flux type

Returns
type

◆ getNumberOfEquations()

uint32 Sfx::StVenant1D::getNumberOfEquations ( ) const
inlinefinaloverride

implement the physical flux

Returns

default is 2 SWE (Shalow-Water Equations)

Returns
number of equations

◆ hasSourceTerm()

bool Sfx::StVenant1D::hasSourceTerm ( ) const
inlinefinaloverride

use term sucg friction and bed slope

Returns
true/false

◆ name()

std::string Sfx::StVenant1D::name ( ) const
inlinefinaloverride

name description

Returns
string

◆ useFriction()

bool Sfx::StVenant1D::useFriction ( ) const
inlinenoexcept

return false by default

Returns
true/false

Member Data Documentation

◆ m_FluxType

eFluxType Sfx::StVenant1D::m_FluxType
private

default incomplete

◆ m_useFriction

bool Sfx::StVenant1D::m_useFriction
private

default frictionless


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