DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
dbpp::SrcNumericalTreatment Class Reference

Basic algorithm to evaluate source terms (bed slope and energy slope) The Manning formula can be read as follow: More...

#include <dbpp_SrcNumericalTreatment.h>

Inheritance diagram for dbpp::SrcNumericalTreatment:
Testvs19::NujicSrcTermAlgorithm Testvs19::SbSfTermsEvaluation dbpp::SrcTreatmentS2

Public Types

enum class  eDerivativeType { centered_2nd , noncentered }
enum class  eDerivativeBCType { periodic , noncentered }

Public Member Functions

virtual std::valarray< double > TraitementTermeSource0 (const Sfx::scalarField1D &aA, const ListSectionsFlow *aListSectF, const PhysicalBoundaryCnd &aBC)
 Bed Source term evaluation according to Nujic paper (1995)
virtual std::valarray< double > TraitementTermeSource2 (const Sfx::StateVectorField &aStateVec, const ListSectionsFlow &aListSectF, const PhysicalBoundaryCnd &aBC)
 Compute energy slope (part of the algorithm)
void setManningRoughnessCoeff (float64 aN) noexcept
 Set roughness coefficient @paramaN roughness coefficient.
float64 getManningRoughnessCoeff () const noexcept
 Get roughness coefficient.
void setHAverage (bool useHavrg) noexcept
 Validate H average algo.
void setSfSbNumericalTreatment (std::string aSfSbTreamnent="Nujic(1995)") noexcept
 Bed slope numericla discretization.
void setHderivativeType (const eDerivativeType &aDxType) noexcept
 H derivative type (finite difference)
void setSpatialDerivativeOrder (uint32 aDxOrdr) noexcept
 finite difference order
virtual std::string getSfSbNumericalTreatment () const noexcept
const eDerivativeTypegetHderivativeType () const noexcept
uint32 getSpatialDerivativeOrder () const noexcept
 Getter.
virtual bool useFriction () const noexcept
 Fiction coefficient in use.
virtual bool isUnitWidth () const noexcept
 Section flow geometry.
virtual bool useManningFormula () const noexcept
 Manning formala (friction)

Protected Member Functions

SrcNumericalTreatmentoperator= (const SrcNumericalTreatment &)=delete
 disable copy assignment operator (due to the problem of slicing)
SrcNumericalTreatmentoperator= (SrcNumericalTreatment &&)=delete
 disable move assignment operator (due to the problem of slicing)

Private Attributes

uint32 m_dxOrder {2}
float64 m_roughns { 0. }
bool m_useHavrg {true}
std::string m_sfsb { "Nujic(1995)" }
eDerivativeType m_dxType { eDerivativeType::centered_2nd}

Detailed Description

Basic algorithm to evaluate source terms (bed slope and energy slope) The Manning formula can be read as follow:

  S_f = N^2*V*fabs(V)/h^4/3

where "N" is the emperical Manning coefficient, "V" is the fluid velocity, and "h" water depth taken from a datum.

Member Enumeration Documentation

◆ eDerivativeBCType

An enum type Boundary condition type (derivative)

Enumerator
periodic 

periodic

noncentered 

non-centered

◆ eDerivativeType

An enum type Finite difference derivative type (stencil)

Enumerator
centered_2nd 

derivative centered stencil

noncentered 

derivative non-centered stencil

Member Function Documentation

◆ getHderivativeType()

const eDerivativeType & dbpp::SrcNumericalTreatment::getHderivativeType ( ) const
inlinenoexcept

◆ getManningRoughnessCoeff()

float64 dbpp::SrcNumericalTreatment::getManningRoughnessCoeff ( ) const
inlinenoexcept

Get roughness coefficient.

Returns
value

◆ getSfSbNumericalTreatment()

virtual std::string dbpp::SrcNumericalTreatment::getSfSbNumericalTreatment ( ) const
inlinevirtualnoexcept

◆ getSpatialDerivativeOrder()

uint32 dbpp::SrcNumericalTreatment::getSpatialDerivativeOrder ( ) const
inlinenoexcept

Getter.

Returns
derivative order

◆ isUnitWidth()

