DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
Sfx_StVenant1DTerms.h
Go to the documentation of this file.
1#pragma once
2
3// SfxBase19 include
4#include "include/Sfx_UniversalConstants.h"
5
6namespace Sfx
7{
8 // Design Note
9 // Also use of the inline keyword, strictly speaking means can be defined
10 // in multiple translation unit (before adding this keyword had some errors
11 // about multiple definition).
12
17 {
18 public:
25 inline static constexpr float64 CalculTermePressionHydrostatique1D(float64 A, float64 B = 1.)
26 {
27 return ((A * A) / (2. * B));
28 }
29
36 inline static constexpr float64 EvaluationFlux_C_1D(float64 U1, float64 U2, float64 B = 1.)
37 {
38 //return ((U2 * U2) / U1 + Sfx::cGravity<float64>*CalculTermePressionHydrostatique1D(U1, B));
39 return EvaluationFlux_I_1D(U1,U2) + Sfx::cGravity<float64>*CalculTermePressionHydrostatique1D(U1, B);
40 }
41
47 inline static constexpr float64 EvaluationFlux_I_1D(float64 U1, float64 U2, float64 B = 1.)
48 {
49 return((U2 * U2) / U1);
50 }
51 };
52} // End of namespace
One-dimensional St-Venant equation spatial terms.
Definition Sfx_StVenant1DTerms.h:17
static constexpr float64 CalculTermePressionHydrostatique1D(float64 A, float64 B=1.)
Hydrostatique pressure (gh^2/2.) for a rectangular channel of width B.
Definition Sfx_StVenant1DTerms.h:25
static constexpr float64 EvaluationFlux_I_1D(float64 U1, float64 U2, float64 B=1.)
Connvective flux (without hydrostatic pressure term).
Definition Sfx_StVenant1DTerms.h:47
static constexpr float64 EvaluationFlux_C_1D(float64 U1, float64 U2, float64 B=1.)
Flux including convective and hydrostatic pressure term.
Definition Sfx_StVenant1DTerms.h:36
Definition HydUtils.h:15