MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialEquivalentContinuum.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2016 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_EQUIVALENTCONTINUUM_H_
25#define _GEMA_PLUGIN_MECHANICALMATERIAL_EQUIVALENTCONTINUUM_H_
26
27#include "gmpMechanicalConfig.h"
28#include "gmpFemPhysics.h"
29#include "gmMathUtils.h"
30
32#include "gmpMaterialElastic.h"
33#include "gmpMechanicPoint.h"
34
35class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMechanicalMaterialEquivalentContinuum : public GmpMechanicalMaterialElastic
36{
37protected:
52
55 {
59
60
61 // --- NO ADDING BELOW THIS LINE
63 };
64
65public:
66
68 GmpMechanicalMaterialEquivalentContinuum(int typeIndex, QString typeName, const GmLogCategory& logger)
69 : GmpMechanicalMaterialElastic(typeIndex, typeName, logger) {}
70
73
75 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
76 {
77 Q_UNUSED(simulation);
78 return new GmpMechanicalMaterialEquivalentContinuum(typeIndex, typeName, logger);
79 }
80
83 {
86
87 // ------ NO ADDING BELOW THIS LINE
89 };
90
91 // Returns a map with material associated properties.
92 virtual const QVariantMap* materialMetaDataMap();
93
94 // Sets the initial conditions required by fractured rock material
95 virtual bool setInitialConditions(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned sc) const;
96
97 // Returns the stresses according to the material behavior adopted
98 virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector&, unsigned nc, bool ips) const;
99
100 // calculates derived results
101 virtual bool calcDerivedResults(const GmElement* e, GmpMechanicPoint* mp, const GmVector* coord, unsigned sc) const;
102
104 virtual GmVector normalElasticStiffnessFracture(const GmElement* e, const GmVector* coord, int ip) const
105 {
106 S_TRACE();
107 GmVector Kn;
108 GmCellAccessor* knAc = propertyAc(Knf_ID);
109 // Fills property values
110 vectorPropertyValue(e, knAc, Kn, coord, ip);
111 return Kn;
112 }
113
115 virtual GmVector shearElasticStiffnessFracture(const GmElement* e, const GmVector* coord, int ip) const
116 {
117 S_TRACE();
118 GmVector Ks;
119 GmCellAccessor* ksAc = propertyAc(Ksf_ID);
120 // Fills property values
121 vectorPropertyValue(e, ksAc, Ks, coord, ip);
122 return Ks;
123 }
124
126 virtual GmVector fractureSpacing(const GmElement* e, const GmVector* coord, int ip) const
127 {
128 S_TRACE();
129 GmVector Sf;
130 GmCellAccessor* sfAc = propertyAc(Sfr_ID);
131 // Fills property values
132 vectorPropertyValue(e, sfAc, Sf, coord, ip);
133 return Sf;
134 }
135
137 virtual GmVector fracturedDip(const GmElement* e, const GmVector* coord, int ip) const
138 {
139 S_TRACE();
140 GmVector Dip;
141 GmCellAccessor* dipAc = propertyAc(DIP_ID);
142 // Fills property values
143 vectorPropertyValue(e, dipAc, Dip, coord, ip);
144 return Dip;
145 }
146
148 virtual GmVector fractureStrike(const GmElement* e, const GmVector* coord, int ip) const
149 {
150 S_TRACE();
151 GmVector Strike;
152 GmCellAccessor* strikeAc = propertyAc(STRIKE_ID);
153 if (!vectorPropertyValue(e, strikeAc, Strike, coord, ip)) {
154 Strike.set_size(1);
155 return Strike.fill(0);
156 }
157 return Strike;
158 }
159
161 virtual GmVector fractureAperture(const GmElement* e, const GmVector* coord, int ip) const
162 {
163 S_TRACE();
164 GmVector Aperture;
165 GmCellAccessor* apertureAc = propertyAc(Bfr_ID);
166 // Fills property values
167 vectorPropertyValue(e, apertureAc, Aperture, coord, ip);
168
169 return Aperture;
170 }
171
173 virtual closureModel fractureClosureModel(const GmElement* e, const GmVector* coord, int ip) const
174 {
175 S_TRACE();
176 assert(e);
178
179 if (propertyAc(Closure_ID) == NULL)
180 {
182 }
183
184 int closureType = propertyAc(Closure_ID)->scalarValueAt(e, coord, ip);
185 //
186 if (closureType == 1)
187 {
189 }
190 else if (closureType == 2)
191 {
193 }
194 else
195 {
197 }
198
199 return type;
200 }
201
203 virtual GmVector updatedFractureAperture(const GmElement* e, const GmVector* coord, int ip) const;
204
205 virtual void stiffness(const GmElement*, unsigned, GmMatrix&, GmMatrix& Cf, const GmVector*, unsigned, int) const;
206
207 virtual void factureFlexibility(GmMatrix& Cf, double Kn, double Ks, double Sf, int ns) const;
208
209};
210
211#endif
Definition gmpMechanicPoint.h:33
Definition gmpMaterialElastic.h:35
virtual bool mechanicalConstitutiveModel(const GmElement *e, GmMatrix &Dep, const GmpMechanicPoint *mp, const GmVector *coord, const GmVector &Time, unsigned nc, bool ips) const
Evaluates stress and tangent matrix according to the material behavior adopted.
Definition gmpMaterialElastic.cpp:83
virtual const QVariantMap * materialMetaDataMap()
Returns a pointer to the material attribute map, built when the function is called for the first time...
Definition gmpMaterialElastic.cpp:40
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialElastic.h:46
Definition gmpMaterialEquivalentContinuum.h:36
virtual GmVector shearElasticStiffnessFracture(const GmElement *e, const GmVector *coord, int ip) const
Returns the shear elastic stiffness.
Definition gmpMaterialEquivalentContinuum.h:115
virtual GmVector fractureSpacing(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture spacing.
Definition gmpMaterialEquivalentContinuum.h:126
virtual GmVector fractureAperture(const GmElement *e, const GmVector *coord, int ip) const
Returns the fracture aperture.
Definition gmpMaterialEquivalentContinuum.h:161
FracRockElementPropertyIds
IDs for material element properties.
Definition gmpMaterialEquivalentContinuum.h:40
@ STRIKE_ID
Id for retrieving the angle of strike accessor.
Definition gmpMaterialEquivalentContinuum.h:45
@ Bfr_ID
Id for retrieving the frature aperture accessor.
Definition gmpMaterialEquivalentContinuum.h:46
@ Ksf_ID
Id for retrieving the shear elastic stiffness accessor.
Definition gmpMaterialEquivalentContinuum.h:42
@ Closure_ID
Id for retrieving the closure model.
Definition gmpMaterialEquivalentContinuum.h:47
@ DIP_ID
Id for retrieving the angle of dip accessor.
Definition gmpMaterialEquivalentContinuum.h:44
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialEquivalentContinuum.h:50
@ Sfr_ID
Id for retrieving the fracture spacing accessor.
Definition gmpMaterialEquivalentContinuum.h:43
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 gmpMaterialEquivalentContinuum.h:75
virtual GmVector fracturedDip(const GmElement *e, const GmVector *coord, int ip) const
Returns the angle of dip.
Definition gmpMaterialEquivalentContinuum.h:137
virtual GmVector fractureStrike(const GmElement *e, const GmVector *coord, int ip) const
Returns the angle of strike.
Definition gmpMaterialEquivalentContinuum.h:148
virtual ~GmpMechanicalMaterialEquivalentContinuum()
Virtual destructor.
Definition gmpMaterialEquivalentContinuum.h:72
GmpMechanicalMaterialEquivalentContinuum(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialEquivalentContinuum.h:68
closureModel
Fracture closure models.
Definition gmpMaterialEquivalentContinuum.h:55
@ hardStiffness
Fracture closure considering Hard Stiffness.
Definition gmpMaterialEquivalentContinuum.h:57
@ bartonBandis
Fracture closure considering Barton-Bandis model.
Definition gmpMaterialEquivalentContinuum.h:58
@ normal
Normal closure without contact.
Definition gmpMaterialEquivalentContinuum.h:56
@ NUM_CLOSURE_IDS
The number of fracture closure models.
Definition gmpMaterialEquivalentContinuum.h:62
virtual GmVector normalElasticStiffnessFracture(const GmElement *e, const GmVector *coord, int ip) const
Returns the normal elastic stiffness.
Definition gmpMaterialEquivalentContinuum.h:104
virtual closureModel fractureClosureModel(const GmElement *e, const GmVector *coord, int ip) const
Returns the type of fracture closure model.
Definition gmpMaterialEquivalentContinuum.h:173
fracturedRockGaussAttrIds
IDs for Gauss attributes of fractured rock material.
Definition gmpMaterialEquivalentContinuum.h:83
@ NUM_GA_IDS
The number of gauss attributes.
Definition gmpMaterialEquivalentContinuum.h:88
@ VMFR_GA_ID
Base Id for Gauss attribute(s) used to store the maximum fracture apertures.
Definition gmpMaterialEquivalentContinuum.h:84
@ BFR_GA_ID
Base Id for Gauss attribute(s) used to store the fracture apertures.
Definition gmpMaterialEquivalentContinuum.h:85
virtual bool setInitialConditions(const GmElement *e, GmpMechanicPoint *mp, const GmVector *coord, unsigned sc) const
Sets the initial conditions required by Solid materials.
Definition gmpMechanicalMaterial.h:69
virtual bool calcDerivedResults(const GmElement *e, GmpMechanicPoint *mp, const GmVector *coord, unsigned sc) const
Calculates the derived results required by materials.
Definition gmpMechanicalMaterial.h:87
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of the GmpMechanicalMaterialElastic class.
Declaration of the GmpMechanicPoint class.
Declaration of useful configuration definitions for the plugin library.
Declaration of the GmpMechanicalMaterial class.