OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
intmatbilinczelastic.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 program is free software; you can redistribute it and/or modify
21  * it under the terms of the GNU General Public License as published by
22  * the Free Software Foundation; either version 2 of the License, or
23  * (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
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License
31  * along with this program; if not, write to the Free Software
32  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33  */
34 
35 #include "intmatbilinczelastic.h"
36 #include "gausspoint.h"
37 #include "floatmatrix.h"
38 #include "floatarray.h"
39 #include "mathfem.h"
40 #include "datastream.h"
41 #include "contextioerr.h"
42 #include "classfactory.h"
43 #include "dynamicinputrecord.h"
44 
45 namespace oofem {
46 REGISTER_Material(IntMatBilinearCZElastic);
47 
49 
50 
52 
53 
54 void
56  const FloatMatrix &F, TimeStep *tStep)
57 {
58  IntMatBilinearCZElasticStatus *status = static_cast< IntMatBilinearCZElasticStatus * >( this->giveStatus(gp) );
59 
60  answer.resize( jumpVector.giveSize() );
61  answer.zero();
63  // no degradation in shear
64  // jumpVector = [normal shear1 shear2]
65  double gn = jumpVector.at(1);
66  double gs1 = jumpVector.at(2);
67  double gs2 = jumpVector.at(3);
68 
69  if ( gn <= 0.0 ) { // compresssion
70  answer.at(1) = this->knc * gn;
71  answer.at(2) = this->ks0 * gs1;
72  answer.at(3) = this->ks0 * gs2;
73  } else if ( gn <= this->gn0 ) { // first linear part
74  answer.at(1) = this->kn0 * gn;
75  answer.at(2) = this->ks0 * gs1;
76  answer.at(3) = this->ks0 * gs2;
77  } else if ( gn <= this->gnmax ) { // softening branch
78  answer.at(1) = this->sigfn + this->kn1 * ( gn - this->gn0 );
79  answer.at(2) = this->ks0 * gs1;
80  answer.at(3) = this->ks0 * gs2;
81  //printf("Softening branch...\n");
82  } else {
83  answer.at(1) = 0.0; // failed
84  answer.at(2) = this->ks0 * gs1;
85  answer.at(3) = this->ks0 * gs2;
86  //printf("Failed...\n");
87  }
88 
89  // update gp
90  status->letTempJumpBe(jumpVector);
91  status->letTempFirstPKTractionBe(answer);
92  status->letTempTractionBe(answer);
93 }
94 
95 
96 void
98 {
99  IntMatBilinearCZElasticStatus *status = static_cast< IntMatBilinearCZElasticStatus * >( this->giveStatus(gp) );
100 
101  const FloatArray &jumpVector = status->giveTempJump();
102  double gn = jumpVector.at(1);
103 
104  answer.resize(3, 3);
105  answer.zero();
106  if ( gn <= 0.0 ) { // compresssion
107  answer.at(1, 1) = this->knc;
108  answer.at(2, 2) = this->ks0;
109  answer.at(3, 3) = this->ks0;
110  } else if ( gn <= this->gn0 ) { // first linear part
111  answer.at(1, 1) = this->kn0;
112  answer.at(2, 2) = this->ks0;
113  answer.at(3, 3) = this->ks0;
114  //printf("Linear branch...\n");
115  } else if ( gn <= this->gnmax ) { // softening branch
116  answer.at(1, 1) = this->kn1;
117  answer.at(2, 2) = this->ks0; // no degradation in shear
118  answer.at(3, 3) = this->ks0;
119  //printf("Softening branch...\n");
120  } else {
121  answer.at(1, 1) = 0.0; // failed
122  answer.at(2, 2) = this->ks0;
123  answer.at(3, 3) = this->ks0;
124  //printf("Failed...\n");
125  }
126 }
127 
128 
129 int
131 {
132  if ( type == IST_DamageScalar ) {
133  answer.resize(1);
134  answer.at(1) = 0.0; // no damage
135  return 1;
136  } else {
137  return StructuralInterfaceMaterial :: giveIPValue(answer, gp, type, tStep);
138  }
139 }
140 
141 const double tolerance = 1.0e-12; // small number
144 {
145  IRResultType result; // Required by IR_GIVE_FIELD macro
146 
148  this->knc = kn0; // Defaults to the same stiffness in compression and tension
150 
151  this->ks0 = 0.0; // Defaults to no shear stiffness
153 
155 
156  this->sigfn = 1.0e50; // defaults to infinite strength @todo but then it will not be bilinear only linear
157  this->sigfs = 1.0e50;
159 
160  this->gn0 = sigfn / ( kn0 + tolerance ); // normal jump at damage initiation
161  this->gs0 = sigfs / ( ks0 + tolerance ); // shear jump at damage initiation
162  this->gnmax = 2.0 * GIc / sigfn; // @todo defaults to zero - will this cause problems?
163  this->kn1 = -this->sigfn / ( this->gnmax - this->gn0 ); // slope during softening part in normal dir
164 
166  if ( result != IRRT_OK ) return result;
167 
168  // check validity of the material paramters
169  double kn0min = 0.5 * this->sigfn * this->sigfn / this->GIc;
170  if ( this->kn0 < 0.0 ) {
171  OOFEM_WARNING("stiffness kn0 is negative (%.2e)", this->kn0);
172  return IRRT_BAD_FORMAT;
173  } else if ( this->ks0 < 0.0 ) {
174  OOFEM_WARNING("stiffness ks0 is negative (%.2e)", this->ks0);
175  return IRRT_BAD_FORMAT;
176  } else if ( this->GIc < 0.0 ) {
177  OOFEM_WARNING("GIc is negative (%.2e)", this->GIc);
178  return IRRT_BAD_FORMAT;
179  } else if ( this->kn0 < kn0min ) { // => gn0 > gnmax
180  //OOFEM_WARNING("kn0 (%.2e) is below minimum stiffness (%.2e), => gn0 > gnmax, which is unphysical", this->kn0, kn0min);
181  //return IRRT_BAD_FORMAT;
182  }
183  return IRRT_OK;
184 }
185 
187 {
189 
195 }
196 
197 int
199 {
200  return 1;
201 }
202 
203 void
205 {
206  printf("Paramters for IntMatBilinearCZElastic: \n");
207 
208  printf("-Strength paramters \n");
209  printf(" sigfn = %e \n", this->sigfn);
210  printf(" GIc = %e \n", this->GIc);
211  //printf("\n");
212 
213  printf("-Stiffness parameters \n");
214  printf(" kn0 = %e \n", this->kn0);
215  printf(" kn1 = %e \n", this->kn1);
216  printf(" knc = %e \n", this->knc);
217  //printf("\n");
218 
219  printf("-jump limits \n");
220  printf(" gn0 = %e \n", this->gn0);
221  printf(" gnmax = %e \n", this->gnmax);
222 }
223 
224 } // end namespace oofem
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
void setField(int item, InputFieldType id)
#define _IFT_IntMatBilinearCZElastic_knc
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
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
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void printYourself()
Prints receiver state on stdout. Useful for debugging.
MatResponseMode
Describes the character of characteristic material matrix.
#define _IFT_IntMatBilinearCZElastic_kn
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void letTempJumpBe(FloatArray v)
Assigns tempJump to given vector v.
IntMatBilinearCZElastic(int n, Domain *d)
Constructor.
virtual void give3dStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
const double tolerance
Definition: expczmaterial.C:45
void letTempFirstPKTractionBe(FloatArray v)
Assigns tempFirstPKTraction to given vector v.
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual ~IntMatBilinearCZElastic()
Destructor.
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
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
double kn0
Material parameters.
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
Class representing the a dynamic Input Record.
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual void giveFirstPKTraction_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &jumpVector, const FloatMatrix &F, TimeStep *tStep)
REGISTER_Material(DummyMaterial)
void letTempTractionBe(FloatArray v)
Assigns tempTraction to given vector v.
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
#define _IFT_IntMatBilinearCZElastic_ks
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
Abstract base class for all "structural" interface models.
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
const FloatArray & giveTempJump() const
Returns the const pointer to receiver&#39;s temporary jump.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
#define OOFEM_WARNING(...)
Definition: error.h:62
Class representing solution step.
Definition: timestep.h:80
#define _IFT_IntMatBilinearCZElastic_g1c
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631
#define _IFT_IntMatBilinearCZElastic_sigfn
This class implements associated Material Status for ...

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