OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
isolinearelasticmaterial.C
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #include "linearelasticmaterial.h"
37 #include "../sm/CrossSections/simplecrosssection.h"
38 #include "../sm/Materials/structuralms.h"
39 #include "floatmatrix.h"
40 #include "gausspoint.h"
41 #include "classfactory.h"
42 #include "dynamicinputrecord.h"
43 
44 namespace oofem {
45 REGISTER_Material(IsotropicLinearElasticMaterial);
46 
48  double _E, double _nu) :
50 {
51  E = _E;
52  nu = _nu;
53 
54  // compute value of shear modulus
55  G = E / ( 2.0 * ( 1. + nu ) );
56 }
57 
58 
61 {
62  IRResultType result; // Required by IR_GIVE_FIELD macro
63  double value;
64  // we use rather object's member data than to store data into slow
65  // key-val dictionary with lot of memory allocations
66 
71  // compute value of shear modulus
72  G = E / ( 2.0 * ( 1. + nu ) );
73 
75 
76  ;
77 }
78 
79 
80 void
82 {
85 
89 }
90 
91 
92 
93 double
95 //
96 // Returns the value of the property aProperty (e.g. the Young's modulus
97 // 'E') of the receiver.
98 //
99 {
100  if ( ( aProperty == NYxy ) || ( aProperty == NYxz ) || ( aProperty == NYyz ) ) {
101  return nu;
102  }
103 
104  if ( ( aProperty == 'G' ) || ( aProperty == Gyz ) || ( aProperty == Gxz ) ||
105  ( aProperty == Gxy ) ) {
106  return G;
107  }
108 
109  if ( ( aProperty == 'E' ) || ( aProperty == Ex ) || ( aProperty == Ey ) ||
110  ( aProperty == Ez ) ) {
111  return E;
112  }
113 
114  if ( ( aProperty == 'n' ) || ( aProperty == NYzx ) || ( aProperty == NYzy ) ||
115  ( aProperty == NYyx ) ) {
116  return nu;
117  }
118 
119  return this->Material :: give(aProperty, gp);
120 }
121 
122 
123 void
125  MatResponseMode mode,
126  GaussPoint *gp,
127  TimeStep *tStep)
128 //
129 // forceElasticResponse ignored - always elastic
130 //
131 {
132  double e, nu, ee;
133 
134  e = this->E;
135  nu = this->nu;
136 
137  ee = e / ( ( 1. + nu ) * ( 1. - 2. * nu ) );
138  answer.resize(6, 6);
139  answer.zero();
140 
141  answer.at(1, 1) = 1. - nu;
142  answer.at(1, 2) = nu;
143  answer.at(1, 3) = nu;
144  answer.at(2, 1) = nu;
145  answer.at(2, 2) = 1. - nu;
146  answer.at(2, 3) = nu;
147  answer.at(3, 1) = nu;
148  answer.at(3, 2) = nu;
149  answer.at(3, 3) = 1. - nu;
150 
151  answer.at(4, 4) = ( 1. - 2. * nu ) * 0.5;
152  answer.at(5, 5) = ( 1. - 2. * nu ) * 0.5;
153  answer.at(6, 6) = ( 1. - 2. * nu ) * 0.5;
154 
155  answer.times(ee);
156 
157  if ( ( tStep->giveIntrinsicTime() < this->castingTime ) ) {
158  answer.times(1. - this->preCastStiffnessReduction);
159  }
160 }
161 
162 
163 void
165  MatResponseMode mode,
166  GaussPoint *gp,
167  TimeStep *tStep)
168 {
169  this->giveStatus(gp);
170  double e, nu, ee, shear;
171 
172  e = this->E;
173  nu = this->nu;
174  ee = e / ( 1. - nu * nu );
175  shear = this->G;
176 
177  answer.resize(3, 3);
178  answer.zero();
179 
180  answer.at(1, 1) = ee;
181  answer.at(1, 2) = nu * ee;
182  answer.at(2, 1) = nu * ee;
183  answer.at(2, 2) = ee;
184  answer.at(3, 3) = shear;
185 
186  if ( ( tStep->giveIntrinsicTime() < this->castingTime ) ) {
187  answer.times(1. - this->preCastStiffnessReduction);
188  }
189 }
190 
191 
192 void
194  MatResponseMode mode,
195  GaussPoint *gp,
196  TimeStep *tStep)
197 {
198  double e, nu, ee, shear;
199 
200  e = this->E;
201  nu = this->nu;
202  ee = e / ( 1.0 + nu ) / ( 1. - 2.0 * nu );
203  shear = this->G;
204 
205  answer.resize(4, 4);
206  answer.zero();
207 
208  answer.at(1, 1) = ee * ( 1.0 - nu );
209  answer.at(1, 2) = nu * ee;
210  answer.at(1, 3) = nu * ee;
211  answer.at(2, 1) = nu * ee;
212  answer.at(2, 2) = ee * ( 1.0 - nu );
213  answer.at(2, 3) = nu * ee;
214  answer.at(3, 1) = ee * nu;
215  answer.at(3, 2) = ee * nu;
216  answer.at(3, 3) = ee * ( 1.0 - nu );
217  answer.at(4, 4) = shear;
218 
219  if ( ( tStep->giveIntrinsicTime() < this->castingTime ) ) {
220  answer.times(1. - this->preCastStiffnessReduction);
221  }
222 }
223 
224 
225 void
227  MatResponseMode mode,
228  GaussPoint *gp,
229  TimeStep *tStep)
230 {
231  answer.resize(1, 1);
232  answer.at(1, 1) = this->E;
233 
234  if ( ( tStep->giveIntrinsicTime() < this->castingTime ) ) {
235  answer.times(1. - this->preCastStiffnessReduction);
236  }
237 }
238 
239 
240 void
242  GaussPoint *gp, TimeStep *tStep)
243 //
244 // returns a FloatArray(6) of initial strain vector
245 // eps_0 = {exx_0, eyy_0, ezz_0, gyz_0, gxz_0, gxy_0}^T
246 // caused by unit temperature in direction of
247 // gp (element) local axes
248 //
249 {
250  double alpha = this->give(tAlpha, gp);
251  answer.resize(6);
252  answer.zero();
253  answer.at(1) = alpha;
254  answer.at(2) = alpha;
255  answer.at(3) = alpha;
256 }
257 } // end namespace oofem
void setField(int item, InputFieldType id)
#define NYzx
Definition: matconst.h:54
virtual void givePlaneStressStiffMtrx(FloatMatrix &answer, MatResponseMode, GaussPoint *gp, TimeStep *tStep)
Method for computing plane stress stiffness matrix of receiver.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: material.C:244
Class and object Domain.
Definition: domain.h:115
#define Ey
Definition: matconst.h:60
#define Gxz
Definition: matconst.h:71
#define Gxy
Definition: matconst.h:72
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
#define tAlpha
Definition: matconst.h:67
double & at(int aKey)
Returns the value of the pair which key is aKey.
Definition: dictionary.C:106
IsotropicLinearElasticMaterial(int n, Domain *d)
Creates a new IsotropicLinearElasticMaterial class instance with given number belonging to domain d...
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
double preCastStiffnessReduction
artificial isotropic damage to reflect reduction in stiffness for time < castingTime.
#define Ex
Definition: matconst.h:59
Dictionary propertyDictionary
Property dictionary.
Definition: material.h:105
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
MatResponseMode
Describes the character of characteristic material matrix.
This class is a abstract base class for all linear elastic material models in a finite element proble...
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property &#39;aProperty&#39;.
Definition: material.C:52
#define _IFT_IsotropicLinearElasticMaterial_talpha
#define _IFT_IsotropicLinearElasticMaterial_n
#define NYzy
Definition: matconst.h:55
#define Gyz
Definition: matconst.h:70
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
virtual void givePlaneStrainStiffMtrx(FloatMatrix &answer, MatResponseMode, GaussPoint *gp, TimeStep *tStep)
Method for computing plane strain stiffness matrix of receiver.
#define _IFT_IsotropicLinearElasticMaterial_e
#define Ez
Definition: matconst.h:61
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
Definition: timestep.h:148
Pair * add(int aKey, double value)
Adds a new Pair with given keyword and value into receiver.
Definition: dictionary.C:81
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void give1dStressStiffMtrx(FloatMatrix &answer, MatResponseMode, GaussPoint *gp, TimeStep *tStep)
Method for computing 1d stiffness matrix of receiver.
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
Class representing the a dynamic Input Record.
virtual void giveThermalDilatationVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Returns a vector of coefficients of thermal dilatation in direction of each material principal (local...
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
#define NYyx
Definition: matconst.h:56
#define NYyz
Definition: matconst.h:52
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property &#39;aProperty&#39;.
REGISTER_Material(DummyMaterial)
double castingTime
Casting time.
Definition: material.h:113
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
#define NYxy
Definition: matconst.h:53
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
#define NYxz
Definition: matconst.h:51
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011