OOFEM 3.0
Loading...
Searching...
No Matches
bondceb.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 "bondceb.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
45namespace oofem {
47
48BondCEBMaterial :: BondCEBMaterial(int n, Domain *d) : StructuralInterfaceMaterial(n, d)
49{}
50
51
53BondCEBMaterial :: giveEngTraction_3d(const FloatArrayF<3> &jump, GaussPoint *gp, TimeStep *tStep) const
54{
55 BondCEBMaterialStatus *status = static_cast< BondCEBMaterialStatus * >( this->giveStatus(gp) );
56
57 // normal traction evaluated elastically
58 FloatArrayF<3> answer;
59 answer.at(1) = kn * jump.at(1);
60
61 // trial values of shear tractions evaluated elastically
62 double s = 0., dKappa = 0.;
63 for ( int i = 2; i <= 3; i++ ) {
64 double depsi = jump.at(i) - status->giveJump().at(i);
65 answer.at(i) = status->giveTraction().at(i) + ks * depsi;
66 s += answer.at(i) * answer.at(i);
67 dKappa += depsi*depsi;
68 }
69
70 // norm of trial shear traction
71 s = sqrt(s);
72
73 // cumulative slip increment
74 dKappa = sqrt(dKappa);
75
76 // cumulative slip at the end of the step
77 double tempKappa = status->giveKappa() + dKappa;
78
79 // maximum allowed norm of shear traction
80 double smax = evaluateBondStress(tempKappa);
81
82 // reduce shear tractions, if needed
83 if ( s > smax ) {
84 for ( int i = 2; i <= 3; i++ ) {
85 answer.at(i) *= smax / s;
86 }
87 }
88
89 // update gp
90 status->letTempJumpBe(jump);
91 status->letTempTractionBe(answer);
92 status->setTempKappa(tempKappa);
93
94 return answer;
95}
96
97
99BondCEBMaterial :: give3dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
100{
102 return diag<3>({kn, ks, ks});
103}
104
105double
106BondCEBMaterial :: evaluateBondStress(const double kappa) const
107{
108 if ( kappa <= 0. )
109 return 0.;
110 if ( kappa <= s1 )
111 return taumax * pow(kappa/s1, alpha);
112 if ( kappa <= s2 )
113 return taumax;
114 if ( kappa <= s3 )
115 return taumax - (taumax-tauf) * (kappa-s2) / (s3-s2);
116 return tauf;
117}
118
119
120int
121BondCEBMaterial :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
122{
123 BondCEBMaterialStatus *status = static_cast< BondCEBMaterialStatus * >( this->giveStatus(gp) );
124 if ( type == IST_MaxEquivalentStrainLevel ) {
125 answer.resize(1);
126 answer.at(1) = status->giveKappa();
127 return 1;
128 } else {
129 return StructuralInterfaceMaterial :: giveIPValue(answer, gp, type, tStep);
130 }
131}
132
133void
134BondCEBMaterial :: initializeFrom(InputRecord &ir)
135{
136 StructuralInterfaceMaterial :: initializeFrom(ir);
137
138 // mandatory parameters
145
146 // optional parameters
149
150 // dependent parameter
151 //@todo: why not simply if ks <taumax/s1 choose ks = taumax/s1
152 //s0 = pow(pow(s1, -alpha)*taumax/ks, 1./(1.-alpha));
153 if ( s0 > s1 ) {
154 s0 = s1;
155 ks = taumax/s1;
156 OOFEM_WARNING("Parameter ks adjusted");
157 }
158}
159
160
161void
162BondCEBMaterial :: giveInputRecord(DynamicInputRecord &input)
163{
164 StructuralInterfaceMaterial :: giveInputRecord(input);
165
166 input.setField(this->kn, _IFT_BondCEBMaterial_kn);
167 input.setField(this->ks, _IFT_BondCEBMaterial_ks);
168 input.setField(this->s1, _IFT_BondCEBMaterial_s1);
169 input.setField(this->s2, _IFT_BondCEBMaterial_s2);
170 input.setField(this->s3, _IFT_BondCEBMaterial_s3);
172}
173
174
175
176BondCEBMaterialStatus :: BondCEBMaterialStatus(GaussPoint *g) : StructuralInterfaceMaterialStatus(g)
177{}
178
179
180void
181BondCEBMaterialStatus :: printOutputAt(FILE *file, TimeStep *tStep) const
182{
183 StructuralInterfaceMaterialStatus :: printOutputAt(file, tStep);
184 fprintf(file, "status { ");
185 if ( this->kappa > 0.0 ) {
186 fprintf(file, "kappa %g ", this->kappa);
187 }
188
189 fprintf(file, "}\n");
190}
191
192
193void
194BondCEBMaterialStatus :: initTempStatus()
195{
196 StructuralInterfaceMaterialStatus :: initTempStatus();
197 this->tempKappa = this->kappa;
198}
199
200void
201BondCEBMaterialStatus :: updateYourself(TimeStep *tStep)
202{
203 StructuralInterfaceMaterialStatus :: updateYourself(tStep);
204 this->kappa = this->tempKappa;
205}
206
207
208void
209BondCEBMaterialStatus :: saveContext(DataStream &stream, ContextMode mode)
210{
211 StructuralInterfaceMaterialStatus :: saveContext(stream, mode);
212
213 if ( !stream.write(kappa) ) {
215 }
216}
217
218void
219BondCEBMaterialStatus :: restoreContext(DataStream &stream, ContextMode mode)
220{
221 StructuralInterfaceMaterialStatus :: restoreContext(stream, mode);
222
223 if ( !stream.read(kappa) ) {
225 }
226}
227} // end namespace oofem
#define _IFT_BondCEBMaterial_ks
Definition bondceb.h:45
#define _IFT_BondCEBMaterial_s3
Definition bondceb.h:48
#define _IFT_BondCEBMaterial_s2
Definition bondceb.h:47
#define _IFT_BondCEBMaterial_s1
Definition bondceb.h:46
#define _IFT_BondCEBMaterial_taumax
Definition bondceb.h:50
#define _IFT_BondCEBMaterial_al
Definition bondceb.h:49
#define _IFT_BondCEBMaterial_kn
Definition bondceb.h:44
#define _IFT_BondCEBMaterial_tauf
Definition bondceb.h:51
#define REGISTER_Material(class)
double kappa
Cumulative slip.
Definition bondceb.h:63
double giveKappa() const
Returns the last equilibrated cumulative slip.
Definition bondceb.h:74
double tempKappa
Non-equilibrated cumulative slip.
Definition bondceb.h:65
void setTempKappa(double newKappa)
Sets the temporary cumulative slip to the given value.
Definition bondceb.h:78
double ks
Shear elastic stiffness.
Definition bondceb.h:108
double taumax
Shear strength.
Definition bondceb.h:110
double alpha
Exponent.
Definition bondceb.h:116
double s0
Characteristic slip values.
Definition bondceb.h:114
double tauf
Residual shear stress.
Definition bondceb.h:112
double evaluateBondStress(const double kappa) const
Definition bondceb.C:106
double kn
Normal elastic stiffness.
Definition bondceb.h:106
virtual int read(int *data, std::size_t count)=0
Reads count integer values into array pointed by data.
virtual int write(const int *data, std::size_t count)=0
Writes count integer values from array pointed by data.
void setField(int item, InputFieldType id)
double & at(std::size_t i)
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
StructuralInterfaceMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralInterfaceMaterialStatus with number n, belonging to domain d and I...
const FloatArrayF< 3 > & giveJump() const
Returns the const pointer to receiver's jump.
void letTempTractionBe(const FloatArrayF< 3 > v)
Assigns tempTraction to given vector v.
void letTempJumpBe(const FloatArrayF< 3 > v)
Assigns tempJump to given vector v.
const FloatArrayF< 3 > & giveTraction() const
Returns the const pointer to receiver's traction vector.
#define THROW_CIOERR(e)
#define OOFEM_WARNING(...)
Definition error.h:80
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
long ContextMode
Definition contextmode.h:43
FloatMatrixF< N, N > diag(const FloatArrayF< N > &v)
@ CIO_IOERR
General IO error.

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