DC3DT4 Class Reference
[Heat Transfer]
#include <DC3DT4.h>

Detailed Description
Builds finite element arrays for thermal diffusion and convection in 3-D domains using 4-Node tetrahedra.
Note that members calculating element arrays have as an argument a double coef that will be multiplied by the contribution of the current element. This makes possible testing different algorithms.
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 (const Vect< double > &b, int opt=LOCAL_ARRAY) |
| Add body right-hand side term to right hand side. | |
| void | BodyRHS (UserData< double > &ud, double coef=1) |
Add body right-hand side term to right hand side after multiplying it by coefficient coef. | |
| void | BoundaryRHS (double flux) |
| Add boundary right-hand side flux to right hand side. | |
| void | BoundaryRHS (const Vect< double > &b, int opt=LOCAL_ARRAY) |
| Add boundary right-hand side term to right hand side after multiplying it by coefficient coef case where body source is given by a vector. | |
| void | BoundaryRHS (UserData< double > &ud, double coef=1) |
Add boundary right-hand side term to right hand side after multiplying it by coefficient coef. | |
| void | Capacity (double coef=1) |
Add Consistent capacity contribution to left and right-hand sides after multiplying it by coefficient coef. | |
| virtual void | CapacityToLHS (double coef=1) |
| Add consistent capacity contribution to left-hand side. | |
| virtual void | CapacityToRHS (double coef=1) |
| Add consistent capacity contribution to right-hand side. | |
| void | Convection (const Vect< Point< double > > &v, double coef=1) |
Add convection matrix to left-hand side after multiplying it by coefficient coef. | |
| void | Convection (const Point< double > &v, double coef=1) |
Add convection matrix to left-hand side after multiplying it by coefficient coef. | |
| void | Convection (double coef=1) |
| Add convection matrix to left-hand side after multiplying it by coefficient coef. | |
| virtual void | ConvectionToRHS (double coef=1.) |
| Add convection term to right-hand side. | |
| DC3DT4 (const Side *sd, const Vect< double > &u, double time, double deltat, int scheme) | |
| Constructor for a side (transient case) with specification of time integration scheme. | |
| DC3DT4 (const Element *el, const Vect< double > &u, double time, double deltat, int scheme) | |
| Constructor for an element (transient case) with specification of time integration scheme. | |
| DC3DT4 (const Side *sd, const Vect< double > &u, double time=0.) | |
| Constructor for a boundary side (transient case). | |
| DC3DT4 (const Element *el, const Vect< double > &u, double time=0.) | |
| Constructor for an element (transient case). | |
| DC3DT4 (const Side *sd) | |
| Constructor for a boundary side. | |
| DC3DT4 (const Element *el) | |
| Constructor for an element. | |
| DC3DT4 () | |
| Default Constructor. | |
| void | DiagBC (int dof_type=NODE_DOF, int dof=0) |
| Update element matrix to impose bc by diagonalization technique. | |
| void | Diffusion (const DMatrix< double > &diff, double coef=1) |
Add diffusion matrix to left hand side after multiplying it by coefficient coef. | |
| void | Diffusion (double coef=1) |
Add diffusion matrix to left hand side after multiplying it by coefficient coef. | |
| void | DiffusionToRHS (double coef=1) |
Add diffusion contribution to right hand side after multiplying it by coefficient coef. | |
| 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. | |
| Point< double > | Flux () const |
| Return (constant) heat flux in element. | |
| 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. | |
| Point< double > | Grad (const Vect< double > &u) const |
| Return gradient of vector u in element. | |
| void | LCapacity (double coef) |
Add lumped capacity contribution to left and right-hand sides after multiplying it by coefficient coef. | |
| void | LCapacityToLHS (double coef=1) |
Add lumped capacity matrix to left-hand side after multiplying it by coefficient coef. | |
| void | LCapacityToRHS (double coef=1) |
Add lumped capacity contribution to right-hand side after multiplying it by coefficient coef. | |
| void | LocalNodeVector (AbsVect< T_ > *b) |
| Localize Element Vector from a NodeVect instance. | |
| void | Periodic (double coef=1.e20) |
| Add contribution of periodic boundary condition (by a penalty technique). | |
| T_ * | Prev () |
| Return element matrix as a C-array. | |
| void | RHS_Convection (const Point< double > &v, double coef=1.) |
Add convection contribution to right-hand side after multiplying it by coefficient coef. | |
| LocalMatrix< T_, NSE_, NSE_ > & | SA () |
| Return side matrix as a LocalMatrix instance. | |
| void | setCapacity () |
| Add consistent capacity contribution to left and right-hand sides taking into account time integration scheme. | |
| void | setConvection () |
| Add convection contribution to left and/or right-hand side taking into account time integration scheme. | |
| void | setDiffusion () |
| Add diffusion contribution to left and/or right-hand side taking into account time integration scheme. | |
| void | setInitialSolution (const Vect< T_ > &u) |
| Set initial solution (previous time step). | |
| void | setLumpedCapacity () |
| Add lumped capacity contribution to left and right-hand sides taking into account time integration scheme. | |
| 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. | |
| ~DC3DT4 () | |
| Destructor. | |
Protected Member Functions | |
| void | Conduc (const string &exp) |
| Set thermal conductivity given by an algebraic expression. | |
| void | Conduc (const double &diff) |
| Set (constant) thermal conductivity. | |
| void | Init (const Side *sd) |
| Set side arrays to zero. | |
| void | Init (const Element *el) |
| Set element arrays to zero. | |
| void | RhoCp (const string &exp) |
| Set product of Density by Specific heat given by an algebraic expression. | |
| void | RhoCp (const double &rhocp) |
| Set product of Density by Specific heat (constants). | |
| void | setMaterial () |
| Set material properties. | |
Constructor & Destructor Documentation
| DC3DT4 | ( | ) |
Default Constructor.
Constructs an empty equation.
Constructor for an element (transient case).
- Parameters:
-
[in] el Pointer to element. [in] u Vect instance that contains solution at previous time step. [in] time Current time value (Default value is 0).
Constructor for a boundary side (transient case).
- Parameters:
-
[in] sd Pointer to side. [in] u Vect instance that contains solution at previous time step. [in] time Current time value (Default value is 0).
Constructor for an element (transient case) with specification of time integration scheme.
- Parameters:
-
[in] el Pointer to element. [in] u Vect instance that contains solution at previous time step. [in] time Current time value (Default value is 0). [in] deltat Value of time step [in] scheme Time Integration Scheme (): - FORWARD_EULER: for Forward Euler scheme
- BACKWARD_EULER: for Backward Euler scheme
- CRANK_NICOLSON: for Crank-Nicolson Euler scheme
Constructor for a side (transient case) with specification of time integration scheme.
- Parameters:
-
[in] sd Pointer to side. [in] u Vect instance that contains solution at previous time step. [in] time Current time value (Default value is 0). [in] deltat Value of time step [in] scheme Time Integration Scheme (): - FORWARD_EULER: for Forward Euler scheme
- BACKWARD_EULER: for Backward Euler scheme
- CRANK_NICOLSON: for Crank-Nicolson Euler scheme
Member Function Documentation
| void BodyRHS | ( | const Vect< double > & | b, | |
| int | opt = LOCAL_ARRAY | |||
| ) |
Add body right-hand side term to right hand side.
- Parameters:
-
[in] b Local vector containing source at element nodes. [in] opt Vector is local (LOCAL_ARRAY) with size 4 or global (GLOBAL_ARRAY) with size = Number of nodes.
| void BodyRHS | ( | UserData< double > & | ud, | |
| double | coef = 1 | |||
| ) |
Add body right-hand side term to right hand side after multiplying it by coefficient coef.
- Parameters:
-
[in] ud Instance of UserData or of an inherited class. Contains a member function that provides body source. [in] coef Coefficient to multiply by added term (default value = 1).
| void BoundaryRHS | ( | double | flux | ) |
Add boundary right-hand side flux to right hand side.
- Parameters:
-
[in] flux Vector containing source at side nodes.
| void BoundaryRHS | ( | const Vect< double > & | b, | |
| int | opt = LOCAL_ARRAY | |||
| ) |
Add boundary right-hand side term to right hand side after multiplying it by coefficient coef case where body source is given by a vector.
- Parameters:
-
[in] b Vector containing source at side nodes. [in] opt Vector is local (LOCAL_ARRAY) with size 3 or global (GLOBAL_ARRAY) with size = Number of nodes.
| void BoundaryRHS | ( | UserData< double > & | ud, | |
| double | coef = 1 | |||
| ) |
Add boundary right-hand side term to right hand side after multiplying it by coefficient coef.
- Parameters:
-
[in] ud Instance of UserData or of an inherited class. Contains a member function that provides body source. [in] coef Value by which the added term is multiplied [Default: 1]
| void Capacity | ( | double | coef = 1 |
) |
Add Consistent capacity contribution to left and right-hand sides after multiplying it by coefficient coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term (default value = 1).
| virtual void CapacityToLHS | ( | double | coef = 1 |
) | [virtual, inherited] |
Add consistent capacity contribution to left-hand side.
- Parameters:
-
[in] coef coefficient to multiply by the matrix before adding [default: 1]
| virtual void CapacityToRHS | ( | double | coef = 1 |
) | [virtual, inherited] |
Add consistent capacity contribution to right-hand side.
- Parameters:
-
[in] coef coefficient to multiply by the vector before adding [default: 1]
Add convection matrix to left-hand side after multiplying it by coefficient coef.
Case where velocity field is given by a vector v.
- Parameters:
-
[in] v Velocity vector. [in] coef Coefficient to multiply by added term (default value = 1).
| void Convection | ( | const Point< double > & | v, | |
| double | coef = 1 | |||
| ) |
Add convection matrix to left-hand side after multiplying it by coefficient coef.
- Parameters:
-
[in] v Constant velocity vector [in] coef Coefficient to multiply by added term (default value = 1).
| void Convection | ( | double | coef = 1 |
) | [virtual] |
Add convection matrix to left-hand side after multiplying it by coefficient coef.
Case where velocity field has been previouly defined
- Parameters:
-
[in] coef Coefficient to multiply by added term (default value = 1).
Reimplemented from Equa_Therm< double, 4, 4, 3, 3 >.
| 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 Diffusion | ( | const DMatrix< double > & | diff, | |
| double | coef = 1 | |||
| ) |
Add diffusion matrix to left hand side after multiplying it by coefficient coef.
Case where the diffusivity matrix is given as an argument.
- Parameters:
-
[in] diff Diffusion matrix (class DMatrix). [in] coef Coefficient to multiply by added term (default value = 1).
| void Diffusion | ( | double | coef = 1 |
) | [virtual] |
Add diffusion matrix to left hand side after multiplying it by coefficient coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term (default value = 1).
Reimplemented from Equa_Therm< double, 4, 4, 3, 3 >.
| void DiffusionToRHS | ( | double | coef = 1 |
) | [virtual] |
Add diffusion contribution to right hand side after multiplying it by coefficient coef.
To be used for explicit diffusion term
- Parameters:
-
[in] coef Coefficient to multiply by added term (default value = 1).
Reimplemented from Equa_Therm< double, 4, 4, 3, 3 >.
| 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().
Return gradient of vector u in element.
u is a local vector.
| void LCapacity | ( | double | coef | ) |
Add lumped capacity contribution to left and right-hand sides after multiplying it by coefficient coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term (default value = 1).
References DC3DT4::LCapacityToLHS(), and DC3DT4::LCapacityToRHS().
| void LCapacityToLHS | ( | double | coef = 1 |
) | [virtual] |
Add lumped capacity matrix to left-hand side after multiplying it by coefficient coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term (default value = 1).
Reimplemented from Equa_Therm< double, 4, 4, 3, 3 >.
Referenced by DC3DT4::LCapacity().
| void LCapacityToRHS | ( | double | coef = 1 |
) | [virtual] |
Add lumped capacity contribution to right-hand side after multiplying it by coefficient coef.
- Parameters:
-
[in] coef Coefficient to multiply by added term (default value = 1).
Reimplemented from Equa_Therm< double, 4, 4, 3, 3 >.
Referenced by DC3DT4::LCapacity().
| 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).
| void RHS_Convection | ( | const Point< double > & | v, | |
| double | coef = 1. | |||
| ) |
Add convection contribution to right-hand side after multiplying it by coefficient coef.
To be used for explicit convection term.
- Parameters:
-
[in] v Velocity vector. [in] coef Coefficient to multiply by added term (default value = 1).
| 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