ThermoFemPhysics
The GeMA Thermo FEM Physics Plugin
Loading...
Searching...
No Matches
GmpThermoInterface Class Referenceabstract

Basic class for the hydraulic interface element plugin object. More...

#include <gmpThermoInterface.h>

Inheritance diagram for GmpThermoInterface:
Collaboration diagram for GmpThermoInterface:

Public Types

enum  InterfacePropertyIds { IOPEN_ID = GmpThermoFemPhysics::NUM_PROPER_IDS , Kti_ID , Htc_ID , NUM_PROPER_IDS }
 IDs for physics element properties. More...
 
- Public Types inherited from GmpThermoFemPhysics
enum  PhysicsAttributeIds { ISOPARAMETRIC_ID , HAS_ELEMENT_GENERATION_ID , HF_MODE_ID , HF_DIRECT_ID }
 IDs for physics attributes. More...
 
enum  StateVarIds { T_ID }
 IDs fo physics state vars. More...
 
enum  NodeAttributeIds { Q_NA_ID }
 IDs for physics node attributes. More...
 
enum  GaussAttributeIds { Q_GA_ID }
 IDs for physics Gauss attributes. More...
 
enum  ElementPropertyIds {
  K_ID , THICKNESS_ID , G_ID , RHO_ID ,
  CP_ID , NUM_PROPER_IDS
}
 IDs for physics element properties. More...
 
enum  BoundaryConditionIds { FIXED_T_BC_ID , FIXED_HF_BC_ID , CONVECTIVE_BC_ID , POINT_GENERATION_BC_ID }
 IDs for accepted boundary condition types. More...
 
enum  BoundaryConditionValueIds {
  BC_T_ID , BC_Q_ID , BC_QDIR_ID , BC_H_ID ,
  BC_TA_ID , BC_G_ID , BC_POS_ID
}
 IDs for property values from accepted boundary condition types. More...
 
- Public Types inherited from GmpFemPhysicsCommon
enum  DiscSetRequiredMode
 
enum  DerivedResultsRecoveryMode
 
typedef TList< Attribute > AttributeList
 
typedef TList< Value > ValueList
 
- Public Types inherited from GmpFemPhysics
enum  FemResultType
 
enum  FemSupportedParallelMethods
 

