LifeV
OseenData Class Reference

OseenData - LifeV Base class which holds usual data for the NavierStokes equations solvers. More...

#include <OseenData.hpp>

+ Collaboration diagram for OseenData:

Protected Attributes

timePtr_Type M_time
 Data containers for time and mesh. More...
 
timeAdvancePtr_Type M_timeAdvance
 

Private Attributes

bool M_semiImplicit
 To extract Mean Values at a given section z. More...
 
bool M_shapeDerivatives
 
bool M_domainVelImplicit
 
bool M_convectiveImplicit
 
UInt M_computeMeanValuesPerSection
 
UInt M_NbZSections
 
Real M_ToleranceSection
 
Real M_XSectionFrontier
 
Real M_ZSectionInit
 
Real M_ZSectionFinal
 
UInt M_NbPolygonEdges
 
StringDataList M_stabilizationList
 
bool M_conservativeFormulation
 

Public Types

typedef TimeData time_Type
 
typedef std::shared_ptr< time_TypetimePtr_Type
 
typedef TimeAdvanceData timeAdvance_Type
 
typedef std::shared_ptr< timeAdvance_TypetimeAdvancePtr_Type
 

Constructors & Destructor

 OseenData ()
 Empty Constructor. More...
 
 OseenData (const OseenData &oseenData)
 Copy constructor. More...
 
virtual ~OseenData ()
 Virtual destructor. More...
 

Operators

OseenDataoperator= (const OseenData &oseenData)
 Operator=. More...
 

Methods

void setup (const GetPot &dataFile, const std::string &section="fluid")
 Read the dataFile and set all the quantities. More...
 
void showMe (std::ostream &output=std::cout) const
 Display the values. More...
 

Set methods

void setTimeData (const timePtr_Type timeData)
 Set data time container. More...
 
void setTimeAdvanceData (const timeAdvancePtr_Type timeAdvanceData)
 Set data time advance container. More...
 
void setDensity (const Real &density, const UInt nfluid=0)
 Set the density for the specified fluid. More...
 
void setViscosity (const Real &viscosity, const UInt nfluid=0)
 Set the viscosity of the fluid. More...
 
void setStokes (const bool stokes)
 Set this instance of OseenData to either a Stokes or a Navier-Stokes problem. More...
 
void setSemiImplicit (const bool SI)
 Set the flag for the semi-implicit treatment of the shape derivatives in FSI simulations. More...
 
void setUseShapeDerivatives (const bool SD)
 Set the flag for using shape derivatives. More...
 

Get methods

timePtr_Type dataTime () const
 Get data time container. More...
 
timeAdvancePtr_Type dataTimeAdvance () const
 Get data time advance container. More...
 
const UIntfluidNumber () const
 Get the number of the fluid. More...
 
const Realdensity (const UInt &n=0) const
 Get the density of the fluid. More...
 
const Realviscosity (const UInt &n=0) const
 Get the viscosity of the fluid. More...
 
std::string uOrder () const
 Get the order of the finite elements used for velocity. More...
 
std::string pOrder () const
 Get the order of the finite elements used for pressure. More...
 
UInt verbose () const
 Temporal output verbose. More...
 
Real dumpInit () const
 Dumping of the results. More...
 
UInt dumpPeriod () const
 Get the frequency of the dumping. More...
 
Real factor () const
 Get the amplification factor. More...
 
NSStabilization stabilization () const
 Get the stabilization method. More...
 
bool isStokes () const
 
bool isSemiImplicit () const
 Find out if a semi-implicit scheme is used. More...
 
bool useShapeDerivatives () const
 Get the flag for using shape derivatives. More...
 
bool domainVelImplicit () const
 Get the flag for considering implicitly the fluid domain (when it is moving, e.g. ALE) More...
 
bool convectiveImplicit () const
 Get the flag for considering implicitly the fluid convective term. More...
 
UInt computeMeanValuesPerSection () const
 Get the number of mean valuNes per section. More...
 
UInt nbZSections () const
 Get the number of NBZ-sections. More...
 
Real toleranceSection () const
 Tolerance section. More...
 
Real xSectionFrontier () const
 X-Section frontier. More...
 
Real zSectionInit () const
 Z section init. More...
 
Real zSectionFinal () const
 Z section final. More...
 
UInt nbPolygonEdges () const
 Number of edges of the polygon (in the mesh) describing the circle. More...
 
bool conservativeFormulation () const
 Returns wether the formulation of the momentum conservation equation is written in conservative form or not. More...
 

Physics

UInt M_fluidNumber
 number of this fluid More...
 
std::vector< RealM_density
 density of each fluid More...
 
std::vector< RealM_viscosity
 viscosity of each fluid More...
 

FE order

std::string M_uOrder
 order of finite elements for velocity More...
 
