OOFEM 3.0
Loading...
Searching...
No Matches
linkslip.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 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 "linkslip.h"
36//#include "linearelasticmaterial.h"
37#include "gausspoint.h"
38#include "floatmatrix.h"
39#include "floatmatrixf.h"
40#include "floatarray.h"
41#include "floatarrayf.h"
42#include "floatmatrixf.h"
43//#include "CrossSections/structuralcrosssection.h"
44#include "engngm.h"
45#include "mathfem.h"
47#include "datastream.h"
48#include "staggeredproblem.h"
49#include "contextioerr.h"
50#include "classfactory.h"
51// #ifdef __TM_MODULE
52// #include "latticetransportelement.h"
53// #include "latticetransmat.h"
54// #include "latticelammat.h"
55// #include "pore.h"
56// #include "discretetransportproblem.h"
57// #endif
58
59namespace oofem {
61
63LinkSlip :: LinkSlip(int n, Domain *d) : StructuralInterfaceMaterial(n, d)
64{
65}
66
67
68void
69LinkSlip :: initializeFrom(InputRecord &ir)
70{
71 StructuralInterfaceMaterial :: initializeFrom(ir);;
72
73 //axial stiffness
75
76 //Ratio of lateral to axial stiffness
78
79 //Two models available
80 //0 default. Linear elastic-perfect plastic
81 //1 bond slip according first part of CEB model and then constant
82 //2 bond slip according to CEB model
84
86
87 if ( type == 1 || type == 2 ) {
90 }
91
92 if ( type == 2 ) {
96 }
97
98 if ( type == 1 || type == 2 ) {
99 if ( (type == 1 || type == 2) && this->kNormal < this->tauMax/this->s1 ) {
100 this->kNormal = this->tauMax/this->s1;
101 OOFEM_WARNING("Parameter kN adjusted");
102 }
103 }
104}
105
106
107std::unique_ptr<MaterialStatus>
108LinkSlip :: CreateStatus(GaussPoint *gp) const
109{
110 return std::make_unique<LinkSlipStatus>(gp);
111}
112
113double
114LinkSlip :: evaluateBondStress(const double kappa) const
115{
116 if ( this->type == 0 ) { //elastic-perfectly plastic
117 return this->tauMax;
118 } else if ( this->type == 1 ) { //modified bond model
119 if ( kappa <= 0. ){
120 return 0.;
121 }
122 if ( kappa <= s1 ) {
123 return tauMax * pow(kappa/s1, alpha);
124 }
125 return tauMax;
126 } else if ( this->type == 2 ) {
127 if ( kappa <= 0. ) {
128 return 0.;
129 }
130 if ( kappa <= s1 ) {
131 return tauMax * pow(kappa/s1, alpha);
132 }
133 if ( kappa <= s2 ) {
134 return tauMax;
135 }
136 if ( kappa <= s3 ) {
137 return tauMax - (tauMax-tauFinal) * (kappa-s2) / (s3-s2);
138 }
139 return tauFinal;
140 } else { //unknown type
141 OOFEM_ERROR("Unknown bond model type. Type should be 0, 1 or 2.");
142 }
143
144 // return 0.; //Should not be here.
145}
146
147
149LinkSlip :: giveEngTraction_3d(const FloatArrayF<3> &jump, GaussPoint *gp, TimeStep *tStep) const
150{
151 auto status = static_cast< LinkSlipStatus * >( this->giveStatus(gp) );
152
153 //For axial (first) component, strain has the meanig of slip. Stress is traction.
154
155 const auto &oldTraction = status->giveTraction();
156 const auto &oldJump = status->giveJump();
157
158 //evaluate tempKappa (no elastic strain in axial direction)
159 double tempKappa = status->giveKappa() + fabs(jump.at(1)-oldJump.at(1));
160
161 FloatArrayF<3> traction;
162
163 //trial stress in axial direction
164 traction.at(1) = oldTraction.at(1) + (jump.at(1)-oldJump.at(1))*this->kNormal;
165
166
167 double f = fabs(traction.at(1)) - evaluateBondStress(tempKappa);
168
169 if ( f > 0 ) { //plastic response.
170 //Reduced stress by increasing plastic strain.
171 traction.at(1) = sgn(traction.at(1)) * evaluateBondStress(tempKappa);
172 }
173
174 //Compute the lateral stress components
175 for ( int i = 2; i <= 3; i++ ) { // only diagonal terms matter
176 traction.at(i) = this->kLateral * jump.at(i);
177 }
178
179 //Set temp values in status needed for dissipation
180 status->letTempKappaBe(tempKappa);
181 status->letTempJumpBe(jump);
182 status->letTempTractionBe(traction);
183
184 return traction;
185}
186
187Interface *
188LinkSlip :: giveInterface(InterfaceType type)
189{
190 return nullptr;
191}
192
194LinkSlip :: give3dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
195{
196 return diag<3>({this->kNormal, this->kLateral, this->kLateral});
197}
198
199LinkSlipStatus :: LinkSlipStatus(GaussPoint *g) : StructuralInterfaceMaterialStatus(g)
200{
201}
202
203
204void
205LinkSlipStatus :: initTempStatus()
206//
207// initializes temp variables according to variables form previous equlibrium state.
208// builds new crackMap
209//
210{
211 StructuralInterfaceMaterialStatus :: initTempStatus();
212 this->tempKappa = this->kappa;
213}
214
215
216void
217LinkSlipStatus :: printOutputAt(FILE *file, TimeStep *tStep) const
218{
219 StructuralInterfaceMaterialStatus :: printOutputAt(file, tStep);
220 fprintf(file, " jump ");
221 for ( auto &val : this->jump ) {
222 fprintf(file, " %.4e", val );
223 }
224
225 fprintf(file, "\n traction ");
226 for ( auto &val : this->traction ) {
227 fprintf(file, " %.4e", val );
228 }
229 fprintf(file, "\n");
230
231 fprintf(file, "kappa %.8e\n", this->kappa);
232 return;
233}
234
235void
236LinkSlipStatus :: saveContext(DataStream &stream, ContextMode mode)
237{
238 // save parent class status
239
240 StructuralInterfaceMaterialStatus :: saveContext(stream, mode);
241
242 // write a raw data
243 if ( !stream.write(kappa) ) {
245 }
246
247}
248
249
250void
251LinkSlipStatus :: restoreContext(DataStream &stream, ContextMode mode)
252{
253 StructuralInterfaceMaterialStatus :: restoreContext(stream, mode);
254
255 // read raw data
256 if ( !stream.read(kappa) ) {
258 }
259}
260
261void
262LinkSlipStatus :: updateYourself(TimeStep *atTime)
263{
264 StructuralInterfaceMaterialStatus :: updateYourself(atTime);
265 this->kappa = this->tempKappa;
266}
267
268
269int
270LinkSlip :: giveIPValue(FloatArray &answer,
271 GaussPoint *gp,
273 TimeStep *atTime)
274{
275 auto status = static_cast< LinkSlipStatus * >( this->giveStatus(gp) );
276 if ( type == IST_InterfaceJump ) {
277 answer.resize(3);
278 answer.zero();
279 answer = status->giveJump();
280 return 1;
281 } else if ( type == IST_InterfaceTraction ) {
282 answer.resize(3);
283 answer.zero();
284 answer = status->giveTraction();
285 return 1;
286 } else {
287 return StructuralInterfaceMaterial :: giveIPValue(answer, gp, type, atTime);
288 }
289// return Material :: giveIPValue(answer, gp, type, atTime);
290}
291}
#define REGISTER_Material(class)
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.
double & at(std::size_t i)
void resize(Index s)
Definition floatarray.C:94
void zero()
Zeroes all coefficients of receiver.
Definition floatarray.C:683
double tauFinal
Definition linkslip.h:117
double kLateral
Lateral modulus.
Definition linkslip.h:112
double evaluateBondStress(const double kappa) const
Definition linkslip.C:114
double tauMax
Strength for slip component.
Definition linkslip.h:117
double kNormal
Normal modulus.
Definition linkslip.h:109
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...
FloatArrayF< 3 > jump
Equilibrated jump (discontinuity).
FloatArrayF< 3 > traction
Equilibrated (engineering) traction vector.
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 OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define _IFT_LinkSlip_alpha
Definition linkslip.h:53
#define _IFT_LinkSlip_type
Definition linkslip.h:47
#define _IFT_LinkSlip_kn
Definition linkslip.h:45
#define _IFT_LinkSlip_s3
Definition linkslip.h:51
#define _IFT_LinkSlip_s1
Definition linkslip.h:49
#define _IFT_LinkSlip_s2
Definition linkslip.h:50
#define _IFT_LinkSlip_tf
Definition linkslip.h:52
#define _IFT_LinkSlip_t0
Definition linkslip.h:48
#define _IFT_LinkSlip_kl
Definition linkslip.h:46
long ContextMode
Definition contextmode.h:43
FloatMatrixF< N, N > diag(const FloatArrayF< N > &v)
double sgn(double i)
Returns the signum of given value (if value is < 0 returns -1, otherwise returns 1).
Definition mathfem.h:104
@ 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