OOFEM 3.0
Loading...
Searching...
No Matches
simpleinterfacemat.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 "simpleinterfacemat.h"
37#include "gausspoint.h"
38#include "floatmatrix.h"
39#include "floatarray.h"
40#include "mathfem.h"
41#include "contextioerr.h"
42#include "classfactory.h"
43#include "dynamicinputrecord.h"
44
45namespace oofem {
47
48SimpleInterfaceMaterial :: SimpleInterfaceMaterial(int n, Domain *d) : StructuralInterfaceMaterial(n, d) { }
49
50
52SimpleInterfaceMaterial :: giveEngTraction_3d(const FloatArrayF<3> &jump, GaussPoint *gp, TimeStep *tStep) const
53{
54 SimpleInterfaceMaterialStatus *status = static_cast< SimpleInterfaceMaterialStatus * >( this->giveStatus(gp) );
55 bool shearYieldingFlag = false;
56 double normalStrain = jump.at(1);
57 double normalStress, maxShearStress;
58 double shift = -this->kn * this->stiffCoeff * normalClearance;
59
60 if (regularizedModel) {
61 normalStress = 0.5*this->kn*(normalClearance+normalStrain)-
62 ((this->kn*0.5)/(m))*log(fabs(cosh(m*(normalClearance+normalStrain))))+
63 0.5*this->stiffCoeff*this->kn*(normalClearance+normalStrain)+
64 ((this->stiffCoeff*this->kn*0.5)/(m))*log(fabs(cosh(m*(normalClearance+normalStrain))));
65 maxShearStress = fabs(normalStress) * this->frictCoeff;
66 } else {
67 if ( normalStrain + normalClearance <= 0. ) {
68 normalStress = this->kn * ( normalStrain + normalClearance ) + shift; //in compression and after the clearance gap closed
69 maxShearStress = fabs(normalStress) * this->frictCoeff;
70 } else {
71 normalStress = this->kn * this->stiffCoeff * ( normalStrain + normalClearance ) + shift;
72 maxShearStress = 0.;
73 }
74 }
75
76 FloatArrayF<2> tempShearStressShift = status->giveShearStressShift();
77 FloatArrayF<2> shearJump = {jump.at(2), jump.at(3)};
78 auto shearTraction = this->ks * shearJump - tempShearStressShift;
79 double dpn = norm(shearTraction);
80 if ( dpn > maxShearStress ) {
81 shearYieldingFlag = true;
82 shearTraction *= maxShearStress / dpn;
83 }
84
85 tempShearStressShift = this->ks * shearJump - shearTraction;
86
87 double lim = 1.e+50;
88 FloatArrayF<3> answer = {max(min(normalStress, lim), -lim), shearTraction.at(1), shearTraction.at(2)};
89
90 // update gp
91 status->setShearYieldingFlag(shearYieldingFlag);
92 status->setTempShearStressShift(tempShearStressShift);
93 status->letTempJumpBe(jump);
94 status->letTempTractionBe(answer);
95 return answer;
96}
97
98
100SimpleInterfaceMaterial :: give3dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
101{
102 SimpleInterfaceMaterialStatus *status = static_cast< SimpleInterfaceMaterialStatus * >( this->giveStatus(gp) );
103 double normalJump = status->giveTempJump().at(1);
104
105 FloatMatrixF<3,3> answer;
106
107 if (regularizedModel) {
108 answer.at(1, 1) = this->kn+0.5*tanh(m*(normalJump+this->normalClearance))*(this->kn*this->stiffCoeff-this->kn);
109 if ( status->giveShearYieldingFlag() ) {
110 FloatArray jump = status->giveTempJump();
111 FloatArray traction = status->giveTempTraction();
112 answer.at(2, 2) = answer.at(3, 3) = traction.at(2)/jump.at(2);
113 } else {
114 answer.at(2, 2) = answer.at(3, 3) = ks;//this->kn; //in compression and after the clearance gap closed
115 }
116 } else {
117
118 if ( rMode == SecantStiffness || rMode == TangentStiffness ) {
119 if ( normalJump + normalClearance <= 0. ) {
120 answer.at(1, 1) = kn;
121 if ( status->giveShearYieldingFlag() ) {
122 FloatArray jump = status->giveTempJump();
123 FloatArray traction = status->giveTempTraction();
124
125 answer.at(2, 2) = answer.at(3, 3) = traction.at(2)/jump.at(2);
126 } else {
127 answer.at(2, 2) = answer.at(3, 3) = ks;//this->kn; //in compression and after the clearance gap closed
128 }
129 } else {
130 answer.at(1, 1) = this->kn * this->stiffCoeff;
131 answer.at(2, 2) = answer.at(3, 3) = 0;
132 }
133 } else {
134 answer.at(1, 1) = kn;
135 answer.at(2, 2) = answer.at(3, 3) = this->ks;
136 }
137 }
138 return answer;
139}
140
141
142int
143SimpleInterfaceMaterial :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
144{
145 return StructuralInterfaceMaterial :: giveIPValue(answer, gp, type, tStep);
146}
147
148
149void
167
168
169void
170SimpleInterfaceMaterial :: giveInputRecord(DynamicInputRecord &input)
171{
172 StructuralInterfaceMaterial :: giveInputRecord(input);
177
180
181}
182
183
184SimpleInterfaceMaterialStatus :: SimpleInterfaceMaterialStatus(GaussPoint *g) : StructuralInterfaceMaterialStatus(g)
185{}
186
187
188void
189SimpleInterfaceMaterialStatus :: printOutputAt(FILE *file, TimeStep *tStep) const
190{
191 StructuralInterfaceMaterialStatus :: printOutputAt(file, tStep);
192 fprintf(file, "status { ");
193 fprintf( file, "shearStressShift (%f, %f)", this->shearStressShift.at(1), this->shearStressShift.at(2) );
194 fprintf(file, "}\n");
195}
196
197
198void
199SimpleInterfaceMaterialStatus :: initTempStatus()
200{
201 StructuralInterfaceMaterialStatus :: initTempStatus();
203}
204
205
206void
207SimpleInterfaceMaterialStatus :: updateYourself(TimeStep *tStep)
208{
209 StructuralInterfaceMaterialStatus :: updateYourself(tStep);
211}
212
213
214void
215SimpleInterfaceMaterialStatus :: saveContext(DataStream &stream, ContextMode mode)
216{
217 StructuralInterfaceMaterialStatus :: saveContext(stream, mode);
218
219 //if ( !stream.write(kappa) ) {
220 //THROW_CIOERR(CIO_IOERR);
221 //}
222}
223
224
225void
226SimpleInterfaceMaterialStatus :: restoreContext(DataStream &stream, ContextMode mode)
227{
228 StructuralInterfaceMaterialStatus :: restoreContext(stream, mode);
229
230 //if ( !stream.read(kappa) ) {
231 //THROW_CIOERR(CIO_IOERR);
232 //}
233}
234} // end namespace oofem
#define REGISTER_Material(class)
void setField(int item, InputFieldType id)
double & at(std::size_t i)
double & at(Index i)
Definition floatarray.h:202
double at(std::size_t i, std::size_t j) const
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
const FloatArrayF< 2 > & giveShearStressShift() const
void setTempShearStressShift(const FloatArrayF< 2 > &newShearStressShift)
double normalClearance
Normal distance which needs to be closed when interface element should act in compression (distance i...
StructuralInterfaceMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralInterfaceMaterialStatus with number n, belonging to domain d and I...
const FloatArrayF< 3 > & giveTempJump() const
Returns the const pointer to receiver's temporary jump.
const FloatArrayF< 3 > & giveTempTraction() const
Returns the const pointer to receiver's temporary traction vector.
void letTempTractionBe(const FloatArrayF< 3 > v)
Assigns tempTraction to given vector v.
void letTempJumpBe(const FloatArrayF< 3 > v)
Assigns tempJump to given vector v.
#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
double norm(const FloatArray &x)
FloatArrayF< N > min(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
FloatArrayF< N > max(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
#define _IFT_SimpleInterfaceMaterial_ks
#define _IFT_SimpleInterfaceMaterial_stiffCoeff
#define _IFT_SimpleInterfaceMaterial_regularizedModel
#define _IFT_SimpleInterfaceMaterial_regularizationCoeff
#define _IFT_SimpleInterfaceMaterial_normalClearance
#define _IFT_SimpleInterfaceMaterial_kn
#define _IFT_SimpleInterfaceMaterial_frictCoeff

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