CoupledTMFemPhysics
The GeMA Coupled Thermo-Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpCoupledTMMaterial.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_PLUGIN_COUPLED_TM_MATERIAL_H_
25#define _GEMA_PLUGIN_COUPLED_TM_MATERIAL_H_
26
27#include "gmpCoupledTMConfig.h"
28
29#include <gmpFemPhysicsCommonMaterial.h>
30#include <gmpMechanicalMaterial.h>
31#include <gmpInterfaceMaterial.h>
32
36class GMP_COUPLED_TM_PHYSICS_API_EXPORT GmpCoupledTMMaterial : public GmpFemPhysicsCommonMaterial
37{
38public:
39
41 GmpCoupledTMMaterial(int typeIndex, QString typeName, const GmLogCategory& logger)
42 : GmpFemPhysicsCommonMaterial(typeIndex, typeName, logger)
43 {
44 _thermoMaterial = NULL;
45 _mechanoMaterial = NULL;
46 }
47
50
52 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
53 {
54 Q_UNUSED(simulation);
55 return new GmpCoupledTMMaterial(typeIndex, typeName, logger);
56 }
57
58 virtual const QVariantMap* materialMetaDataMap();
59
61 void setPhysicsMaterials(GmpFemPhysicsCommonMaterial* thermo, GmpFemPhysicsCommonMaterial* mechano)
62 {
63 _thermoMaterial = thermo;
64 _mechanoMaterial = mechano;
65 }
66
68 //GmpThermalMaterial* thermal() const { return dynamic_cast<GmpThermalMaterial*>(_thermoMaterial); }
69
71 GmpMechanicalMaterial* mechanical() const { return dynamic_cast<GmpMechanicalMaterial*>(_mechanoMaterial); }
72
74 GmpInterfaceMaterial* interface() const { return dynamic_cast<GmpInterfaceMaterial*>(_mechanoMaterial); }
75
76 // Returns the stresses according to the material behavior adopted
77 virtual bool thermoMechanicalConstitutiveModel(const GmElement* e, GmMatrix& Ded, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, double Tg, unsigned nc, bool ips) const ;
78
79 // Sets the initial conditions required by isotropic damage material
80 virtual bool setInitialConditions(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned sc) const;
81
82private:
83 GmpFemPhysicsCommonMaterial* _thermoMaterial;
84 GmpFemPhysicsCommonMaterial* _mechanoMaterial;
85};
86
87#endif
88
Basic class for a coupled hydro-mechanical material object, storing references for a mechanical and a...
Definition gmpCoupledTMMaterial.h:37
virtual ~GmpCoupledTMMaterial()
Destructor.
Definition gmpCoupledTMMaterial.h:49
GmpFemPhysicsCommonMaterial * _thermoMaterial
Hydraulic material.
Definition gmpCoupledTMMaterial.h:83
GmpInterfaceMaterial * interface() const
Returns the mechancial interface material or NULL if none was configured or if the material is not an...
Definition gmpCoupledTMMaterial.h:74
GmpFemPhysicsCommonMaterial * _mechanoMaterial
Mechanical material. Ps: The mechanical plugin does not have a base class common to all materials.
Definition gmpCoupledTMMaterial.h:84
void setPhysicsMaterials(GmpFemPhysicsCommonMaterial *thermo, GmpFemPhysicsCommonMaterial *mechano)
Sets the hydraulic and mechanical materials for this material. Materials CAN be NULL for a physics.
Definition gmpCoupledTMMaterial.h:61
GmpMechanicalMaterial * mechanical() const
Returns the thermal material or NULL if none was configured.
Definition gmpCoupledTMMaterial.h:71
GmpCoupledTMMaterial(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpCoupledTMMaterial.h:41
static GmpFemPhysicsCommonMaterial * instance(GmSimulationData *simulation, int typeIndex, QString typeName, const GmLogCategory &logger)
A "factory" function used to register the material with the physics material factory.
Definition gmpCoupledTMMaterial.h:52
arma::mat GmMatrix
arma::vec GmVector
Declaration of useful configuration definitions for the plugin library.