OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
steel1.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 "steel1.h"
37 #include "mathfem.h"
38 #include "classfactory.h"
39 
40 namespace oofem {
41 REGISTER_Material(Steel1);
42 
44  // constructor
45 {
47 }
48 
49 
50 
51 double
53  FloatArray *currentStress,
54  FloatArray *currentPlasticStrain)
55 
56 //
57 // computes the value of receiver.
58 // testing if yield condition is fulfilled
59 // function double computeValueAt (GaussPoint*)
60 // should return zero if yield surface is reached,
61 // less than zero if surface still not reached
62 // > 0. if yield criteria previously violated.
63 //
64 // ig gp->status are posibly stored hardenining variables
65 {
66  // double answer;
67  return this->computeJ2InvariantAt(currentStress) - this->give('k', gp);
68 }
69 
70 
71 double
73 //
74 // computes the J2 value of receiver.
75 //
76 {
77  double answer;
78  double v1, v2, v3;
79 
80  if ( currentStress == NULL ) {
81  return 0.0;
82  }
83 
84  v1 = ( ( currentStress->at(1) - currentStress->at(2) ) * ( currentStress->at(1) - currentStress->at(2) ) );
85  v2 = ( ( currentStress->at(2) - currentStress->at(3) ) * ( currentStress->at(2) - currentStress->at(3) ) );
86  v3 = ( ( currentStress->at(3) - currentStress->at(1) ) * ( currentStress->at(3) - currentStress->at(1) ) );
87 
88  answer = ( 1. / 6. ) * ( v1 + v2 + v3 ) + currentStress->at(4) * currentStress->at(4) +
89  currentStress->at(5) * currentStress->at(5) + currentStress->at(6) * currentStress->at(6);
90 
91  return sqrt(answer);
92 }
93 
94 
95 
96 
97 FloatArray *
99  FloatArray *currentStress,
100  FloatArray *currentPlasticStrain)
101 
102 //
103 // - returning vector of derivatives of yield surface with respect to stresses.
104 //
105 // ig gp->status are posibly stored hardening variables
106 {
107  double f, sigx, sigy, sigz, sx, sy, sz;
108  FloatArray *answer = new FloatArray(6);
109 
110  if ( currentStress == NULL ) {
111  return answer;
112  }
113 
114  f = this->computeJ2InvariantAt(currentStress);
115  sigx = currentStress->at(1);
116  sigy = currentStress->at(2);
117  sigz = currentStress->at(3);
118 
119  sx = ( 2. / 3. ) * sigx - ( 1. / 3. ) * sigy - ( 1. / 3. ) * sigz;
120  sy = ( 2. / 3. ) * sigy - ( 1. / 3. ) * sigx - ( 1. / 3. ) * sigz;
121  sz = ( 2. / 3. ) * sigz - ( 1. / 3. ) * sigy - ( 1. / 3. ) * sigx;
122 
123  answer->at(1) = 0.5 * sx / f;
124  answer->at(2) = 0.5 * sy / f;
125  answer->at(3) = 0.5 * sz / f;
126  answer->at(4) = currentStress->at(4) / f;
127  answer->at(5) = currentStress->at(5) / f;
128  answer->at(6) = currentStress->at(6) / f;
129 
130  return answer;
131 }
132 
133 
134 FloatArray *
136  FloatArray *currentStress,
137  FloatArray *currentPlasticStrain)
138 
139 //
140 // - returning vector of derivatives of loading surface with respect to stresses.
141 //
142 // ig gp->status are posibly stored hardenining variables
143 {
144  return this->GiveYCStressGradient(gp, currentStress, currentPlasticStrain);
145 }
146 
147 
148 FloatArray *
150  FloatArray *currentStress,
151  FloatArray *currentPlasticStrain)
152 
153 //
154 //returning vector of derivatives of yield surface with respects to plastic strains
155 //
156 // ig gp->status are posibly stored hardenining variables
157 {
158  return new FloatArray(6);
159 }
160 
161 
162 FloatArray *
164  FloatArray *currentStress,
165  FloatArray *currentPlasticStrain)
166 
167 //
168 //returning vector of derivatives of loading surface with respects to plastic strains
169 //
170 // ig gp->status are posibly stored hardenining variables
171 {
172  return this->GiveYCPlasticStrainGradient(gp, currentStress, currentPlasticStrain);
173 }
174 
175 
178 {
179  IRResultType result; // Required by IR_GIVE_FIELD macro
180  double value;
181 
182  IR_GIVE_FIELD(ir, value, _IFT_Steel1_ry);
183  propertyDictionary.add( 'k', value / sqrt(3.) );
184 
186 }
187 } // end namespace oofem
virtual FloatArray * GiveYCPlasticStrainGradient(GaussPoint *, FloatArray *, FloatArray *)
Definition: steel1.C:149
Class and object Domain.
Definition: domain.h:115
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Dictionary propertyDictionary
Property dictionary.
Definition: material.h:105
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: steel1.C:177
LinearElasticMaterial * linearElasticMaterial
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
This class implements an isotropic linear elastic material in a finite element problem.
#define _IFT_Steel1_ry
Definition: steel1.h:44
double computeJ2InvariantAt(FloatArray *)
Definition: steel1.C:72
This class implements a perfectly plastic material in a finite element problem.
virtual FloatArray * GiveLCPlasticStrainGradient(GaussPoint *, FloatArray *, FloatArray *)
Definition: steel1.C:163
virtual FloatArray * GiveYCStressGradient(GaussPoint *, FloatArray *, FloatArray *)
Definition: steel1.C:98
virtual double computeYCValueAt(GaussPoint *, FloatArray *, FloatArray *)
Definition: steel1.C:52
Steel1(int n, Domain *d)
Definition: steel1.C:43
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
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
REGISTER_Material(DummyMaterial)
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
Class representing integration point in finite element program.
Definition: gausspoint.h:93
virtual FloatArray * GiveLCStressGradient(GaussPoint *, FloatArray *, FloatArray *)
Definition: steel1.C:135

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:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011