virtual bool dbpp::SrcNumericalTreatment::isUnitWidth ( ) const
inlinevirtualnoexcept

Section flow geometry.

Returns
true/false

◆ operator=() [1/2]

SrcNumericalTreatment & dbpp::SrcNumericalTreatment::operator= ( const SrcNumericalTreatment & )
protecteddelete

disable copy assignment operator (due to the problem of slicing)

Parameters
objectto copy from
Returns
this

◆ operator=() [2/2]

SrcNumericalTreatment & dbpp::SrcNumericalTreatment::operator= ( SrcNumericalTreatment && )
protecteddelete

disable move assignment operator (due to the problem of slicing)

Parameters
objectto move from
Returns
this

◆ setHAverage()

void dbpp::SrcNumericalTreatment::setHAverage ( bool useHavrg)
inlinenoexcept

Validate H average algo.

Parameters
useHavrgflag

◆ setHderivativeType()

void dbpp::SrcNumericalTreatment::setHderivativeType ( const eDerivativeType & aDxType)
inlinenoexcept

H derivative type (finite difference)

Parameters
aDxTypeType

◆ setManningRoughnessCoeff()

void dbpp::SrcNumericalTreatment::setManningRoughnessCoeff ( float64 aN)
inlinenoexcept

Set roughness coefficient @paramaN roughness coefficient.

◆ setSfSbNumericalTreatment()

void dbpp::SrcNumericalTreatment::setSfSbNumericalTreatment ( std::string aSfSbTreamnent = "Nujic(1995)")
inlinenoexcept

Bed slope numericla discretization.

Parameters
aSfSbTreamnentdiscretization name

◆ setSpatialDerivativeOrder()

void dbpp::SrcNumericalTreatment::setSpatialDerivativeOrder ( uint32 aDxOrdr)
inlinenoexcept

finite difference order

Parameters
aDxOrdrorder

◆ TraitementTermeSource0()

std::valarray< float64 > dbpp::SrcNumericalTreatment::TraitementTermeSource0 ( const Sfx::scalarField1D & aA,
const ListSectionsFlow * aListSectF,
const PhysicalBoundaryCnd & aBC )
virtual

Bed Source term evaluation according to Nujic paper (1995)

Parameters
aAstate variable (wette darea)
aListSectFlist of section flow
aBCphysical boundary condition
Returns
S0 bathymetry term

make the product of both average and derivative(computational node)

◆ TraitementTermeSource2()

std::valarray< float64 > dbpp::SrcNumericalTreatment::TraitementTermeSource2 ( const Sfx::StateVectorField & aStateVec,
const ListSectionsFlow & aListSectF,
const PhysicalBoundaryCnd & aBC )
virtual

Compute energy slope (part of the algorithm)

Parameters
aAstate variables vector
aListSectFlist of section flow
aBCphysical boundary condition
Returns
Sf-S0 (source evaluation)

Reimplemented in dbpp::SrcTreatmentS2, and Testvs19::SbSfTermsEvaluation.

◆ useFriction()

virtual bool dbpp::SrcNumericalTreatment::useFriction ( ) const
inlinevirtualnoexcept

Fiction coefficient in use.

Returns
true/false

Reimplemented in Testvs19::SbSfTermsEvaluation.

◆ useManningFormula()

virtual bool dbpp::SrcNumericalTreatment::useManningFormula ( ) const
inlinevirtualnoexcept

Manning formala (friction)

Returns
true/false

Member Data Documentation

◆ m_dxOrder

uint32 dbpp::SrcNumericalTreatment::m_dxOrder {2}
private

derivative order

◆ m_dxType

eDerivativeType dbpp::SrcNumericalTreatment::m_dxType { eDerivativeType::centered_2nd}
private

finite diff type

◆ m_roughns

float64 dbpp::SrcNumericalTreatment::m_roughns { 0. }
private

roughness coefficient

◆ m_sfsb

std::string dbpp::SrcNumericalTreatment::m_sfsb { "Nujic(1995)" }
private

Source name

◆ m_useHavrg

bool dbpp::SrcNumericalTreatment::m_useHavrg {true}
private

average


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