OOFEM 3.0
Loading...
Searching...
No Matches
intmatbilinczelastic.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
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
48IntMatBilinearCZElastic :: IntMatBilinearCZElastic(int n, Domain *d) : StructuralInterfaceMaterial(n, d) { }
49
50
52IntMatBilinearCZElastic :: giveFirstPKTraction_3d(const FloatArrayF<3> &jump, const FloatMatrixF<3,3> &F, GaussPoint *gp, TimeStep *tStep) const
53{
54 IntMatBilinearCZElasticStatus *status = static_cast< IntMatBilinearCZElasticStatus * >( this->giveStatus(gp) );
55
57 // no degradation in shear
58 // jumpVector = [normal shear1 shear2]
59 //auto [gn, gs1, gs2] = jump;
60 double gn = jump.at(1);
61 double gs1 = jump.at(2);
62 double gs2 = jump.at(3);
63
64 double normal;
65 if ( gn <= 0.0 ) { // compresssion
66 normal = this->knc * gn;
67 } else if ( gn <= this->gn0 ) { // first linear part
68 normal = this->kn0 * gn;
69 } else if ( gn <= this->gnmax ) { // softening branch
70 normal = this->sigfn + this->kn1 * ( gn - this->gn0 );
71 //printf("Softening branch...\n");
72 } else {
73 normal = 0.0; // failed
74 //printf("Failed...\n");
75 }
76 FloatArrayF<3> answer = {normal, this->ks0 * gs1, this->ks0 * gs2};
77
78 // update gp
79 status->letTempJumpBe(jump);
80 status->letTempFirstPKTractionBe(answer);
81 status->letTempTractionBe(answer);
82 return answer;
83}
84
85
87IntMatBilinearCZElastic :: give3dStiffnessMatrix_dTdj(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
88{
89 IntMatBilinearCZElasticStatus *status = static_cast< IntMatBilinearCZElasticStatus * >( this->giveStatus(gp) );
90
91 const auto &jumpVector = status->giveTempJump();
92 double gn = jumpVector.at(1);
93
94 double normal;
95 if ( gn <= 0.0 ) { // compresssion
96 normal = this->knc;
97 } else if ( gn <= this->gn0 ) { // first linear part
98 normal = this->kn0;
99 //printf("Linear branch...\n");
100 } else if ( gn <= this->gnmax ) { // softening branch
101 normal = this->kn1;
102 //printf("Softening branch...\n");
103 } else {
104 normal = 0.0; // failed
105 //printf("Failed...\n");
106 }
107 return diag<3>({normal, this->ks0, this->ks0});
108}
109
110
111const double tolerance = 1.0e-12; // small number
112void
113IntMatBilinearCZElastic :: initializeFrom(InputRecord &ir)
114{
116 this->knc = kn0; // Defaults to the same stiffness in compression and tension
118
119 this->ks0 = 0.0; // Defaults to no shear stiffness
121
123
124 this->sigfn = 1.0e50; // defaults to infinite strength @todo but then it will not be bilinear only linear
125 this->sigfs = 1.0e50;
127
128 this->gn0 = sigfn / ( kn0 + tolerance ); // normal jump at damage initiation
129 this->gs0 = sigfs / ( ks0 + tolerance ); // shear jump at damage initiation
130 this->gnmax = 2.0 * GIc / sigfn; // @todo defaults to zero - will this cause problems?
131 this->kn1 = -this->sigfn / ( this->gnmax - this->gn0 ); // slope during softening part in normal dir
132
133 StructuralInterfaceMaterial :: initializeFrom(ir);
134
135 // check validity of the material paramters
136 double kn0min = 0.5 * this->sigfn * this->sigfn / this->GIc;
137 if ( this->kn0 < 0.0 ) {
138 throw ValueInputException(ir, _IFT_IntMatBilinearCZElastic_kn, "stiffness kn0 is negative");
139 } else if ( this->ks0 < 0.0 ) {
140 throw ValueInputException(ir, _IFT_IntMatBilinearCZElastic_ks, "stiffness ks0 is negative");
141 } else if ( this->GIc < 0.0 ) {
142 throw ValueInputException(ir, _IFT_IntMatBilinearCZElastic_g1c, "GIc is negative");
143 } else if ( this->kn0 < kn0min ) { // => gn0 > gnmax
144 //throw ValueInputException(ir, _IFT_IntMatBilinearCZElastic_kn, "kn0 is below minimum stiffness, which is unphysical");
145 }
146}
147
148void IntMatBilinearCZElastic :: giveInputRecord(DynamicInputRecord &input)
149{
150 StructuralInterfaceMaterial :: giveInputRecord(input);
151
157}
158
159int
160IntMatBilinearCZElastic :: checkConsistency()
161{
162 return 1;
163}
164
165void
166IntMatBilinearCZElastic :: printYourself()
167{
168 printf("Paramters for IntMatBilinearCZElastic: \n");
169
170 printf("-Strength paramters \n");
171 printf(" sigfn = %e \n", this->sigfn);
172 printf(" GIc = %e \n", this->GIc);
173 //printf("\n");
174
175 printf("-Stiffness parameters \n");
176 printf(" kn0 = %e \n", this->kn0);
177 printf(" kn1 = %e \n", this->kn1);
178 printf(" knc = %e \n", this->knc);
179 //printf("\n");
180
181 printf("-jump limits \n");
182 printf(" gn0 = %e \n", this->gn0);
183 printf(" gnmax = %e \n", this->gnmax);
184}
185
186} // end namespace oofem
#define REGISTER_Material(class)
void setField(int item, InputFieldType id)
double & at(std::size_t i)
double kn0
Material parameters.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
const FloatArrayF< 3 > & giveTempJump() const
Returns the const pointer to receiver's temporary jump.
void letTempFirstPKTractionBe(const FloatArrayF< 3 > v)
Assigns tempFirstPKTraction to given vector v.
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
#define _IFT_IntMatBilinearCZElastic_ks
#define _IFT_IntMatBilinearCZElastic_g1c
#define _IFT_IntMatBilinearCZElastic_sigfn
#define _IFT_IntMatBilinearCZElastic_knc
#define _IFT_IntMatBilinearCZElastic_kn
const double tolerance
FloatMatrixF< N, N > diag(const FloatArrayF< N > &v)

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