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

The DAM-BREAK Problem class is a model of a well-posed problem. More...

#include <DamBreakProb.h>

Public Types

enum class  eProbType { ProblemA = 0 , ProblemB = 1 }
 Scoped enum from C++11. More...

Public Member Functions

 DamBreakProblem (float64 aPhi0, float64 aPhi1)
 By default set to the test Problem A. This constructor initialize the Dam-Break problem by creating a math equations system, an initial condition with boundary problem (well posed problem).
float64 computeVelocity (float64 aCoord, float64 aTime)
 Compute velocity at a location (x-coordinate) at a given time.
std::vector< float64 > computeVelocity (const std::vector< float64 > &aListofCoord, float64 aTime)
 Compute the velocity profile for a list of coordinate at a given time.
float64 computeWaterDepth (float64 aCoord, float64 aTime)
 Compute the water depth at a location (x-coordinate) at a given time.
std::vector< float64 > computeWaterDepth (const std::vector< float64 > &aListofCoord, float64 aTime)
 Compute water depth profile for a list of coordinate at a given time.
void setIC (eProbType aTestProblem=eProbType::ProblemA)
 Set initial condition for the Dam-Break Problem (default ia Problem A)
void timeLoop ()
void init ()
virtual SweRhsAlgorithm * getRHSdiscretization ()
 default is no pressure (user responsible to delete pointer)

Private Attributes

float64 mS
float64 mU2
float64 mC2
float64 mSqrtG
float64 mPhi1
float64 mPhi0
eProbType mTestProblem
std::vector< float64 > mU0
std::vector< float64 > mH0

Detailed Description

The DAM-BREAK Problem class is a model of a well-posed problem.

This provides services to compute exact solution of the Dam-Break wave propagation.

Reference: Hudson Technical Report "Numerical Techniques for the Shallow-Water Equations"

Test problems for the Shallow-Water Equations (One-Dimensional Case)

ProblemA: This problem is one the most basic problem for the Shallow-Water System of Conservation Law since no source term is present. Riverbed being constant.

ProblemB: Contains a source term and represent a Dam breaking on a variable depth riverbed.

Member Enumeration Documentation

◆ eProbType

Scoped enum from C++11.

Enumerator
ProblemA 

The Dam-Break Problem

ProblemB 

Variable depth riverbed

Constructor & Destructor Documentation

◆ DamBreakProblem()

dbpp::DamBreakProblem::DamBreakProblem ( float64 aPhi0,
float64 aPhi1 )

By default set to the test Problem A. This constructor initialize the Dam-Break problem by creating a math equations system, an initial condition with boundary problem (well posed problem).

Member Function Documentation

◆ computeVelocity() [1/2]

std::vector< float64 > dbpp::DamBreakProblem::computeVelocity ( const std::vector< float64 > & aListofCoord,
float64 aTime )

Compute the velocity profile for a list of coordinate at a given time.

Parameters
aListofCoordsection coordinate
aTimegiven time
Returns
vector of values

◆ computeVelocity() [2/2]

float64 dbpp::DamBreakProblem::computeVelocity ( float64 aCoord,
float64 aTime )

Compute velocity at a location (x-coordinate) at a given time.

Parameters
aCoordx-coordinate along flow direction
aTimetime
Returns
negative value if aCoord is not a valid location

◆ computeWaterDepth() [1/2]

std::vector< float64 > dbpp::DamBreakProblem::computeWaterDepth ( const std::vector< float64 > & aListofCoord,
float64 aTime )

Compute water depth profile for a list of coordinate at a given time.

Parameters
aListofCoordlist of coordinate
aTimegiven time
Returns
vector of values

◆ computeWaterDepth() [2/2]

float64 dbpp::DamBreakProblem::computeWaterDepth ( float64 aCoord,
float64 aTime )

Compute the water depth at a location (x-coordinate) at a given time.

Parameters
aCoord
aTime
Returns

◆ getRHSdiscretization()

virtual SweRhsAlgorithm * dbpp::DamBreakProblem::getRHSdiscretization ( )
inlinevirtual

default is no pressure (user responsible to delete pointer)

Returns

◆ init()

void dbpp::DamBreakProblem::init ( )
inline

◆ setIC()

void dbpp::DamBreakProblem::setIC ( DamBreakProblem::eProbType aTestProblem = eProbType::ProblemA)

Set initial condition for the Dam-Break Problem (default ia Problem A)

Parameters
aTestProblemproblem to test

◆ timeLoop()

void dbpp::DamBreakProblem::timeLoop ( )
inline

Member Data Documentation

◆ mC2

float64 dbpp::DamBreakProblem::mC2
private

Parameters used for Test Problem A

◆ mH0

std::vector<float64> dbpp::DamBreakProblem::mH0
private

◆ mPhi0

float64 dbpp::DamBreakProblem::mPhi0
private

Water level at downstream

◆ mPhi1

float64 dbpp::DamBreakProblem::mPhi1
private

Water level at upstream

◆ mS

float64 dbpp::DamBreakProblem::mS
private

Wave speed of the discontinuity created at x = 0

◆ mSqrtG

float64 dbpp::DamBreakProblem::mSqrtG
private

Square root of the gravity

◆ mTestProblem

eProbType dbpp::DamBreakProblem::mTestProblem
private

◆ mU0

std::vector<float64> dbpp::DamBreakProblem::mU0
private

◆ mU2

float64 dbpp::DamBreakProblem::mU2
private

Parameters used for Test Problem A


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