DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
DamBreakProb.h
Go to the documentation of this file.
1
2#pragma once
3
4// C++ include
5#include <vector>
6
7#include "Sfx_SimulationMgr.h"
8// App include
11// SfxBase19 library include
12#include "include/Sfx_DefineTypes.h"
13
14namespace dbpp
15{
16 // alias
17 using Time = float64;
18
37 {
38 public:
42 enum class eProbType
43 {
46 };
47
48 public:
49
54 DamBreakProblem( float64 aPhi0, float64 aPhi1);
61 float64 computeVelocity( float64 aCoord, float64 aTime);
68 std::vector<float64> computeVelocity( const std::vector<float64>& aListofCoord, float64 aTime);
82 std::vector<float64> computeWaterDepth( const std::vector<float64>& aListofCoord, float64 aTime);
87 void setIC(eProbType aTestProblem = eProbType::ProblemA);
91 void timeLoop()
92 {
93 /*not implemented yet*/
94 //while (SfxTimePrm) {/*advance simulation by step*/ }
95 }
96
99 void init()
100 {
101 // create solver(this) (ctor from DamBreakProblem)
102 // create rhs algorithm (factory) and set from config file
103 // set solver rhs discretization
104 // set simulation start and stop time SfxTimePrm
105 }
106
111 {
112 auto w_calculFF = Sfx::SimulationMgr::getSingleton().getPtr2FAlgorithm(std::string{ "Whatever" });
113 return new RhsPtr2FuncFlux{ std::string{"DamBreakProblem"}, w_calculFF, new SrcNumericalTreatment{}, false };
114 }
115 // Plot profile for velocity and water depth
116// void plotCurve();
117
118 private:
125 eProbType mTestProblem; // Type of the initial profile */
126 std::vector<float64> mU0; // Initial water velocity */
127 std::vector<float64> mH0; // Initial water level */
128
129 // ODESolver* m_odeSlvr1D;
130
131 // Math equations that model the wave propagation
132 // StVenant1DSys* mCLSystem;
133
134 // Initial condition to solve the DAM-BREAK problem
135 // InitialCnd mInitialCnd;
136
137 // Boundary condition
138 // BoundaryCnd mBndCnd;
139 };
140} // End of namespace
float64 computeVelocity(float64 aCoord, float64 aTime)
Compute velocity at a location (x-coordinate) at a given time.
Definition DamBreakProb.cpp:49
std::vector< float64 > mH0
Definition DamBreakProb.h:127
float64 mC2
Definition DamBreakProb.h:121
float64 mS
Definition DamBreakProb.h:119
DamBreakProblem(float64 aPhi0, float64 aPhi1)
By default set to the test Problem A. This constructor initialize the Dam-Break problem by creating a...
Definition DamBreakProb.cpp:24
eProbType
Scoped enum from C++11.
Definition DamBreakProb.h:43
@ ProblemA
Definition DamBreakProb.h:44
@ ProblemB
Definition DamBreakProb.h:45
void timeLoop()
Definition DamBreakProb.h:91
float64 mSqrtG
Definition DamBreakProb.h:122
float64 mPhi1
Definition DamBreakProb.h:123
std::vector< float64 > mU0
Definition DamBreakProb.h:126
void init()
Definition DamBreakProb.h:99
eProbType mTestProblem
Definition DamBreakProb.h:125
void setIC(eProbType aTestProblem=eProbType::ProblemA)
Set initial condition for the Dam-Break Problem (default ia Problem A)
Definition DamBreakProb.cpp:174
virtual SweRhsAlgorithm * getRHSdiscretization()
default is no pressure (user responsible to delete pointer)
Definition DamBreakProb.h:110
float64 computeWaterDepth(float64 aCoord, float64 aTime)
Compute the water depth at a location (x-coordinate) at a given time.
Definition DamBreakProb.cpp:115
float64 mU2
Definition DamBreakProb.h:120
float64 mPhi0
Definition DamBreakProb.h:124
Wrappper class to support legacy code (C-functions).
Definition dbpp_RhsPtr2FuncFlux.h:21
Basic algorithm to evaluate source terms (bed slope and energy slope) The Manning formula can be read...
Definition dbpp_SrcNumericalTreatment.h:31
Abstract class. "Model" of the right-hand-side terms discretization. Hold discretization scheme or al...
Definition dbpp_SweRhsAlgorithm.h:28
Definition DamBreakProb.h:15
float64 Time
Definition DamBreakProb.h:17
double float64
Definition dbpp_LDeltaOperator.h:12