Chaste  Release::2017.1
StokesFlowProblemDefinition< DIM > Class Template Reference

#include <StokesFlowProblemDefinition.hpp>

+ Inheritance diagram for StokesFlowProblemDefinition< DIM >:
+ Collaboration diagram for StokesFlowProblemDefinition< DIM >:

Public Member Functions

 StokesFlowProblemDefinition (AbstractTetrahedralMesh< DIM, DIM > &rMesh)
 
virtual ~StokesFlowProblemDefinition ()
 
void SetViscosity (double mu)
 
double GetViscosity ()
 
void SetZeroFlowNodes (std::vector< unsigned > &rZeroFlowNodes)
 
void SetPrescribedFlowNodes (std::vector< unsigned > &rPrescribedFlowNodes, std::vector< c_vector< double, DIM > > &rPrescribedFlow)
 
virtual void Validate ()
 
- Public Member Functions inherited from ContinuumMechanicsProblemDefinition< DIM >
 ContinuumMechanicsProblemDefinition (AbstractTetrahedralMesh< DIM, DIM > &rMesh)
 
virtual ~ContinuumMechanicsProblemDefinition ()
 
void SetDensity (double density)
 
double GetDensity ()
 
void SetZeroDirichletNodes (std::vector< unsigned > &rZeroDirichletNodes)
 
std::vector< unsigned > & rGetDirichletNodes ()
 
std::vector< c_vector< double, DIM > > & rGetDirichletNodeValues ()
 
void SetBodyForce (c_vector< double, DIM > bodyForce)
 
void SetBodyForce (c_vector< double, DIM >(*pFunction)(c_vector< double, DIM > &rX, double t))
 
c_vector< double, DIM > GetBodyForce (c_vector< double, DIM > &rX, double t=0.0)
 
BodyForceType GetBodyForceType ()
 
c_vector< double, DIM > GetConstantBodyForce ()
 
c_vector< double, DIM > EvaluateBodyForceFunction (c_vector< double, DIM > &rX, double t)
 
TractionBoundaryConditionType GetTractionBoundaryConditionType ()
 
void SetTractionBoundaryConditions (std::vector< BoundaryElement< DIM-1, DIM > * > &rTractionBoundaryElements, std::vector< c_vector< double, DIM > > &rElementwiseTractions)
 
void SetTractionBoundaryConditions (std::vector< BoundaryElement< DIM-1, DIM > * > &rTractionBoundaryElements, c_vector< double, DIM >(*pFunction)(c_vector< double, DIM > &rX, double t))
 
void SetApplyNormalPressureOnDeformedSurface (std::vector< BoundaryElement< DIM-1, DIM > * > &rTractionBoundaryElements, double normalPressure)
 
void SetApplyNormalPressureOnDeformedSurface (std::vector< BoundaryElement< DIM-1, DIM > * > &rTractionBoundaryElements, double(*pFunction)(double t))
 
std::vector< BoundaryElement< DIM-1, DIM > * > & rGetTractionBoundaryElements ()
 
std::vector< c_vector< double, DIM > > & rGetElementwiseTractions ()
 
double GetNormalPressure ()
 
void SetPressureScaling (double scaleFactor)
 
c_vector< double, DIM > EvaluateTractionFunction (c_vector< double, DIM > &rX, double t)
 
double EvaluateNormalPressureFunction (double t)
 
void SetVerboseDuringSolve (bool verboseDuringSolve=true)
 
bool GetVerboseDuringSolve ()
 

Private Attributes

double mMu
 

Additional Inherited Members

- Static Public Attributes inherited from ContinuumMechanicsProblemDefinition< DIM >
static const double FREE = std::numeric_limits<double>::max()
 
- Protected Attributes inherited from ContinuumMechanicsProblemDefinition< DIM >
AbstractTetrahedralMesh< DIM, DIM > & mrMesh
 
double mDensity
 
BodyForceType mBodyForceType
 
c_vector< double, DIM > mConstantBodyForce
 
c_vector< double, DIM >(* mpBodyForceFunction )(c_vector< double, DIM > &rX, double t)
 
TractionBoundaryConditionType mTractionBoundaryConditionType
 
std::vector< BoundaryElement< DIM-1, DIM > * > mTractionBoundaryElements
 
