DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
Testvs19_NujicSourceTreatment.h
Go to the documentation of this file.
1
2#pragma once
3
4// BaseNumTypes include
5#include "Sfx/Sfx_scalarField1D.h"
6// DamBreak App inludes
9
10// Hydraulic radius
11// HydRadius wR;
12
13// for( int32 j = 0; j < NbSections-1; j++) {
14// Rh = wR( A[j]);
15
16// TermeSf = g * A[j] * n[j]*n[j] * Q[j]*fabs(Q[j])/(A[j]*A[j]*pow (Rh, 4./3.));
17
18// if( aIndex == 0)
19// wTermeS0 = (0.5*g*( mA[aIndex+1] + mA[aIndex])) * (mH[aIndex+1] - mH[aIndex])/mDx;
20// else
21// wTermeS0 = (0.5*g*( mA[aIndex+1] + mA[aIndex-1])) * (mH[aIndex+1] - mH[aIndex-1])/(2.*mDx);
22//
23// // S[j] = (TermeSf - TermeS0);
24// return wTermeS0;
25// }
26
27namespace Sfx {
28 class FieldLattice;
29 class EMcNeilBndCnd;
30 class PhysicalSystem;
31}
32
33namespace Testvs19 {
34 template<typename T> class ListSectionsFlow;
35}
36
37namespace Testvs19
38{
44 {
45 public:
49 enum class eSrcTermType
50 {
53 };
54
57 enum class eSrcDxType
58 {
61 };
62 public:
72 : m_derivativeOrder{ 2 }, // default value
73 m_listSectFlow{ aSectFlow }, //
74 m_listSectFlow19{nullptr}
75 {}
76
81 : m_derivativeOrder{ 2 }, // default value
82 m_listSectFlow19{aSectFlow}
83 {}
84
90 std::valarray<float64> TraitementTermeSourceS0( const Sfx::scalarField1D& aAfield,
91 const Sfx::scalarField1D& aQfield) const;
98 std::valarray<float64> TraitementTermeSourceS2( const Sfx::FieldLattice& aAfield,
99 const Sfx::FieldLattice& aHfield) const;
106 std::valarray<float64> TraitementTermeSourceS2( const Sfx::PhysicalSystem* aPhysys, const Sfx::EMcNeilBndCnd& aBC);
111 void setHderivativeOrder(int32 aDerivOrder) noexcept { m_derivativeOrder = aDerivOrder; }
116 int32 getderivativeOrder() const noexcept { return m_derivativeOrder; }
121 std::valarray<float64> getManningValues() const noexcept { return std::valarray<float64>(); }
126 void setSectionsManningValues( const std::vector<float64>& aVecNvalues) noexcept {/*not implemented yet*/ }
131 [[nodiscard]] bool isFictionLess() const noexcept { return true; }
136 void setVariableTraitementS2(eSrcTermType aSrcTemrType) noexcept { m_srcType = aSrcTemrType; }
141 void setDxOrderSourceTerm(eSrcDxType aSrcDxType) noexcept { m_dxsrcType = aSrcDxType; }
146 eSrcTermType getSrcTermType() const noexcept { return m_srcType; }
151 eSrcDxType getSrcDxType() const noexcept { return m_dxsrcType; }
155 void setData( const dbpp::ListSectionsFlow& aData) noexcept { m_listSectFlow = aData; }
156 private:
158 // Friction energy slope formulae
159 std::valarray<float64> m_frictionCoeff;
164 };
165} // End of namespace
Calculate the characteristic information to set boundary node values (A,Q,H)
Definition Sfx_ImposeBnd.h:22
List of physical objects under study.
Definition Testvs19_ListSectionsFlow.hpp:21
bool isFictionLess() const noexcept
System friction.
Definition Testvs19_NujicSourceTreatment.h:131
NujicSrcTermAlgorithm()
default ctor
Definition Testvs19_NujicSourceTreatment.h:66
eSrcTermType getSrcTermType() const noexcept
Getter.
Definition Testvs19_NujicSourceTreatment.h:146
void setVariableTraitementS2(eSrcTermType aSrcTemrType) noexcept
Source (bed slope) type: physics considerations.
Definition Testvs19_NujicSourceTreatment.h:136
eSrcDxType getSrcDxType() const noexcept
Getter.
Definition Testvs19_NujicSourceTreatment.h:151
int32 getderivativeOrder() const noexcept
Getter.
Definition Testvs19_NujicSourceTreatment.h:116
int m_derivativeOrder
Definition Testvs19_NujicSourceTreatment.h:157
void setDxOrderSourceTerm(eSrcDxType aSrcDxType) noexcept
Source (bed slope) derivative order: fd derivative (Taylor series)
Definition Testvs19_NujicSourceTreatment.h:141
void setSectionsManningValues(const std::vector< float64 > &aVecNvalues) noexcept
Set Manning (section)
Definition Testvs19_NujicSourceTreatment.h:126
std::valarray< float64 > TraitementTermeSourceS2(const Sfx::FieldLattice &aAfield, const Sfx::FieldLattice &aHfield) const
friction energy slope and bed slop terms treatment
Definition Testvs19_NujicSourceTreatment.cpp:125
eSrcDxType m_dxsrcType
Definition Testvs19_NujicSourceTreatment.h:161
void setData(const dbpp::ListSectionsFlow &aData) noexcept
Definition Testvs19_NujicSourceTreatment.h:155
eSrcTermType m_srcType
Definition Testvs19_NujicSourceTreatment.h:160
dbpp::ListSectionsFlow m_listSectFlow
Definition Testvs19_NujicSourceTreatment.h:162
std::valarray< float64 > TraitementTermeSourceS0(const Sfx::scalarField1D &aAfield, const Sfx::scalarField1D &aQfield) const
bed slope algorithm
Definition Testvs19_NujicSourceTreatment.cpp:37
void setHderivativeOrder(int32 aDerivOrder) noexcept
Set derivative order.
Definition Testvs19_NujicSourceTreatment.h:111
std::valarray< float64 > getManningValues() const noexcept
Getter.
Definition Testvs19_NujicSourceTreatment.h:121
NujicSrcTermAlgorithm(const dbpp::ListSectionsFlow &aSectFlow)
Ctor from a list of sections.
Definition Testvs19_NujicSourceTreatment.h:71
NujicSrcTermAlgorithm(const Testvs19::ListSectionsFlow< dbpp::SectionFlow > *aSectFlow)
Ctor from a list of sections.
Definition Testvs19_NujicSourceTreatment.h:80
eSrcDxType
Definition Testvs19_NujicSourceTreatment.h:58
@ central_4thorder
Definition Testvs19_NujicSourceTreatment.h:60
@ central_2ndorder
Definition Testvs19_NujicSourceTreatment.h:59
eSrcTermType
Definition Testvs19_NujicSourceTreatment.h:50
@ Zderivative
Definition Testvs19_NujicSourceTreatment.h:52
@ Hderivative
Definition Testvs19_NujicSourceTreatment.h:51
const Testvs19::ListSectionsFlow< dbpp::SectionFlow > * m_listSectFlow19
Definition Testvs19_NujicSourceTreatment.h:163
std::valarray< float64 > m_frictionCoeff
Definition Testvs19_NujicSourceTreatment.h:159
List of cross-section flow (itereable)
Definition dbpp_ListSectionsFlow.h:15
Basic algorithm to evaluate source terms (bed slope and energy slope) The Manning formula can be read...
Definition dbpp_SrcNumericalTreatment.h:31
Definition HydUtils.h:15
Definition Testvs19_BaseRhsPhysicsAlgorithm.cpp:19