![]() |
DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
|
Base class for simulating the Dam Break Problem. More...
#include <DamBreakSim.h>
Public Types | |
enum class | eInitialWaveProfile { SINE = 0 , STEP = 1 } |
Public Member Functions | |
DamBreakSim () | |
Default ctor. | |
~DamBreakSim ()=default | |
Force destructor to be virtual. | |
DamBreakSim (const DamBreakSim &aOther)=delete | |
copying not allowed | |
DamBreakSim & | operator= (const DamBreakSim &aOther)=delete |
assigning not allowed | |
void | run () override final |
bool | init () override final |
Some initialization of the simulator. | |
void | unInitialize () override final |
clean-upof the simulator | |
void | dump (const std::filesystem::path &aFilePath) |
Save data in a file for visualizing. | |
const DBSArrayType | getH () const noexcept |
Set/get water level height. | |
void | setPhi1 (float64 aValue) |
Initial values (water level) imposed on the left and right side of DAM. | |
void | setPhi0 (float64 aValue) |
const float64 | getPhi1 () const |
Constant value in the initial setting of the Dam-Break problem. | |
const float64 | getPhi0 () const |
Constant value in the initial setting of the Dam-Break problem. | |
float64 | getCFL () const |
Courant-Friedrich-Levy number of the simulation. | |
void | setCFL (float64 aOther) |
float64 | getCurrentTime () const |
Returns the current time of the simulation. | |
float64 | getTimeStep () |
return time stepping | |
uint32 | currentIteration () |
Current iteration of the simulation. | |
std::string | getMethodName () |
Numerical scheme for the current simulation. | |
void | setMethodName (const std::string &aMethodName) |
set method name of numerical scheme | |
void | setWorkingDir (std::filesystem::path aProjectPath) |
Working directory (store result of simulation and ...) | |
bool | isFlatBedTopography () const |
Cross-section flow topography. | |
void | setInitialCnd (eInitialWaveProfile aType) |
Set/Get Initial profile. | |
eInitialWaveProfile | getInitialType () const |
Initial wave profile. | |
std::shared_ptr< DamBreakSim > | getDamBreakSim () |
share the ownership of 'this' with all existing std::shared_ptr that refer to *this. | |
void | profilecmp (float64 aTime) |
Plot profile of the water depth (exact/computed) at a given time. |
Private Member Functions | |
void | ImposePhysCnd () |
void | saveResult () |
Private Attributes | |
DBSArrayType | mU1 |
DBSArrayType | mU2 |
DBSArrayType | mH |
DBSArrayType | mX |
DBSArrayType | mZ |
DBSArrayType | mN |
float64 | mDx |
int32 | mNbSections |
int32 | mReadpar |
int32 | mNbIterMax |
Sfx::SfxTimePrm | m_Tip |
bool | mSimRunning |
bool | mUseFriction |
bool | mUseCompare |
float64 | mCFL |
float64 | mTime |
float64 | B |
float64 | mL |
float64 | mDt |
float64 | mS0am |
float64 | mS0av |
float64 | mPhi1 |
float64 | mPhi0 |
eInitialWaveProfile | m_initialWaveProfile |
std::ofstream | mFileRes |
std::string | mStVenantOut |
std::string | mMethodName |
std::filesystem::path | m_currWrkDir |
Sfx::DamBreakData | m_dbData |
dbpp::ListSectionsFlow | m_listDamBreak |
CalculFF | m_calculFF |
Display the result as a graph (post-script format) for visualization. |
Base class for simulating the Dam Break Problem.
Reference: "An Efficient Implementation of Non-Oscillatory Schemes for the Computation of Free-Surface Flows" Nujic (1995), 33, No.1
|
strong |
DamBreakSim::DamBreakSim | ( | ) |
Default ctor.
|
default |
Force destructor to be virtual.
|
delete |
copying not allowed
aOther | instance to copy from |
|
inline |
Current iteration of the simulation.
void DamBreakSim::dump | ( | const std::filesystem::path & | aFilePath | ) |
Save data in a file for visualizing.
|
inline |
Courant-Friedrich-Levy number of the simulation.
|
inline |
Returns the current time of the simulation.
|
inline |
share the ownership of 'this' with all existing std::shared_ptr that refer to *this.
|
inlinenoexcept |
Set/get water level height.
|
inline |
Initial wave profile.
|
inline |
Numerical scheme for the current simulation.
|
inline |
Constant value in the initial setting of the Dam-Break problem.
|
inline |
Constant value in the initial setting of the Dam-Break problem.
|
inline |
return time stepping
|
private |
|
finaloverride |
Some initialization of the simulator.
|
inline |
Cross-section flow topography.
|
delete |
assigning not allowed
aOther | instance to assign from |
void DamBreakSim::profilecmp | ( | float64 | aTime | ) |
Plot profile of the water depth (exact/computed) at a given time.
aTime | time of the simulation |
|
finaloverride |
Main loop of the simulation
|
private |
|
inline |
|
inline |
Set/Get Initial profile.
aType | initial profile |
|
inline |
set method name of numerical scheme
aMethodName | name of the numerical scheme |
|
inline |
|
inline |
Initial values (water level) imposed on the left and right side of DAM.
|
inline |
Working directory (store result of simulation and ...)
aProjectPath | PAth of the folder |
|
inlinefinaloverride |
clean-upof the simulator
|
private |
|
private |
Display the result as a graph (post-script format) for visualization.
aOutFileName | file name to write result |
aInFileName | file name ... |
PointerToFunction(numerical flux computation)
|
private |
Working dir folder
|
private |
Hudson data as default
|
private |
sine function, step, etc.
|
private |
|
private |
time parameters
|
private |
Courant-Friedrich-Levy
|
private |
time step
|
private |
Lattice spacing
|
private |
file for printing result
|
private |
water level
|
private |
size of periodic region
|
private |
name of the active method (Numerical scheme)
|
private |
Manning coefficient
|
private |
maximum number iterations
|
private |
Number of cross-sections
|
private |
initial water level (right side)
|
private |
initial water level (left side)
|
private |
Reading flag (end of file)
|
private |
slope upstream
|
private |
slope downstream
|
private |
|
private |
Filename for the final result of the water depth
|
private |
current time
|
private |
first state variable
|
private |
second state variable
|
private |
|
private |
|
private |
x coordinate of each section
|
private |
bathymetry