OOFEM 3.0
Loading...
Searching...
No Matches
intmatcoulombcontact.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
36#include "gausspoint.h"
37#include "floatmatrix.h"
38#include "floatarray.h"
39#include "mathfem.h"
40#include "contextioerr.h"
41#include "classfactory.h"
42#include "dynamicinputrecord.h"
43
44namespace oofem {
46
47IntMatCoulombContact :: IntMatCoulombContact(int n, Domain *d) : StructuralInterfaceMaterial(n, d) { }
48
49
51IntMatCoulombContact :: giveEngTraction_3d(const FloatArrayF<3> &jump, GaussPoint *gp, TimeStep *tStep) const
52{
53 IntMatCoulombContactStatus *status = static_cast< IntMatCoulombContactStatus * >( this->giveStatus( gp ) );
54 auto tempShearStressShift = status->giveShearStressShift();
55
56 double normalJump = jump[0];
57 FloatArrayF<2> shearJump{ jump[1], jump[2] };
58
59 double maxShearStress = 0.0;
60 double shift = -this->kn * this->stiffCoeff * normalClearance;
61
62 double normalStress;
63 if ( normalJump + normalClearance <= 0. ) {
64 normalStress = this->kn * ( normalJump + normalClearance ) + shift; //in compression and after the clearance gap closed
65 maxShearStress = fabs( normalStress ) * this->frictCoeff;
66 } else {
67 normalStress = this->kn * this->stiffCoeff * ( normalJump + normalClearance ) + shift;
68 maxShearStress = 0.;
69 }
70 auto shearStress = this->kn * shearJump - tempShearStressShift;
71 double dp = norm(shearStress);
72 double eps = 1.0e-15; // small number
73 if ( dp > maxShearStress ) {
74 shearStress *= maxShearStress / ( dp + eps );
75 }
76 tempShearStressShift = this->kn * shearJump - shearStress;
77
78 // Set stress components in the traction vector
79 FloatArrayF<3> answer = {normalStress, shearStress[0], shearStress[1]};
80
81 // Update gp
82 status->setTempShearStressShift( tempShearStressShift );
83 status->letTempJumpBe( jump );
84 status->letTempTractionBe( answer );
85 return answer;
86}
87
88
90IntMatCoulombContact :: give3dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
91{
92 IntMatCoulombContactStatus *status = static_cast< IntMatCoulombContactStatus * > ( this->giveStatus(gp) );
93 const auto &jump = status->giveTempJump();
94 double normalJump = jump[0]; //in status, normal is always the first component
95
96 auto answer = eye<3>();
97 if ( rMode == SecantStiffness || rMode == TangentStiffness ) {
98 if ( normalJump + normalClearance <= 0 ) {
99 answer *= this->kn; //in compression and after the clearance gap closed
100 } else {
101 answer *= this->kn * this->stiffCoeff;
102 }
103 } else {
104 answer *= this->kn;
105 }
106 return answer;
107}
108
109
110void
111IntMatCoulombContact :: initializeFrom(InputRecord &ir)
112{
113 StructuralInterfaceMaterial :: initializeFrom( ir );
114
115 frictCoeff = 0.;
116 stiffCoeff = 0.;
117 normalClearance = 0.;
122}
123
124
125void
126IntMatCoulombContact :: giveInputRecord(DynamicInputRecord &input)
127{
128 StructuralInterfaceMaterial :: giveInputRecord(input);
133}
134
135
136IntMatCoulombContactStatus :: IntMatCoulombContactStatus(GaussPoint *g) : StructuralInterfaceMaterialStatus(g)
137{}
138
139
140void
141IntMatCoulombContactStatus :: printOutputAt(FILE *file, TimeStep *tStep) const
142{
144 fprintf(file, "status { ");
145 fprintf( file, "shearStressShift (%f, %f)", this->shearStressShift.at( 1 ), this->shearStressShift.at( 2 ) );
146 fprintf(file, "}\n");
147}
148
149
150void
151IntMatCoulombContactStatus :: initTempStatus()
152{
155}
156
157
158void
159IntMatCoulombContactStatus :: updateYourself(TimeStep *tStep)
160{
163}
164
165
166void
167IntMatCoulombContactStatus :: saveContext(DataStream &stream, ContextMode mode)
168{
170
171 //if ( !stream.write(kappa) ) {
172 //THROW_CIOERR(CIO_IOERR);
173 //}
174}
175
176
177void
178IntMatCoulombContactStatus :: restoreContext(DataStream &stream, ContextMode mode)
179{
181
182 //if ( !stream.read(kappa) ) {
183 //THROW_CIOERR(CIO_IOERR);
184 //}
185}
186} // end namespace oofem
#define REGISTER_Material(class)
void setField(int item, InputFieldType id)
void setTempShearStressShift(const FloatArrayF< 2 > &newShearStressShift)
const FloatArrayF< 2 > & giveShearStressShift() const
double normalClearance
Normal distance which needs to be closed when interface element should act in compression (distance i...
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 > & giveTempJump() const
Returns the const pointer to receiver's temporary jump.
void saveContext(DataStream &stream, ContextMode mode) override
void letTempTractionBe(const FloatArrayF< 3 > v)
Assigns tempTraction to given vector v.
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
void letTempJumpBe(const FloatArrayF< 3 > v)
Assigns tempJump to given vector v.
void restoreContext(DataStream &stream, ContextMode mode) override
#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_IntMatCoulombContact_stiffCoeff
#define _IFT_IntMatCoulombContact_frictCoeff
#define _IFT_IntMatCoulombContact_kn
#define _IFT_IntMatCoulombContact_normalClearance
long ContextMode
Definition contextmode.h:43
double norm(const FloatArray &x)
FloatMatrixF< N, N > eye()
Constructs an identity matrix.

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