MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialElasticInterface.h
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_MECHANICALMATERIAL_ELASTICINTERFACE_H_
25#define _GEMA_PLUGIN_MECHANICALMATERIAL_ELASTICINTERFACE_H_
26
27
29#include "gmpMechanicPoint.h"
30#include <gmpFemPhysics.h>
31#include <gmMathUtils.h>
32#include <gmTrace.h>
33
34class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpElasticInterface: public GmpInterfaceMaterial
35{
36protected:
39 {
45
46 // --- NO ADDING BELOW THIS LINE
48 };
49
52 {
56
57
58 // --- NO ADDING BELOW THIS LINE
60 };
61
62public:
64 GmpElasticInterface(int typeIndex, QString typeName, const GmLogCategory& logger)
65 :GmpInterfaceMaterial(typeIndex, typeName, logger){}
66
69
71 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
72 {
73 Q_UNUSED(simulation);
74 return new GmpElasticInterface(typeIndex, typeName, logger);
75 }
76
77 // Returns a map with material associated properties.
78 virtual const QVariantMap* materialMetaDataMap();
79
82 {
84
85 // ------ NO ADDING BELOW THIS LINE
87 };
88
94 virtual bool fillElasticStiffnessMatrix(const GmElement* e, GmMatrix& Dep, const GmVector* coord, int ip, double penalty = 1.0) const;
95
98 virtual bool fillBartonBandisStiffnessMatrix(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord)const;
99
102 virtual bool fillBartonBandisStresses(const GmElement* e, GmVector& Snew, const GmpMechanicPoint* mp, const GmVector* coord, GmVector& eNew, GmVector& eOld, GmVector& sOld)const;
103
106 virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, unsigned nc) const;
107
108 //Sets the initial conditions required by interface materials
109 virtual bool setInitialConditions(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned nc) const;
110
112 virtual double normalElasticStiffness(const GmElement* e, const GmVector* coord, int ip) const
113 {
114 return propertyAc(Kni_ID)->scalarValueAt(e, coord, ip);
115 }
116
118 virtual double shearElasticStiffness(const GmElement* e, const GmVector* coord, int ip) const
119 {
120 return propertyAc(Ksi_ID)->scalarValueAt(e, coord, ip);
121 }
122
124 virtual double shearElasticStiffnessTwo(const GmElement* e, const GmVector* coord, int ip) const
125 {
126 return propertyAc(Kti_ID)->scalarValueAt(e, coord, ip);
127 }
128
130 virtual double fractureOpening(const GmElement* e, const GmVector* coord, int ip) const
131 {
132 S_TRACE();
133 assert(e);
134 if (propertyAc(GAP_ID) == NULL)
135 {
136 return 0.0;
137 }
138
139 return propertyAc(GAP_ID)->scalarValueAt(e, coord, ip);
140 }
141
143 virtual closureModel fractureClosureModel(const GmElement* e, const GmVector* coord, int ip) const
144 {
145 S_TRACE();
146 assert(e);
148
149 if (propertyAc(Closure_ID) == NULL)
150 {
152 }
153
154 int closureType = propertyAc(Closure_ID)->scalarValueAt(e, coord, ip);
155 //
156 if (closureType == 1)
157 {
159 }
160 else if (closureType == 2)
161 {
163 }
164 else
165 {
167 }
168
169 return type;
170 }
171};
172#endif
Definition gmpMaterialElasticInterface.h:35
InterfaceElementPropertyIds
IDs for elastic interface material properties.
Definition gmpMaterialElasticInterface.h:39
@ Ksi_ID
Id for retrieving the shear elastic stiffness accessor.
Definition gmpMaterialElasticInterface.h:41
@ GAP_ID
Id for retrieving the initial fracture aperture.
Definition gmpMaterialElasticInterface.h:43
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialElasticInterface.h:47
@ Kni_ID
Id for retrieving the normal elastic stiffness accessor.
Definition gmpMaterialElasticInterface.h:40
@ Closure_ID
Id for retrieving the closure model.
Definition gmpMaterialElasticInterface.h:44
@ Kti_ID
Id for retrieving the shear elastic stiffness accessor at 2nd-direction (3D)
Definition gmpMaterialElasticInterface.h:42
virtual double fractureOpening(const GmElement *e, const GmVector *coord, int ip) const
Returns the initial fracture opening.
Definition gmpMaterialElasticInterface.h:130
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 gmpMaterialElasticInterface.h:71
GmpElasticInterface(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialElasticInterface.h:64
virtual double normalElasticStiffness(const GmElement *e, const GmVector *coord, int ip) const
Returns the normal elastic stiffness of the interface element.
Definition gmpMaterialElasticInterface.h:112
virtual ~GmpElasticInterface()
Virtual destructor.
Definition gmpMaterialElasticInterface.h:68
elasticInterfaceGaussAttrIds
IDs for Gauss attributes of elastic interface material.
Definition gmpMaterialElasticInterface.h:82
@ NUM_GA_IDS
The number of gauss attributes.
Definition gmpMaterialElasticInterface.h:86
@ VM_GA_ID
Base Id for Gauss attribute(s) used to store the maximum.
Definition gmpMaterialElasticInterface.h:83
virtual double shearElasticStiffness(const GmElement *e, const GmVector *coord, int ip) const
Returns the shear elastic stiffness of the interface element.
Definition gmpMaterialElasticInterface.h:118
virtual double shearElasticStiffnessTwo(const GmElement *e, const GmVector *coord, int ip) const
Returns the shear elastic stiffness 2 of the interface element (required in 3D)
Definition gmpMaterialElasticInterface.h:124
closureModel
Fracture closure models.
Definition gmpMaterialElasticInterface.h:52
@ hardStiffness
Fracture closure considering Hard Stiffness.
Definition gmpMaterialElasticInterface.h:54
@ NUM_CLOSURE_IDS
The number of fracture closure models.
Definition gmpMaterialElasticInterface.h:59
@ bartonBandis
Fracture closure considering Barton-Bandis model.
Definition gmpMaterialElasticInterface.h:55
@ normal
Normal closure without contact.
Definition gmpMaterialElasticInterface.h:53
virtual closureModel fractureClosureModel(const GmElement *e, const GmVector *coord, int ip) const
Returns the type of fracture closure model.
Definition gmpMaterialElasticInterface.h:143
Definition gmpInterfaceMaterial.h:35
virtual bool setInitialConditions(const GmElement *e, GmpMechanicPoint *mp, const GmVector *coord, unsigned nc) const
Set the initial conditions required by the material.
Definition gmpInterfaceMaterial.cpp:111
Definition gmpMechanicPoint.h:33
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of the GmpInterfaceMaterial classes.
Declaration of the GmpMechanicPoint class.