std::string M_pOrder
 order of finite elements for pressure More...
 

Miscellaneous

UInt M_verbose
 temporal output verbose More...
 
Real M_dumpInit
 time for starting the dumping of the results (Alex December 2003) More...
 
UInt M_dumpPeriod
 frequency of the dumping (one dump after _dump_period time steps) (Alex December 2003) More...
 
Real M_factor
 amplification factor for moving domains More...
 
bool M_stokes
 true: Stokes problem; false: Navier-Stokes problem More...
 

Discretization

NSStabilization M_stabMethod
 stabilization method More...
 

Detailed Description

OseenData - LifeV Base class which holds usual data for the NavierStokes equations solvers.

Author
M.A. Fernandez, Cristiano Malossi, Samuel Quinodoz

The data is now able to store multiple fluids, but the use of the old interface (for only one fluid) is still available and fully compatible. The old way is to declare one fluid with its density and viscosity in [fluid/physics/density] and [fluid/physics/viscosity]. The set and get functions can then be used without specifying which fluid is concerned. Internally, the information is stored in vectors, but with only one value (the 0 value: density is stored in M_density[0]). In the new way, one has to declare first of all in [fluid/physics/fluid_number] the number of fluids that will be used. Then every fluid is specified in a section [fluid/physics/fluid_k] where k is the number of the fluid (k from 0 to fluid_number-1, the same enumeration is used internally). In this section, the density and the viscosity are declared.

Example: To declare two fluids, one should use in the data file: [fluid] [./physics] fluid_number = 2

[./fluid_0] density = 1; viscosity = 1;

[../fluid_1] density = 10; viscosity = 100;

Remark: in case both ways of declaring the fluids are used, the new one has priority. Remark: do not use "fluid_number = 1" with the old way, it will not work properly.

Definition at line 98 of file OseenData.hpp.

Member Typedef Documentation

◆ time_Type

Definition at line 106 of file OseenData.hpp.

◆ timePtr_Type

typedef std::shared_ptr<time_Type> timePtr_Type

Definition at line 107 of file OseenData.hpp.

◆ timeAdvance_Type

Definition at line 109 of file OseenData.hpp.

◆ timeAdvancePtr_Type

typedef std::shared_ptr<timeAdvance_Type> timeAdvancePtr_Type

Definition at line 110 of file OseenData.hpp.

Constructor & Destructor Documentation

◆ OseenData() [1/2]

OseenData ( )

Empty Constructor.

Definition at line 52 of file OseenData.cpp.

◆ OseenData() [2/2]

OseenData ( const OseenData oseenData)

Copy constructor.

Parameters
oseenDataOseenData

Definition at line 82 of file OseenData.cpp.

◆ ~OseenData()

virtual ~OseenData ( )
inlinevirtual

Virtual destructor.

Definition at line 128 of file OseenData.hpp.

Member Function Documentation

◆ operator=()

OseenData & operator= ( const OseenData oseenData)

Operator=.

Parameters
oseenDataOseenData

Definition at line 122 of file OseenData.cpp.

◆ setup()

void setup ( const GetPot dataFile,
const std::string &  section = "fluid" 
)

Read the dataFile and set all the quantities.

Parameters
dataFiledata file
sectionsection of the file

Definition at line 159 of file OseenData.cpp.

◆ showMe()

void showMe ( std::ostream &  output = std::cout) const

Display the values.

Definition at line 236 of file OseenData.cpp.

◆ setTimeData()

void setTimeData ( const timePtr_Type  timeData)
inline

Set data time container.

Parameters
TimeDatashared_ptr to TimeData container

Definition at line 169 of file OseenData.hpp.

◆ setTimeAdvanceData()

void setTimeAdvanceData ( const timeAdvancePtr_Type  timeAdvanceData)
inline

Set data time advance container.

Parameters
timeAdvanceDatashared_ptr to TimeAdvanceData container

Definition at line 178 of file OseenData.hpp.

◆ setDensity()

void setDensity ( const Real density,
const UInt  nfluid = 0 
)
inline

Set the density for the specified fluid.

Parameters
density
nfluidthe fluid number

Definition at line 188 of file OseenData.hpp.

◆ setViscosity()

void setViscosity ( const Real viscosity,
const UInt  nfluid = 0 
)
inline

Set the viscosity of the fluid.

Parameters
viscosity
nfluidthe fluid number

Definition at line 199 of file OseenData.hpp.

◆ setStokes()

void setStokes ( const bool  stokes)
inline

Set this instance of OseenData to either a Stokes or a Navier-Stokes problem.

Parameters
Stokesa boolean that is "true" for a Stokes problem and "false" for a Navier-Stokes problem

Definition at line 210 of file OseenData.hpp.

◆ setSemiImplicit()

