NSP2DQ41 Class Reference
[Fluid Dynamics]
#include <NSP2DQ41.h>

Detailed Description
Builds finite element arrays for incompressible Navier-Stokes equations in 2-D domains using Q1/P0 element and a penaly formulation for the incompressibility condition.Public Member Functions | |
| T_ * | A () |
| Return element matrix as a C-array. | |
| T_ * | b () |
| Return element right-hand side as a C-array. | |
| void | BodyRHS (UserData< double > &ud) |
| Add body right-hand side term to right hand side after multiplication by coef. | |
| void | BoundaryRHS (UserData< double > &ud) |
| Add boundary right-hand side term to right hand side after multiplication by coef. | |
| void | Density (double dens) |
| Define constant density. | |
| void | DiagBC (int dof_type=NODE_DOF, int dof=0) |
| Update element matrix to impose bc by diagonalization technique. | |
| LocalMatrix< T_, NEE_, NEE_ > & | EA () |
| Return element matrix as a LocalMatrix instance. | |
| LocalVect< T_, NEE_ > & | Eb () |
| Return element right-hand side as a LocalVect instance. | |
| void | ElementVector (const Vect< T_ > &b, int dof=0, int dof_type=NODE_DOF) |
| Localize Element Vector. | |
| LocalVect< T_, NEE_ > & | Ep () |
| Return element matrix as a C-array. | |
| LinearSolver< T_ > & | getLinearSolver () |
| Return reference to linear solver instance. | |
| size_t | getNbEq () const |
| Return number of element equations. | |
| size_t | getNbNodes () const |
| Return number of element nodes. | |
| void | LHS1_Convection (double coef=1.) |
| Add convection contribution to left hand side after multiplication by coef. | |
| void | LHS2_Convection (double coef=1.) |
| Add convection contribution to left hand side after multiplication by coef. | |
| void | LMass (double coef=1.) |
| Add element lumped mass contribution to matrix after multiplication by coef. | |
| void | LocalNodeVector (AbsVect< T_ > *b) |
| Localize Element Vector from a NodeVect instance. | |
| void | Mass (double coef=1.) |
| Add element consistent mass contribution to matrix after multiplication by coef. | |
| NSP2DQ41 (const Side *sd, const Vect< double > &u, const double &time=0.) | |
| Constructor using side and previous time data. | |
| NSP2DQ41 (const Element *el, const Vect< double > &u, const double &time=0.) | |
| Constructor using element and previous time data. | |
| NSP2DQ41 (const Side *sd) | |
| Constructor using Side data. | |
| NSP2DQ41 (const Element *el) | |
| Constructor using Element data. | |
| NSP2DQ41 () | |
| Default Constructor. | |
| void | Penal (double coef=1.) |
| Add element penalty contribution to matrix after multiplication by coef. | |
| void | Periodic (double coef=1.e20) |
| Add contribution of periodic boundary condition (by a penalty technique). | |
| LocalVect< double, 4 > | PM () |
| Pressure Matrix. | |
| void | PresMat () |
| Add element contribution to pressure mass matrix. | |
| double | Pressure (double coef=1.) |
| Calculate element pressure by penalization. | |
| T_ * | Prev () |
| Return element matrix as a C-array. | |
| void | RHS_Convection (double coef=1.) |
| Add convection contribution to right hand side after multiplication by coef. | |
| void | RHS_Viscous (double coef=1.) |
| Add element viscous contribution to right hand side after multiplication by coef. | |
| LocalMatrix< T_, NSE_, NSE_ > & | SA () |
| Return side matrix as a LocalMatrix instance. | |
| void | setInitialSolution (const Vect< T_ > &u) |
| Set initial solution (previous time step). | |
| double | setMaterialProperty (const string &exp, const string &prop) |
| Define a material property by an algebraic expression. | |
| void | setMesh (class Mesh &m) |
| Define mesh and renumber DOFs after removing imposed ones. | |
| void | SideVector (const Vect< T_ > &b) |
| Localize Side Vector. | |
| void | updateBC (const Vect< T_ > &bc) |
| Update Right-Hand side by taking into account essential boundary conditions. | |
| void | Viscosity (double visc) |
| Define constant viscosity. | |
| void | Viscous (double coef=1.) |
| Add element viscous contribution to matrix after multiplication by coef. | |
| ~NSP2DQ41 () | |
| Destructor. | |
Protected Member Functions | |
| void | Density (const char *exp) |
| Set Density given by an algebraic expression. | |
| void | Density (const double &dens) |
| Set (constant) Viscosity. | |
| void | Init (const Side *sd) |
| Set side arrays to zero. | |
| void | Init (const Element *el) |
| Set element arrays to zero. | |
| void | setMaterial () |
| Set material properties. | |
| void | ThermalExpansion (const char *exp) |
| Set thermal expansion coefficient given by an algebraic expression. | |
| void | ThermalExpansion (const double *e) |
| Set (constant) thermal expansion coefficient. | |
| void | Viscosity (const char *exp) |
| Set viscosity given by an algebraic expression. | |
| void | Viscosity (const double &visc) |
| Set (constant) Viscosity. | |
Constructor & Destructor Documentation
| NSP2DQ41 | ( | ) |
Default Constructor.
Builds an empty equation
Member Function Documentation
| void DiagBC | ( | int | dof_type = NODE_DOF, |
|
| int | dof = 0 | |||
| ) | [inherited] |
Update element matrix to impose bc by diagonalization technique.
- Parameters:
-
[in] dof_type DOF type option. To choose among the enumerated values: - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
[in] dof DOF setting: - = 0, All DOFs are taken into account [ default ]
- != 0, Only DOF No. dof is handled in the sustem
References Side::getCode(), Node::getCode(), and Node::getLabel().
| void ElementVector | ( | const Vect< T_ > & | b, | |
| int | dof = 0, |
|||
| int | dof_type = NODE_DOF | |||
| ) | [inherited] |
Localize Element Vector.
- Parameters:
-
[in] b Global vector to be localized [in] dof_type DOF type option. To choose among the enumerated values: - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
[in] dof DOF setting: - = 0, All DOFs are taken into account [ default ]
- != 0, Only DOF No. dof is handled in the sustem
References Equation::b(), Side::getDOF(), Node::getDOF(), Side::getNbDOF(), and Node::getNbDOF().
| void LHS1_Convection | ( | double | coef = 1. |
) |
Add convection contribution to left hand side after multiplication by coef.
First term, explicit velocity, implicit velocity derivatives
| void LHS2_Convection | ( | double | coef = 1. |
) |
Add convection contribution to left hand side after multiplication by coef.
Second term, implicit velocity, explicit velocity derivatives
| void LocalNodeVector | ( | AbsVect< T_ > * | b | ) | [inherited] |
Localize Element Vector from a NodeVect instance.
- Parameters:
-
[in] b Pointer to global vector to be localized. The resulting local vector can be accessed by attribute ePrev. This member function is to be used if a constructor with Element was invoked.
References Node::getLabel(), and Node::getNbDOF().
| void Periodic | ( | double | coef = 1.e20 |
) |
Add contribution of periodic boundary condition (by a penalty technique).
Boundary nodes where periodic boundary conditions are to be imposed must have codes equal to PERIODIC_A on one side and PERIODIC_B on the opposite side.
- Parameters:
-
[in] coef Value of penalty parameter (default = 1.e20).
| double setMaterialProperty | ( | const string & | exp, | |
| const string & | prop | |||
| ) | [inherited] |
Define a material property by an algebraic expression.
- Parameters:
-
[in] exp Algebraic expression [in] prop Property name
- Return values:
-
ret Return value in expression evaluation: - ret=0, Normal evaluation
- ret!=0, An error message is displayed.
Referenced by Equa_Therm< double, 4, 4, 3, 3 >::Conduc(), Equa_Solid< double, 4, 8, 2, 4 >::Density(), Equa_Fluid< double, 4, 8, 2, 4 >::Density(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::ElectricConductivity(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::ElectricResistivity(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::MagneticPermeability(), Equa_Solid< double, 4, 8, 2, 4 >::Poisson(), Equa_Therm< double, 4, 4, 3, 3 >::RhoCp(), Equa_Fluid< double, 4, 8, 2, 4 >::ThermalExpansion(), Equa_Fluid< double, 4, 8, 2, 4 >::Viscosity(), and Equa_Solid< double, 4, 8, 2, 4 >::Young().
| void SideVector | ( | const Vect< T_ > & | b | ) | [inherited] |
Localize Side Vector.
- Parameters:
-
[in] b Global vector to be localized - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
References Equation::b(), Node::getDOF(), and Node::getNbDOF().
| void updateBC | ( | const Vect< T_ > & | bc | ) | [inherited] |
Update Right-Hand side by taking into account essential boundary conditions.
Init solution.
- Parameters:
-
[in] bc Vector that contains imposed values at all DOFs