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

Detailed Description
Builds finite element arrays for thermal diffusion and convection in 3-D domains with axisymmetry using 3-Node triangles.
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) |
Add body 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. | |
| void | CapacityToLHS (double coef=1) |
Add Consistent capacity matrix to left-hand side after multiplying it by coefficient coef. | |
| void | CapacityToRHS (double coef=1) |
Add Consistent capacity contribution to right-hand side after multiplying it by coefficient coef. | |
| virtual void | Convection (double coef=1.) |
| Add convection term to left-hand side. | |
| virtual void | ConvectionToRHS (double coef=1.) |
| Add convection term to right-hand side. | |
| DC3DAT3 (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. | |
| DC3DAT3 (const Side *sd, const Vect< double > &u, double time=0.) | |
| Constructor for a boundary side (transient case). | |
| DC3DAT3 (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. | |
| DC3DAT3 (const Element *el, const Vect< double > &u, double time=0.) | |
| Constructor for an element (transient case). | |
| DC3DAT3 (Side *sd) | |
| Constructor for a boundary side. | |
| DC3DAT3 (Element *el) | |
| Constructor for an element. | |
| DC3DAT3 () | |
| Default Constructor. | |
| void | DiagBC (int dof_type=NODE_DOF, int dof=0) |
| Update element matrix to impose bc by diagonalization technique. | |
| void | Diffusion (const LocalMatrix< double, 2, 2 > &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. | |
| 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. | |
| 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) |
| Return gradient of a vector in element. | |
| void | LCapacity (double coef=1) |
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. | |
| T_ * | Prev () |
| Return element matrix as a C-array. | |
| 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. | |
| ~DC3DAT3 () | |
| 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
| DC3DAT3 | ( | ) |
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 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 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 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 (of size 3) containing source at element nodes.[in] opt Vector is local (LOCAL_ARRAY) with size 3 or global (GLOBAL_ARRAY) with size = Number of nodes.
| void BodyRHS | ( | UserData< double > & | ud | ) |
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.
| 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).
References DC3DAT3::CapacityToLHS(), and DC3DAT3::CapacityToRHS().
| void CapacityToLHS | ( | double | coef = 1 |
) | [virtual] |
Add Consistent 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, 3, 3, 2, 2 >.
Referenced by DC3DAT3::Capacity().
| void CapacityToRHS | ( | double | coef = 1 |
) | [virtual] |
Add Consistent 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, 3, 3, 2, 2 >.
Referenced by DC3DAT3::Capacity().
| 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 LocalMatrix< double, 2, 2 > & | 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 Instance of class DMatrix containing diffusivity matrix [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, 3, 3, 2, 2 >.
| 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, 3, 3, 2, 2 >.
| 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 a vector in element.
- Parameters:
-
[in] u Vector for which gradient is computed.
| void LCapacity | ( | double | coef = 1 |
) |
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 DC3DAT3::LCapacityToLHS(), and DC3DAT3::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, 3, 3, 2, 2 >.
Referenced by DC3DAT3::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, 3, 3, 2, 2 >.
Referenced by DC3DAT3::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().
| 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