![]() |
DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
|
Physical system made of physical objects under study and described by the state variables. DamBreak physical system, physical objects are cross-sectional flow. Dynamic equations that describe the movement of the flow of water under gravity law, pressure and friction are described by the St-Venant set of equations. In conservative form mass and momentum are the quantity conserved across each section (state variables). More...
#include <dbpp_PhysicalSystem.h>
Classes | |
struct | BCNodeConstraint |
Type to repesent the nodal constraint. More... |
Public Types | |
using | pairStateVar = std::pair<Sfx::StateVariables, Sfx::StateVariables> |
alias template state variables | |
using | SectionStateVar = std::map<unsigned int, pairStateVar > |
alias template map state variables | |
using | StateVectorPair = Sfx::StateVectorField::StateVector |
alias template state variables vector |
Public Member Functions | |
PhysicalSystem () | |
Default ctor. | |
virtual void | add (const SectionFlow &aSectFlow2Add) |
adding a section | |
virtual void | add (SectionFlow &&aSectFlow2Add) |
rvalue reference version (add a physical object) | |
SectionStateVar | getStateVariables () const noexcept |
SectionStateVar & | getStateVariables () noexcept |
System state variables. | |
Sfx::StateVectorField | getStateVector () const |
physical system state vector (scalar field) | |
const ListSectionsFlow & | getSectionList () const noexcept |
ListSectionsFlow & | getSectionList () noexcept |
std::shared_ptr< ListSectionsFlow > & | getListSectionsPtr () |
list of sections | |
std::shared_ptr< ListSectionsFlow > | getListSectionsPtr () const |
list of sections | |
bool | empty () const noexcept |
check emptyness | |
ListSectionsFlow::vec_sizetype | size () const noexcept |
number of physical objects | |
void | update (const Sfx::StateVectorField &aStateVector) |
update all sections flow and state variables | |
void | update (const std::valarray< float64 > &aVarr1, const std::valarray< float64 > &aVarr2) |
Update state variables. | |
void | update (std::valarray< float64 > &&aVarr1, std::valarray< float64 > &&aVarr2) |
Update state variables. | |
void | setRightPhysicalBnd (std::tuple< uint32, float64, float64, float64 > aRightPhyBnd) |
physical boundary at far end global domain | |
PhyBCNdlConstraint | getRightPhysicalBnd () const noexcept |
Physical boundary. | |
void | setLeftPhysicalBnd (std::tuple< uint32, float64, float64, float64 > aLeftPhyBnd) |
physical boundry left far end of global domain | |
PhyBCNdlConstraint | getLeftPhysicalBnd () const noexcept |
physical boundry left far end of global domain | |
bool | isSystemFictionLess () const noexcept |
friction is used | |
bool | useUnitWidthGeom () const noexcept |
section geometry type | |
bool | useFlatEarth () const noexcept |
falt bed bathymetry | |
void | PhysicalSystemBndType () const noexcept |
type of physical boundary | |
void | attach (Sfx::Observer *aObserver) override final |
attach the observer | |
void | detach (Sfx::Observer *aObserver) override final |
Remove observer from the ist. | |
void | notify () override final |
notify all observers (call update()) |
Static Public Member Functions | |
static ListSectionsFlow | createSectionFlow (const Sfx::DamBreakData &aDbdata) |
Create list of section flow. |
Private Types | |
enum class | ePhysicalSystemType { halfOpen =0 , close =1 } |
Private Attributes | |
int32 | m_nbSectionsFlow = Sfx::DIM::value |
std::shared_ptr< ListSectionsFlow > | m_listSections |
SectionStateVar | m_stateVarMap |
PhyBCNdlConstraint | m_bcNodeUpstream |
PhyBCNdlConstraint | m_bcNodeDownstream |
std::list< Sfx::Observer * > | m_listOfObserver |
Physical system made of physical objects under study and described by the state variables. DamBreak physical system, physical objects are cross-sectional flow. Dynamic equations that describe the movement of the flow of water under gravity law, pressure and friction are described by the St-Venant set of equations. In conservative form mass and momentum are the quantity conserved across each section (state variables).
To be more specific, it's an observable (physicist language). It contains Observers, variable that w are interested to.
Abstract class, user will derive from this class to define it's own physical system.
using dbpp::PhysicalSystem::pairStateVar = std::pair<Sfx::StateVariables, Sfx::StateVariables> |
alias template state variables
using dbpp::PhysicalSystem::SectionStateVar = std::map<unsigned int, pairStateVar > |
alias template map state variables
using dbpp::PhysicalSystem::StateVectorPair = Sfx::StateVectorField::StateVector |
alias template state variables vector
|
strongprivate |
dbpp::PhysicalSystem::PhysicalSystem | ( | ) |
Default ctor.
|
virtual |
adding a section
aSectFlow2Add | physical object added |
|
virtual |
rvalue reference version (add a physical object)
aSectFlow2Add | physical object added |
|
finaloverride |
attach the observer
aObserver | an observer to add |
|
inlinestatic |
Create list of section flow.
aDbdata | data |
|
finaloverride |
Remove observer from the ist.
aObserver | observer to remove |
|
inlinenodiscardnoexcept |
check emptyness
|
inlinenoexcept |
physical boundry left far end of global domain
|
inline |
list of sections
|
inline |
list of sections
|
inlinenoexcept |
Physical boundary.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
System state variables.
Sfx::StateVectorField dbpp::PhysicalSystem::getStateVector | ( | ) | const |
physical system state vector (scalar field)
|
inlinenoexcept |
friction is used
|
finaloverride |
notify all observers (call update())
|
inlinenoexcept |
type of physical boundary
|
inline |
physical boundry left far end of global domain
aLeftPhyBnd | physical boundry value |
|
inline |
physical boundary at far end global domain
aRightPhyBnd | bpoundary value |
|
inlinenoexcept |
number of physical objects
void dbpp::PhysicalSystem::update | ( | const Sfx::StateVectorField & | aStateVector | ) |
update all sections flow and state variables
aStateVector |
void dbpp::PhysicalSystem::update | ( | const std::valarray< float64 > & | aVarr1, |
const std::valarray< float64 > & | aVarr2 ) |
Update state variables.
aVarr1 | first state variable |
aVarr2 | second state variable |
void dbpp::PhysicalSystem::update | ( | std::valarray< float64 > && | aVarr1, |
std::valarray< float64 > && | aVarr2 ) |
Update state variables.
aVarr1 | first state variable |
aVarr2 | second state variable |
|
inlinenoexcept |
falt bed bathymetry
|
inlinenoexcept |
section geometry type
|
private |
Far end right boundary
|
private |
Far end left boundary
|
private |
list of observer
|
private |
List of cross-section (physics object)
|
private |
default number of sections
|
private |
represent state variable for now