OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
mat_cebfip90.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 "mat_cebfip90.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(CebFipSlip90Material);
47 
49 { }
50 
51 
53 { }
54 
55 
56 void
58 {
59  CebFipSlip90MaterialStatus *status = static_cast< CebFipSlip90MaterialStatus * >( this->giveStatus(gp) );
60  double f, slip, tempKappa;
61 
62  slip = jump.at(1);
63  // compute value of loading function if strainLevel crit apply
64  f = fabs(slip) - status->giveKappa();
65 
66  if ( f <= 0.0 ) {
67  // kappa do not grow
68  tempKappa = status->giveKappa();
69  } else {
70  // kappa grow
71  tempKappa = fabs(slip);
72  // evaluate damage parameter
73  }
74 
75  answer.resize(1);
76  if ( tempKappa <= 1.e-12 ) {
77  answer.at(1) = 0.0;
78  } else {
79  answer.at(1) = ( this->computeBondForce(tempKappa) / tempKappa ) * slip;
80  }
81 
82  // update gp
83  status->letTempJumpBe(jump);
84  status->letTempTractionBe(answer);
85  status->setTempKappa(tempKappa);
86 }
87 
88 
89 void
91 {
92  CebFipSlip90MaterialStatus *status = static_cast< CebFipSlip90MaterialStatus * >( this->giveStatus(gp) );
93  answer.resize(1, 1);
94 
95  if ( mode == ElasticStiffness || mode == SecantStiffness ) {
96  double kappa = status->giveKappa();
97 
98  if ( kappa > 0.0 ) {
99  answer.at(1, 1) = ( this->computeBondForce(kappa) / kappa );
100  } else {
101  answer.at(1, 1) = computeBondForceStiffness(0.0);
102  }
103  } else if ( mode == TangentStiffness ) {
104  answer.at(1, 1) = computeBondForceStiffness( status->giveTempKappa() );
105  } else {
106  OOFEM_ERROR("unknown MatResponseMode (%s)", __MatResponseModeToString(mode) );
107  }
108 }
109 
110 
111 int
113 {
114  CebFipSlip90MaterialStatus *status = static_cast< CebFipSlip90MaterialStatus * >( this->giveStatus(gp) );
115 
116  if ( type == IST_DamageScalar ) {
117  answer.resize(1);
118  answer.at(1) = status->giveKappa();
119  return 1;
120  } else {
121  return StructuralInterfaceMaterial :: giveIPValue(answer, gp, type, tStep);
122  }
123 }
124 
125 
128 {
129  IRResultType result; // Required by IR_GIVE_FIELD macro
130 
133 
137 
138  alpha = 0.4;
140 }
141 
142 
143 void
145 {
149 
153 }
154 
155 
156 
157 double
159 {
160  if ( s <= s1 ) {
161  return tmax *pow( ( s / s1 ), alpha );
162  } else if ( ( s >= s1 ) && ( s <= s2 ) ) {
163  return tmax;
164  } else if ( ( s >= s2 ) && ( s <= s3 ) ) {
165  return tmax - ( tmax - tres ) * ( s - s1 ) / ( s3 - s2 );
166  } else {
167  return tres;
168  }
169 }
170 
171 
172 double
174 {
175  if ( s <= s1 / 1000. ) {
176  s = s1 / 1000.;
177  return alpha *tmax *pow( ( s / s1 ), alpha - 1 ) / s1;
178  } else if ( s <= s1 ) {
179  return alpha *tmax *pow( ( s / s1 ), alpha - 1 ) / s1;
180  } else if ( ( s >= s1 ) && ( s <= s2 ) ) {
181  return 1.e-6; // should be zero
182  } else if ( ( s >= s2 ) && ( s <= s3 ) ) {
183  return -( tmax - tres ) / ( s3 - s2 );
184  } else {
185  return 1.e-6; // should be zero
186  }
187 }
188 
189 
191 {
192  kappa = tempKappa = 0.0;
193 }
194 
195 
197 { }
198 
199 
200 void
202 {
204  fprintf(file, "status { ");
205  fprintf(file, "kappa %f", this->kappa);
206 
207  fprintf(file, "}\n");
208 }
209 
210 
211 void
213 {
215  this->tempKappa = this->kappa;
216 }
217 
218 
219 void
221 {
223  this->kappa = this->tempKappa;
224 }
225 
226 
229 {
230  contextIOResultType iores;
231 
232  // save parent class status
233  if ( ( iores = StructuralInterfaceMaterialStatus :: saveContext(stream, mode, obj) ) != CIO_OK ) {
234  THROW_CIOERR(iores);
235  }
236 
237  // write a raw data
238  if ( !stream.write(kappa) ) {
240  }
241 
242  return CIO_OK;
243 }
244 
245 
248 {
249  contextIOResultType iores;
250 
251  // read parent class status
252  if ( ( iores = StructuralInterfaceMaterialStatus :: restoreContext(stream, mode, obj) ) != CIO_OK ) {
253  THROW_CIOERR(iores);
254  }
255 
256  // read raw data
257  if ( !stream.read(kappa) ) {
259  }
260 
261  return CIO_OK;
262 }
263 } // end namespace oofem
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
void setField(int item, InputFieldType id)
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
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Definition: mat_cebfip90.C:201
Class and object Domain.
Definition: domain.h:115
void setTempKappa(double newKappa)
Sets the temp scalar measure of the largest strain level to given value.
Definition: mat_cebfip90.h:78
double kappa
Scalar measure of the largest slip reached in material.
Definition: mat_cebfip90.h:61
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
double giveTempKappa()
Returns the temp. scalar measure of the largest strain level.
Definition: mat_cebfip90.h:76
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Definition: mat_cebfip90.C:220
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
double s3
Slip when residual force/stress activated.
Definition: mat_cebfip90.h:107
double alpha
Alpha coeff.
Definition: mat_cebfip90.h:111
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
const char * __MatResponseModeToString(MatResponseMode _value)
Definition: cltypes.C:326
General IO error.
virtual ~CebFipSlip90Material()
Destructor.
Definition: mat_cebfip90.C:52
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
MatResponseMode
Describes the character of characteristic material matrix.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: mat_cebfip90.C:228
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: mat_cebfip90.C:212
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
This class implements associated Material Status to IsoInterfaceDamageMaterial.
Definition: mat_cebfip90.h:57
double giveKappa()
Returns the last equilibrated scalar measure of the largest strain level.
Definition: mat_cebfip90.h:74
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
double tmax
Max force (stress).
Definition: mat_cebfip90.h:101
#define OOFEM_ERROR(...)
Definition: error.h:61
#define _IFT_CebFipSlip90Material_s1
Definition: mat_cebfip90.h:46
void letTempJumpBe(FloatArray v)
Assigns tempJump to given vector v.
double tres
Residual force/stress.
Definition: mat_cebfip90.h:109
This class implements a structural interface material status information.
double computeBondForceStiffness(double kappa)
Computes the value of bond force/stress stiffness, based on given value of slip value.
Definition: mat_cebfip90.C:173
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
double computeBondForce(double kappa)
Computes the value of bond force/stress, based on given value of slip value.
Definition: mat_cebfip90.C:158
CebFipSlip90MaterialStatus(int n, Domain *d, GaussPoint *g)
Constructor.
Definition: mat_cebfip90.C:190
double s1
Slip valu at begining of yield plateau.
Definition: mat_cebfip90.h:103
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: mat_cebfip90.C:144
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
CebFipSlip90Material(int n, Domain *d)
Constructor.
Definition: mat_cebfip90.C:48
#define _IFT_CebFipSlip90Material_tmax
Definition: mat_cebfip90.h:44
virtual ~CebFipSlip90MaterialStatus()
Destructor.
Definition: mat_cebfip90.C:196
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 contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Class representing the a dynamic Input Record.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
#define _IFT_CebFipSlip90Material_s3
Definition: mat_cebfip90.h:48
#define _IFT_CebFipSlip90Material_s2
Definition: mat_cebfip90.h:47
REGISTER_Material(DummyMaterial)
void letTempTractionBe(FloatArray v)
Assigns tempTraction to given vector v.
Abstract base class for all "structural" interface models.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: mat_cebfip90.C:247
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
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: mat_cebfip90.C:127
Class representing integration point in finite element program.
Definition: gausspoint.h:93
double s2
Slip at end of plateau.
Definition: mat_cebfip90.h:105
Class representing solution step.
Definition: timestep.h:80
#define _IFT_CebFipSlip90Material_tres
Definition: mat_cebfip90.h:45
virtual void giveEngTraction_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &jump, TimeStep *tStep)
Definition: mat_cebfip90.C:57
virtual void give1dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Definition: mat_cebfip90.C:90
double tempKappa
Non-equilibrated scalar of the largest slip displacement.
Definition: mat_cebfip90.h:63
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Definition: mat_cebfip90.C:112

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