OOFEM 3.0
Loading...
Searching...
No Matches
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 - 2025 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
40namespace oofem {
42
43Steel1 :: Steel1(int n, Domain *d) : PerfectlyPlasticMaterial(n, d)
44{
46}
47
48
49
50double
51Steel1 :: computeYCValueAt(GaussPoint *gp,
52 FloatArray *currentStress,
53 FloatArray *currentPlasticStrain) const
54
55//
56// computes the value of receiver.
57// testing if yield condition is fulfilled
58// function double computeValueAt (GaussPoint*)
59// should return zero if yield surface is reached,
60// less than zero if surface still not reached
61// > 0. if yield criteria previously violated.
62//
63// ig gp->status are posibly stored hardenining variables
64{
65 // double answer;
66 return this->computeJ2InvariantAt(currentStress) - this->give('k', gp);
67}
68
69
70double
71Steel1 :: computeJ2InvariantAt(FloatArray *currentStress) const
72//
73// computes the J2 value of receiver.
74//
75{
76 double answer;
77 double v1, v2, v3;
78
79 if ( currentStress == NULL ) {
80 return 0.0;
81 }
82
83 v1 = ( ( currentStress->at(1) - currentStress->at(2) ) * ( currentStress->at(1) - currentStress->at(2) ) );
84 v2 = ( ( currentStress->at(2) - currentStress->at(3) ) * ( currentStress->at(2) - currentStress->at(3) ) );
85 v3 = ( ( currentStress->at(3) - currentStress->at(1) ) * ( currentStress->at(3) - currentStress->at(1) ) );
86
87 answer = ( 1. / 6. ) * ( v1 + v2 + v3 ) + currentStress->at(4) * currentStress->at(4) +
88 currentStress->at(5) * currentStress->at(5) + currentStress->at(6) * currentStress->at(6);
89
90 return sqrt(answer);
91}
92
93
94
95
97Steel1 :: GiveYCStressGradient(GaussPoint *gp,
98 FloatArray *currentStress,
99 FloatArray *currentPlasticStrain) const
100
101//
102// - returning vector of derivatives of yield surface with respect to stresses.
103//
104// ig gp->status are posibly stored hardening variables
105{
106 double f, sigx, sigy, sigz, sx, sy, sz;
107 FloatArray *answer = new FloatArray(6);
108
109 if ( currentStress == NULL ) {
110 return answer;
111 }
112
113 f = this->computeJ2InvariantAt(currentStress);
114 sigx = currentStress->at(1);
115 sigy = currentStress->at(2);
116 sigz = currentStress->at(3);
117
118 sx = ( 2. / 3. ) * sigx - ( 1. / 3. ) * sigy - ( 1. / 3. ) * sigz;
119 sy = ( 2. / 3. ) * sigy - ( 1. / 3. ) * sigx - ( 1. / 3. ) * sigz;
120 sz = ( 2. / 3. ) * sigz - ( 1. / 3. ) * sigy - ( 1. / 3. ) * sigx;
121
122 answer->at(1) = 0.5 * sx / f;
123 answer->at(2) = 0.5 * sy / f;
124 answer->at(3) = 0.5 * sz / f;
125 answer->at(4) = currentStress->at(4) / f;
126 answer->at(5) = currentStress->at(5) / f;
127 answer->at(6) = currentStress->at(6) / f;
128
129 return answer;
130}
131
132
134Steel1 :: GiveLCStressGradient(GaussPoint *gp,
135 FloatArray *currentStress,
136 FloatArray *currentPlasticStrain) const
137
138//
139// - returning vector of derivatives of loading surface with respect to stresses.
140//
141// ig gp->status are posibly stored hardenining variables
142{
143 return this->GiveYCStressGradient(gp, currentStress, currentPlasticStrain);
144}
145
146
148Steel1 :: GiveYCPlasticStrainGradient(GaussPoint *gp,
149 FloatArray *currentStress,
150 FloatArray *currentPlasticStrain) const
151
152//
153//returning vector of derivatives of yield surface with respects to plastic strains
154//
155// ig gp->status are posibly stored hardenining variables
156{
157 return new FloatArray(6);
158}
159
160
162Steel1 :: GiveLCPlasticStrainGradient(GaussPoint *gp,
163 FloatArray *currentStress,
164 FloatArray *currentPlasticStrain) const
165
166//
167//returning vector of derivatives of loading surface with respects to plastic strains
168//
169// ig gp->status are posibly stored hardenining variables
170{
171 return this->GiveYCPlasticStrainGradient(gp, currentStress, currentPlasticStrain);
172}
173
174
175void
176Steel1 :: initializeFrom(InputRecord &ir)
177{
178 PerfectlyPlasticMaterial :: initializeFrom(ir);
179
180 double value;
181 IR_GIVE_FIELD(ir, value, _IFT_Steel1_ry);
182 propertyDictionary.add( 'k', value / sqrt(3.) );
183}
184} // end namespace oofem
#define REGISTER_Material(class)
double & at(Index i)
Definition floatarray.h:202
Dictionary propertyDictionary
Definition material.h:107
LinearElasticMaterial * linearElasticMaterial
double give(int aProperty, GaussPoint *gp) const override
FloatArray * GiveYCPlasticStrainGradient(GaussPoint *, FloatArray *, FloatArray *) const override
Definition steel1.C:148
double computeJ2InvariantAt(FloatArray *) const
Definition steel1.C:71
FloatArray * GiveYCStressGradient(GaussPoint *, FloatArray *, FloatArray *) const override
Definition steel1.C:97
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define _IFT_Steel1_ry
Definition steel1.h:44

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011