void setSemiImplicit ( const bool  SI)
inline

Set the flag for the semi-implicit treatment of the shape derivatives in FSI simulations.

Parameters
SIthe flag for semi implicit treatment

Definition at line 219 of file OseenData.hpp.

◆ setUseShapeDerivatives()

void setUseShapeDerivatives ( const bool  SD)
inline

Set the flag for using shape derivatives.

Parameters
SDthe flag for using shape derivatives

Definition at line 232 of file OseenData.hpp.

◆ dataTime()

timePtr_Type dataTime ( ) const
inline

Get data time container.

Returns
shared_ptr to TimeData container

Definition at line 248 of file OseenData.hpp.

◆ dataTimeAdvance()

timeAdvancePtr_Type dataTimeAdvance ( ) const
inline

Get data time advance container.

Returns
shared_ptr to TimeAdvanceData container

Definition at line 257 of file OseenData.hpp.

◆ fluidNumber()

const UInt& fluidNumber ( ) const
inline

Get the number of the fluid.

Returns
M_fluidNumber the number of the current fluid

Definition at line 266 of file OseenData.hpp.

◆ density()

const Real& density ( const UInt n = 0) const
inline

Get the density of the fluid.

Parameters
nthe fluid number
Returns
M_density the density of fluid n

Definition at line 276 of file OseenData.hpp.

◆ viscosity()

const Real& viscosity ( const UInt n = 0) const
inline

Get the viscosity of the fluid.

Parameters
nthe fluid number
Returns
M_viscosity the viscosity of the fluid n

Definition at line 287 of file OseenData.hpp.

◆ uOrder()

std::string uOrder ( ) const
inline

Get the order of the finite elements used for velocity.

Returns
M_uOrder a string specifying the order of finite elements for velocity

Definition at line 297 of file OseenData.hpp.

◆ pOrder()

std::string pOrder ( ) const
inline

Get the order of the finite elements used for pressure.

Returns
M_pOrder a string specifying the order of finite elements for pressure

Definition at line 306 of file OseenData.hpp.

◆ verbose()

UInt verbose ( ) const
inline

Temporal output verbose.

Returns
M_verbose

Definition at line 315 of file OseenData.hpp.

◆ dumpInit()

Real dumpInit ( ) const
inline

Dumping of the results.

Returns
M_dumpInit the time for dumping of the results

Definition at line 324 of file OseenData.hpp.

◆ dumpPeriod()

UInt dumpPeriod ( ) const
inline

Get the frequency of the dumping.

Returns
M_dumpPeriod number of time steps after which one dump is performed

Definition at line 333 of file OseenData.hpp.

◆ factor()

Real factor ( ) const
inline

Get the amplification factor.

Returns
M_factor The amplification factor

Definition at line 342 of file OseenData.hpp.

◆ stabilization()

NSStabilization stabilization ( ) const
inline

Get the stabilization method.

Returns
M_stabMethod The method used for stabilizing

Definition at line 351 of file OseenData.hpp.

◆ isStokes()

bool isStokes ( ) const
inline

find out if this is a Stokes or Navier-Stokes problem

Returns
M_stokes Boolean that is "true" for a Stokes and "false" for a Navier-Stokes problem

Definition at line 361 of file OseenData.hpp.

◆ isSemiImplicit()

bool isSemiImplicit ( ) const
inline

Find out if a semi-implicit scheme is used.

Returns
M_semiImplicit "true" if a semi-implicit scheme is used, "false" otherwise

Definition at line 370 of file OseenData.hpp.

◆ useShapeDerivatives()

bool useShapeDerivatives ( ) const
inline

Get the flag for using shape derivatives.

Returns
M_shapeDerivatives Flag for shape derivatives

Definition at line 380 of file OseenData.hpp.

◆ domainVelImplicit()

bool domainVelImplicit ( ) const
inline

Get the flag for considering implicitly the fluid domain (when it is moving, e.g. ALE)

Returns
M_domainVelImplicit Flag for shape derivatives

Definition at line 391 of file OseenData.hpp.

◆ convectiveImplicit()

bool convectiveImplicit ( ) const
inline

Get the flag for considering implicitly the fluid convective term.

Returns
M_convectiveImplicit Flag for shape derivatives

Definition at line 402 of file OseenData.hpp.

◆ computeMeanValuesPerSection()

UInt computeMeanValuesPerSection ( ) const
inline

Get the number of mean valuNes per section.

Returns
M_computeMeanValuesPerSection number of mean values

Definition at line 411 of file OseenData.hpp.

◆ nbZSections()

UInt nbZSections ( ) const
inline

Get the number of NBZ-sections.

Returns
M_NbZSections Number of NBZ-sections

Definition at line 420 of file OseenData.hpp.

◆ toleranceSection()