Public Member Functions

 GmpThermoInterface (const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
virtual ~GmpThermoInterface ()
 Destructor.
 
virtual const QVariantMap * physicsMetaDataMap ()
 Returns a reference for the hydraulic interface attribute map, built when the function is called for the first time.
 
virtual bool checkAndLoadAttributeAccessors (LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
 Reimplementation of the common function to set initial gauss attributes.
 
virtual bool beforeElementStiffnessLoop (const GmpFemMatrixSet &elemMatrices, const GmpFemVectorSet &elemVectors)
 
virtual GmpFemPhysics::FemResultType fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element matrices and vectors for a generic Interface element.
 
virtual bool calcDerivedResults (bool nonLinearSolver)
 Calc velocity and flow on nodes and/or Gauss points.
 
virtual bool addStateItemsToGroup (GmStateDump *state, bool fixedHint, int groupId)
 
virtual void fillStorageCompMatrix (const GmElement *e, const GmVector *coord, int ip, GmMatrix &Sc, const GmVector &N, double c)
 Calculates the compressibility matrix inside the fracture.
 
virtual void fillFlowMatrix (const GmElement *e, GmMatrix &Kc, const GmMatrix Bp, const GmVector flowParam, const GmVector N, double c)
 Calculates the flow stiffness matrix according to ....
 
virtual bool setInitialConditions () const
 sets the initial value of hydraulic gauss attributes.
 
virtual double fillBtMatrix (const GmShape *shape, const GmVector &ncoord, const GmMatrix &X, const GmVector &N, const GmMatrix &J, GmMatrix &Bt)=0
 Given a point 'ncoord', the element coordinate matrix 'X', the point shape functions 'N' and the transformation Jacobian 'J', fills the matrix with cartesian partial derivatives Bt using the provided shape function and returns the scaled jacobian determinant.
 
virtual void fillElementTemperature (const GmElement *e, GmVector &pe)
 Given an element, fills the vector pe with nodal Temperature.
 
virtual double initiallyOpenElem (const GmElement *e, const GmVector *coord, int ip) const
 Returns the initially open element

 
virtual bool fillThermalConductivityParameters (const GmElement *e, GmVector &flowParam, const GmVector *coord, int i)
 Returns the thermal conductivity parameters: [kl, Ckt, Ckb].
 
virtual double heatTransferCoeficient (const GmElement *e, const GmVector *coord, int ip) const
 Returns the heat trasnfer coefficient at the top.
 
virtual double fractureHeatConductivity (const GmElement *e, const GmVector *coord, int ip) const
 Returns the longitudinal fracture conductivity.
 
- Public Member Functions inherited from GmpThermoFemPhysics
 GmpThermoFemPhysics (const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 Constructor. Will be called by the plugin loading code.
 
virtual ~GmpThermoFemPhysics ()
 Destructor.
 
virtual const char * pluginName () const
 
virtual const char * pluginType () const
 
virtual FemResultType fillElementDataForBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element stiffness matrix elemK and/or the force vector elemF for element 'e', taking into account convective heat transfer, fixed heat flux and/or point generation boundary conditions, as indicated by the bc parameter.
 
virtual bool fixedNodalDofsBc (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const
 See comments on base class. Fills vectors with prescribed node temperatures.
 
virtual bool supportsStateDumping ()
 Tell the world that the temperature physics supports state dumping.
 
void fillConductivityMatrix (GmMatrix &K, const GmElement *e, const GmVector *ip, int ipIndex)
 Fills the conductivity matrix _kMat evaluating accessor at the integration point ip of element e (ncoord can be NULL if accessors do not accept user functions), taking in consideration that the accessor might return scalars or vectors.
 
- Public Member Functions inherited from GmpFemPhysicsCommon
 GmpFemPhysicsCommon (GmSimulationData *simulation, QString id, QString description, const GmpFemPhysicsCommonMaterialFactory *matFactory, const GmLogCategory &logger)
 
void printParameters (const GmLogCategory &logger)
 
const QVariantattribute (int id) const
 
GmValueAccessornodeAc () const
 
int nodeDim () const
 
bool isoParametric () const
 
int svCount () const
 
GmValueAccessorsvAc (int id) const
 
int baseDof (int id) const
 
GmCellAccessorpropertyAc (int id) const
 
bool constantProperty (int id) const
 
GmValueAccessornodeAttrAc (int id) const
 
GmCellAccessorcellAttrAc (int id) const
 
GmGaussAccessorgaussAttrAc (int id) const
 
const GmBoundaryConditionboundaryCondition (int id) const
 
const GmContactBoundaryConditioncontactCondition (int id) const
 
GmBoundaryConditionAccessorbcAc (int id) const
 
GmContactBoundaryConditionAccessorcontactAc (int id) const
 
bool constantBc (int id) const
 
bool constantContactBc (int id) const
 
const QVector< const GmBoundaryCondition * > & calcBoundaryConditions () const
 
GmValueAccessorloadAc (int loadId) const
 
GmDiscontinuityAccessordiscontinuityAc (int discId) const
 
GmSegmentCell2DIntersectionCoordAccessordiscontinuity2dIntersectionCoordAc () const
 
GmValueAccessorcloneSvAcWithDifferentUnit (int id, QString unitSystemName, QString defUnit) const
 
GmCellAccessorclonePropertyAcWithDifferentUnit (int id, QString unitSystemName, QString defUnit) const
 
GmValueAccessorcloneNodeAttrAcWithDifferentUnit (int id, QString unitSystemName, QString defUnit) const
 
GmCellAccessorcloneCellAttrAcWithDifferentUnit (int id, QString unitSystemName, QString defUnit) const
 
GmGaussAccessorcloneGaussAttrAcWithDifferentUnit (int id, QString unitSystemName, QString defUnit) const
 
const GmpFemPhysicsCommonMaterialmaterial (const GmElement *e) const
 
const QVector< GmpFemPhysicsCommonMaterial * > & materialList () const
 
bool calcDerivedResult (int recoveryMode, GmValueAccessor *nodeAc, GmGaussAccessor *gaussAc, int resultId=-1)
 
void fillElementNodeValues (const GmValueAccessor *ac, const GmElement *e, GmVector &v, int nv=-1) const
 
bool fillMissingNodeValues (GmValueAccessor *ac)
 
bool fillScalarFixedNodalBcLists (int bcId, int propertyId, int dofId, QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const
 
bool fillVectorFixedNodalBcLists (int bcId, int propertyId, int dofId, bool ignoreZeroValues, bool ignoreDefValues, QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const
 
bool fillMultiScalarFixedNodalBcLists (int bcId, const QVector< int > &propertyIds, int dofId, bool ignoreZeroValues, bool ignoreDefValues, QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const
 
virtual bool checkLoadedData ()
 
void addMaterialTranslation (const char *modelName, const char *physicsName, int modelIndex, bool defaultMaterial)
 
GmpFemPhysicsCommonMaterialmaterial (QString modelName) const
 
- Public Member Functions inherited from GmpFemPhysics
 GmpFemPhysics (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
GmElementMeshmesh () const
 
const GmCellGroupSetmeshGroupSet () const
 
int numSupportedExternalLoads () const
 
const GmCellGroupSetexternalLoadGroupSet (int loadId) const
 
const QMap< QString, const GmBoundaryCondition * > & boundaryConditions () const
 
GmDiscontinuitySetdiscontinuitySet () const
 
virtual bool checkPhysicsDependencies (const QVector< GmpFemPhysics * > &physicsList, int index)
 
virtual bool dofByElement (bool *fixed=NULL, bool *addOnly=NULL, bool *trackChanges=NULL) const
 
virtual const GmElementDofdofMapping (const GmElement *e) const
 
virtual void afterElementStiffnessLoop ()
 
virtual bool fixedNodalForcesBc (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values) const
 
virtual FemResultType fillContactData (const GmContactBoundaryCondition *cbc, int bcIndex1, int bcIndex2, GmMatrixDof &dofMap, GmpFemMatrixSet &matrixSet, GmpFemVectorSet &vecSet)
 
virtual FemResultType fillElementDataForLoads (const GmElement *e, int loadId, GmpFemVectorSet &elemVectors)
 
virtual bool fillStateControlMapData (QVariantMap *map)
 
virtual bool stateControlMapDataLoaded (QVariantMap *map)
 
virtual bool stateAboutToBeSaved (GmStateDump *state)
 
virtual bool stateSaved (GmStateDump *state)
 
virtual bool stateAboutToBeLoaded (GmStateDump *state)
 
virtual bool stateLoaded (GmStateDump *state)
 
virtual QList< int > changedElements () const
 
virtual void clearChangedElements ()
 
const GmIntegrationRuleelementIntegrationRule (GmCellType type) const
 
const GmBorderIntegrationRuleborderIntegrationRule (GmCellType type, int borderIndex) const
 
const GmBorderIntegrationRulefaceIntegrationRule (GmCellType type, int faceIndex) const
 
const GmBorderIntegrationRuleedgeIntegrationRule (GmCellType type) const
 
int integrationRuleSet () const
 
bool setIntegrationRuleSet (int ruleSet)
 
virtual bool loadPrivateData (LuaTable &table)
 

Protected Member Functions

virtual const GmElementDofdofMapping (GmCellType type) const
 
void fillMiddleCoordinates (const GmElement *e, GmMatrix Xnode, GmMatrix &MX)
 Computes the coordinate at the middle plane of the interface element . Given an element 'e' and the nodal coordinates 'Xnode', fills and returns the matrix with coordinates at the middle plane 'MX'.
 
- Protected Member Functions inherited from GmpThermoFemPhysics
virtual void calcElementDerivedResultAtPoints (const GmElement *e, int resultId, const GmMatrix &evalPoints, bool evalAtIp, GmMatrix &result)
 The virtual function used by calcDerivedResults() to effectivelly calculate the heat flux at the given evaluation points.
 
virtual bool isAxisymmetric ()
 Returns TRUE only for axisymmetric models.
 
virtual double axisymmetricFactor (const GmElement *e, const GmMatrix &X, const GmVector &N) const =0
 Returns the factor that should be applied when using axis symetric elements. 1.0 for other etypes.
 
- Protected Member Functions inherited from GmpFemPhysicsCommon
virtual bool supportsCellType (GmCellType type) const
 
virtual bool supportsParallel (FemSupportedParallelMethods methodType) const
 
virtual Unit dofUnit (int dof) const
 
virtual Unit timeUnit () const
 
virtual GmVector timeSim () const
 
virtual const QList< QPair< int, GmValueAccessor * > > & dofForceAttributes () const
 
virtual const QStringListsupportedBcTypes () const
 
virtual const QStringListsupportedContactBcTypes () const
 
virtual bool bcAffectsCalc (const GmBoundaryCondition *bc) const
 
virtual const QStringListsupportedExternalLoads () const
 
virtual bool checkAndLoadPrivateData (LuaTable &table)
 
virtual bool checkMeshDimension (int ndim)
 
virtual bool checkAndLoadDofMapping (LuaTable &table)
 
virtual bool checkAndLoadPropertyAccessors (LuaTable &table)
 
virtual bool checkAndLoadExternalLoadAccessors (LuaTable &loadsTable)
 
virtual bool checkAndLoadBcAccessors ()
 
virtual bool checkAndLoadContactBcAccessors ()
 
virtual bool checkAndLoadDiscontinuitySetAccessors (LuaTable &table)
 
QString accessorNameList (const QVector< T * > list) const
 
bool checkAndLoadPropertyAccessorsAux (LuaTable &table, const QList< Value > &defList, QVector< GmCellAccessor * > &accessors, QVector< bool > &constants)
 
bool checkAndLoadBcAccessorsAux (QString attrName, QString msgPrefix, QMap< QString, const T * > &bcMap, QVector< const T * > &boundaryConditions, QVector< Ac * > &bcAccessors, QVector< bool > &constantBcValues, QStringList &boundaryConditionTypes, QVector< const T * > *calcBoundaryConditions, Ac *(GmPhysics::*acGetFn)(const T *, QString, QString, Unit, bool, int, int, int, bool, bool))
 
bool checkAndLoadNodeAttributeAccessors (LuaTable &table, const QList< Value > &naList, QVector< GmValueAccessor * > &accessors, GmpFemPhysicsCommonMaterial *m=NULL)
 
bool checkAndLoadCellAttributeAccessors (LuaTable &table, const QList< Value > &caList, QVector< GmCellAccessor * > &accessors, GmpFemPhysicsCommonMaterial *m=NULL)
 
bool checkAndLoadGaussAttributeAccessors (LuaTable &table, const QList< Value > &gaList, QVector< GmGaussAccessor * > &accessors, GmpFemPhysicsCommonMaterial *m=NULL)
 
bool checkAndLoadSavedGaussAttributes (const QList< int > &attrIdList, QString prefix, int numGaussAttributes, QVector< int > &savedIdList)
 
bool createMaterials (LuaTable &table)
 
bool loadAttributes (LuaTable &table)
 
void loadUnitSystemData (LuaTable &table)
 
QString getUnit (QString id, QString defUnit) const
 
bool loadAdditionalPrivateData (LuaTable &table, GmpFemPhysicsData &elemData)
 
bool loadNodeData (LuaTable &table, GmpFemPhysicsData &elemData)
 
bool loadElementData (LuaTable &table, GmpFemPhysicsData &elemData)
 
bool loadNeuralNetworkData (LuaTable &table, const char *name, GmpFemNeuralNetwork *netData)
 
- Protected Member Functions inherited from GmpFemPhysics
GmGaussAccessorgaussAttributeAccessor (GmElementMesh *mesh, QString stdAttributeName, QString msgDescription, LuaTable &table, Unit desiredUnit, bool required, int type=-1, int nlin=-1, int ncol=-1, int history=-1, bool canBeFunction=true, bool create=false, QString createFormat="", int createHistory=-1, bool ignoreWarnings=false)
 
virtual GmGaussAccessorcreateGaussAttributeAccessor (GmElementMesh *mesh, QString id, int snum, bool locked, Unit desiredUnit, const GmLogCategory &logger) const
 

Additional Inherited Members

- Static Public Member Functions inherited from GmpFemPhysicsCommon
static T listFromVariant (const QVariant &v)
 
static void fillMatrixFromPropertyAc (GmCellAccessor *ac, const GmElement *e, const GmVector *coord, int ip, GmMatrix &K)
 
- Public Attributes inherited from GmpFemPhysicsCommon
 DS_IGNORED
 
 DS_REQUIRED
 
 DS_OPTIONAL
 
 RECOVER_AT_GAUSS
 
 RECOVER_AT_NODES
 
 DIRECT_NODE_EVAL
 
 ADD_RESULTS
 
 IP_ONLY
 
 GAUSS_FILLED
 
- Public Attributes inherited from GmpFemPhysics
 FEM_RESULT_OK
 
 FEM_ERROR_FI
 
 FEM_ERROR
 
 FEM_PARALLEL_FILL_ELEMENT_DATA
 
 FEM_PARALLEL_FILL_ELEMENT_DATA_BC
 
 FEM_PARALLEL_FILL_ELEMENT_DATA_EXT_LOADS
 
 FEM_PARALLEL_FILL_CONTACT_DATA
 
- Protected Attributes inherited from GmpFemPhysicsCommon
GmElementDof_dofMap [GM_NUM_CELL_TYPES]
 
unsigned int _parallelMethods
 
- Protected Attributes inherited from GmpFemPhysics
GmElementMesh_mesh
 
const GmCellGroupSet_gs
 
int _intRuleSet
 
GmDiscontinuitySet_discSet
 
QMap< QString, const GmBoundaryCondition * > _bcMap
 
QMap< QString, const GmContactBoundaryCondition * > _cbcMap
 
QVector< const GmCellGroupSet * > _externalLoadGroupSets
 

Detailed Description

Basic class for the hydraulic interface element plugin object.

This physics plugin calculates temperature inside the fracture

Member Enumeration Documentation

◆ InterfacePropertyIds

IDs for physics element properties.

Enumerator
IOPEN_ID 

Id for retrieving the initially open element accessor.

Kti_ID 

Id for retrieving the longitudinal thermal conductivity tensor accessor.

NUM_PROPER_IDS 

The number of property ids above.

Member Function Documentation

◆ addStateItemsToGroup()

bool GmpThermoInterface::addStateItemsToGroup ( GmStateDump * state,
bool fixedHint,
int groupId )
virtual

Reimplemented from GmpFemPhysics.

◆ beforeElementStiffnessLoop()

bool GmpThermoInterface::beforeElementStiffnessLoop ( const GmpFemMatrixSet & elemMatrices,
const GmpFemVectorSet & elemVectors )
virtual

Reimplemented from GmpThermoFemPhysics.

◆ calcDerivedResults()

bool GmpThermoInterface::calcDerivedResults ( bool nonLinearSolver)
virtual

Calc velocity and flow on nodes and/or Gauss points.

Reimplemented from GmpThermoFemPhysics.

◆ checkAndLoadAttributeAccessors()

bool GmpThermoInterface::checkAndLoadAttributeAccessors ( LuaTable & nodeTable,
LuaTable & cellTable,
LuaTable & gaussTable )
virtual

Reimplementation of the common function to set initial gauss attributes.

Reimplemented from GmpFemPhysicsCommon.

◆ dofMapping()

const GmElementDof * GmpThermoInterface::dofMapping ( GmCellType type) const
protectedvirtual

Reimplemented from GmpFemPhysicsCommon.

◆ fillElementData()

GmpFemPhysics::FemResultType GmpThermoInterface::fillElementData ( const GmElement * e,
GmpFemMatrixSet & elemMatrices,
GmpFemVectorSet & elemVectors )
virtual

Fills the element matrices and vectors for a generic Interface element.

Reimplemented from GmpThermoFemPhysics.

◆ fillElementTemperature()

void GmpThermoInterface::fillElementTemperature ( const GmElement * e,
GmVector & pe )
virtual

Given an element, fills the vector pe with nodal Temperature.

Given an element, fills the vector pe with nodal temperature. The vector should have size equal to the number of calculated nodes.

◆ fillFlowMatrix()

void GmpThermoInterface::fillFlowMatrix ( const GmElement * e,
GmMatrix & Kc,
const GmMatrix dNp,
const GmVector flowParam,
const GmVector Np,
double c )
virtual

Calculates the flow stiffness matrix according to ....

Calculates the flow stiffness matrix due to permeability contribution or permeability matrix for element 'e' at the given integration point (coord, ip) storing the result at the Kc matrix. Bp is the strain pore pressure matrix and c a constant equal to w * h * detJ.

This function can operate either in an iso parametric setting (Kc = n x n) or in a super parametric setting (Kc = nf x nf) where n is the number of element nodes and nf the number of element corner nodes.

Returns Kc = Bp.t() * Kaux * Bp * c, where c should be equal to w * h * detJ

◆ fillMiddleCoordinates()

void GmpThermoInterface::fillMiddleCoordinates ( const GmElement * e,
GmMatrix Xnode,
GmMatrix & MX )
protected

Computes the coordinate at the middle plane of the interface element . Given an element 'e' and the nodal coordinates 'Xnode', fills and returns the matrix with coordinates at the middle plane 'MX'.

See comments on base class. Fills matrix with middle coordinates.

◆ fillStorageCompMatrix()

void GmpThermoInterface::fillStorageCompMatrix ( const GmElement * e,
const GmVector * coord,
int ip,
GmMatrix & Sc,
const GmVector & Np,
double c )
virtual

Calculates the compressibility matrix inside the fracture.

Calculates the matrix of thermal "storage / compressibility" for the interface element storing the result at the Sc matrix.
N is the shape function vector and c = w * h * detJ.

This function can operate either in an iso parametric setting (Sc = n x n) or in a super parametric setting (Sc = nf x nf) where n is the number of element corner nodes at middle point.

Returns Sc = N * (rhoF*CpF) * N.t() * c

◆ fillThermalConductivityParameters()

bool GmpThermoInterface::fillThermalConductivityParameters ( const GmElement * e,
GmVector & flowParam,
const GmVector * coord,
int i )
virtual

Returns the thermal conductivity parameters: [kl, Ckt, Ckb].

Fills the hydraulic conductivity for longitudinal and normal fluid flow. The longitudinal conductivity is computed according to cubic's law. Returns flowParam = [kl, Lkt, Lkb].

◆ physicsMetaDataMap()

const QVariantMap * GmpThermoInterface::physicsMetaDataMap ( )
virtual

Returns a reference for the hydraulic interface attribute map, built when the function is called for the first time.

Reimplemented from GmpThermoFemPhysics.

◆ setInitialConditions()

bool GmpThermoInterface::setInitialConditions ( ) const
virtual

sets the initial value of hydraulic gauss attributes.

Sets the initial conditions required by interface elements. An = normal aperture.

Returns true


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