std::vector< c_vector< double, DIM > > mElementwiseTractions
 
double mNormalPressure
 
double mOriginalNormalPressure
 
c_vector< double, DIM >(* mpTractionBoundaryConditionFunction )(c_vector< double, DIM > &rX, double t)
 
double(* mpNormalPressureFunction )(double t)
 
std::vector< unsignedmDirichletNodes
 
std::vector< c_vector< double, DIM > > mDirichletNodeValues
 
bool mVerboseDuringSolve
 

Detailed Description

template<unsigned DIM>
class StokesFlowProblemDefinition< DIM >

Class for defining everything needed for a solving the Stokes' Flow equations. This class mainly allows for the setting of the viscosity. It inherits from a class which allows for the setting of body force, density and various types of boundary condition.

Definition at line 48 of file StokesFlowProblemDefinition.hpp.

Constructor & Destructor Documentation

template<unsigned DIM>
StokesFlowProblemDefinition< DIM >::StokesFlowProblemDefinition ( AbstractTetrahedralMesh< DIM, DIM > &  rMesh)
inline

Constructor (initialises viscosity to -1 so can check if it is unset

Parameters
rMeshQuadratic mesh

Definition at line 59 of file StokesFlowProblemDefinition.hpp.

template<unsigned DIM>
virtual StokesFlowProblemDefinition< DIM >::~StokesFlowProblemDefinition ( )
inlinevirtual

Destructor

Definition at line 66 of file StokesFlowProblemDefinition.hpp.

Member Function Documentation

template<unsigned DIM>
double StokesFlowProblemDefinition< DIM >::GetViscosity ( )
inline
Returns
the viscosity. Exception thrown if this hasn't been set yet.

Definition at line 83 of file StokesFlowProblemDefinition.hpp.

References EXCEPTION, and StokesFlowProblemDefinition< DIM >::mMu.

Referenced by StokesFlowAssembler< DIM >::ComputeSpatialSpatialMatrixTerm().

template<unsigned DIM>
void StokesFlowProblemDefinition< DIM >::SetPrescribedFlowNodes ( std::vector< unsigned > &  rPrescribedFlowNodes,
std::vector< c_vector< double, DIM > > &  rPrescribedFlow 
)
inline

Set Dirichlet boundary conditions: provide a set of nodes and the prescribed flow on these nodes.

If you only want to set one component of the flow for the node rPrescribedFlowNodes[i], set the other components of rPrescribedFlow[i] to be StokesFlowProblemDefinition::FREE.

Parameters
rPrescribedFlowNodesvector of node indices.
rPrescribedFlowvector of prescribed flow values for these nodes.

Definition at line 112 of file StokesFlowProblemDefinition.hpp.

References ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodes, and ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodeValues.

template<unsigned DIM>
void StokesFlowProblemDefinition< DIM >::SetViscosity ( double  mu)
inline

Set the viscosity

Parameters
muviscosity

Definition at line 74 of file StokesFlowProblemDefinition.hpp.

template<unsigned DIM>
void StokesFlowProblemDefinition< DIM >::SetZeroFlowNodes ( std::vector< unsigned > &  rZeroFlowNodes)
inline

Set nodes on which to apply the boundary condition (u,v,w)=0, ie flow = 0 in all components. Just calls SetZeroDirichletNodes() on the parent class.

Parameters
rZeroFlowNodesNodes on which to apply the boundary conditions

Definition at line 97 of file StokesFlowProblemDefinition.hpp.

References ContinuumMechanicsProblemDefinition< DIM >::SetZeroDirichletNodes().

template<unsigned DIM>
virtual void StokesFlowProblemDefinition< DIM >::Validate ( )
inlinevirtual

Check all variables are set appropriately. Exceptions are thrown if any are not. Derived classes can override but should call this version as well.

Reimplemented from ContinuumMechanicsProblemDefinition< DIM >.

Definition at line 124 of file StokesFlowProblemDefinition.hpp.

References ContinuumMechanicsProblemDefinition< DIM >::Validate().

Member Data Documentation

template<unsigned DIM>
double StokesFlowProblemDefinition< DIM >::mMu
private

Dynamic viscosity

Definition at line 52 of file StokesFlowProblemDefinition.hpp.

Referenced by StokesFlowProblemDefinition< DIM >::GetViscosity().


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