Real toleranceSection ( ) const
inline

Tolerance section.

Returns
M_ToleranceSection The tolerance section

Definition at line 429 of file OseenData.hpp.

◆ xSectionFrontier()

Real xSectionFrontier ( ) const
inline

X-Section frontier.

Returns
M_XSectionFrontier The x-section frontier

Definition at line 438 of file OseenData.hpp.

◆ zSectionInit()

Real zSectionInit ( ) const
inline

Z section init.

Returns
M_ZSectionInit The initial z-section

Definition at line 447 of file OseenData.hpp.

◆ zSectionFinal()

Real zSectionFinal ( ) const
inline

Z section final.

Returns
M_ZSectionFinal The final z-section

Definition at line 456 of file OseenData.hpp.

◆ nbPolygonEdges()

UInt nbPolygonEdges ( ) const
inline

Number of edges of the polygon (in the mesh) describing the circle.

Returns
M_NbPolygonEdges The number of polygon edges

Definition at line 465 of file OseenData.hpp.

◆ conservativeFormulation()

bool conservativeFormulation ( ) const
inline

Returns wether the formulation of the momentum conservation equation is written in conservative form or not.

Returns
M_conservativeFormulation the output flag

Definition at line 474 of file OseenData.hpp.

Field Documentation

◆ M_time

timePtr_Type M_time
protected

Data containers for time and mesh.

Definition at line 484 of file OseenData.hpp.

◆ M_timeAdvance

timeAdvancePtr_Type M_timeAdvance
protected

Definition at line 485 of file OseenData.hpp.

◆ M_fluidNumber

UInt M_fluidNumber
protected

number of this fluid

Definition at line 491 of file OseenData.hpp.

◆ M_density

std::vector<Real> M_density
protected

density of each fluid

Definition at line 494 of file OseenData.hpp.

◆ M_viscosity

std::vector<Real> M_viscosity
protected

viscosity of each fluid

Definition at line 497 of file OseenData.hpp.

◆ M_uOrder

std::string M_uOrder
protected

order of finite elements for velocity

Definition at line 506 of file OseenData.hpp.

◆ M_pOrder

std::string M_pOrder
protected

order of finite elements for pressure

Definition at line 509 of file OseenData.hpp.

◆ M_verbose

UInt M_verbose
protected

temporal output verbose

Definition at line 518 of file OseenData.hpp.

◆ M_dumpInit

Real M_dumpInit
protected

time for starting the dumping of the results (Alex December 2003)

Definition at line 521 of file OseenData.hpp.

◆ M_dumpPeriod

UInt M_dumpPeriod
protected

frequency of the dumping (one dump after _dump_period time steps) (Alex December 2003)

Definition at line 524 of file OseenData.hpp.

◆ M_factor

Real M_factor
protected

amplification factor for moving domains

Definition at line 527 of file OseenData.hpp.

◆ M_stokes

bool M_stokes
protected

true: Stokes problem; false: Navier-Stokes problem

Definition at line 530 of file OseenData.hpp.

◆ M_stabMethod

NSStabilization M_stabMethod
protected

stabilization method

Definition at line 538 of file OseenData.hpp.

◆ M_semiImplicit

bool M_semiImplicit
private

To extract Mean Values at a given section z.

Definition at line 545 of file OseenData.hpp.

◆ M_shapeDerivatives

bool M_shapeDerivatives
private

Definition at line 546 of file OseenData.hpp.

◆ M_domainVelImplicit

bool M_domainVelImplicit
private

Definition at line 547 of file OseenData.hpp.

◆ M_convectiveImplicit

bool M_convectiveImplicit
private

Definition at line 548 of file OseenData.hpp.

◆ M_computeMeanValuesPerSection

UInt M_computeMeanValuesPerSection
private

Definition at line 549 of file OseenData.hpp.

◆ M_NbZSections

UInt M_NbZSections
private

Definition at line 550 of file OseenData.hpp.

◆ M_ToleranceSection

Real M_ToleranceSection
private

Definition at line 551 of file OseenData.hpp.

◆ M_XSectionFrontier

Real M_XSectionFrontier
private

Definition at line 552 of file OseenData.hpp.

◆ M_ZSectionInit

Real M_ZSectionInit
private

Definition at line 553 of file OseenData.hpp.

◆ M_ZSectionFinal

Real M_ZSectionFinal
private

Definition at line 554 of file OseenData.hpp.

◆ M_NbPolygonEdges

UInt M_NbPolygonEdges
private

Definition at line 555 of file OseenData.hpp.

◆ M_stabilizationList

StringDataList M_stabilizationList
private

Definition at line 557 of file OseenData.hpp.

◆ M_conservativeFormulation

bool M_conservativeFormulation
private

Definition at line 558 of file OseenData.hpp.


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