OOFEM 3.0
Loading...
Searching...
No Matches
simplevitrificationmaterial.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 "floatarrayf.h"
38#include "floatmatrixf.h"
39#include "dynamicinputrecord.h"
40#include "classfactory.h"
41
42namespace oofem {
44
45
62
63
64void SimpleVitrificationMaterial :: giveInputRecord(DynamicInputRecord &input)
65{
66 StructuralMaterial :: giveInputRecord(input);
67
69
74
79}
80
81
82int SimpleVitrificationMaterial :: checkConsistency()
83{
84 return true;
85}
86
87
89SimpleVitrificationMaterial :: computeTangent(bool vitr) const
90{
91 const auto &activeNu = vitr ? this->nu_r : this->nu;
92 const auto &activeE = vitr ? this->E_r : this->E;
93 const auto &activeG = vitr ? this->G_r : this->G;
94
95 //double [nyz, nxz, nxy] = activeNu; // c++17
96 //double [nzy, nzx, nyx] = activeNu;
97
98 double nyz = activeNu.at(1);
99 double nxz = activeNu.at(2);
100 double nxy = activeNu.at(3);
101
102 double nzy = activeNu.at(1);
103 double nzx = activeNu.at(2);
104 double nyx = activeNu.at(3);
105
106 double eksi = 1. - ( nxy * nyx + nyz * nzy + nzx * nxz ) - ( nxy * nyz * nzx + nyx * nzy * nxz );
107
108 FloatMatrixF<6,6> tangent;
109 // switched letters from original oofem -> now produces same material stiffness matrix as Abaqus method
110 tangent.at(1, 1) = activeE.at(1) * ( 1. - nyz * nzy ) / eksi;
111 tangent.at(1, 2) = activeE.at(2) * ( nxy + nxz * nzy ) / eksi;
112 tangent.at(1, 3) = activeE.at(3) * ( nxz + nyz * nxy ) / eksi;
113 tangent.at(2, 2) = activeE.at(2) * ( 1. - nxz * nzx ) / eksi;
114 tangent.at(2, 3) = activeE.at(3) * ( nyz + nyx * nxz ) / eksi;
115 tangent.at(3, 3) = activeE.at(3) * ( 1. - nyx * nxy ) / eksi;
116
117 // define the lower triangle
118 for ( int i = 1; i < 4; i++ ) {
119 for ( int j = 1; j < i; j++ ) {
120 tangent.at(i, j) = tangent.at(j, i);
121 }
122 }
123
124 tangent.at(4, 4) = activeG.at(1);
125 tangent.at(5, 5) = activeG.at(2);
126 tangent.at(6, 6) = activeG.at(3);
127
128 return tangent;
129}
130
131
132
134SimpleVitrificationMaterial :: give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
135{
136 bool vitr = tStep->giveIntrinsicTime() < this->vitrTime;
137 return this->computeTangent(vitr);
138}
139
140
142SimpleVitrificationMaterial :: giveRealStressVector_3d(const FloatArrayF<6> &strain, GaussPoint *gp, TimeStep *tStep) const
143{
144 auto status = dynamic_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
145
146 auto thermalStrain = computeStressIndependentStrainVector_3d(gp, tStep, VM_Total);
147 auto deltaStrain = strain - thermalStrain - FloatArrayF<6>(status->giveStrainVector());
148
149 bool vitr = tStep->giveIntrinsicTime() < this->vitrTime;
150 auto d = this->computeTangent(vitr);
151
152 auto deltaStress = dot(d, deltaStrain);
153
154 auto stress = status->giveStressVector() + deltaStress;
155
156 // update gp
157 status->letTempStrainVectorBe(strain);
158 status->letTempStressVectorBe(stress);
159
160 return stress;
161}
162
163
164FloatArrayF<6> SimpleVitrificationMaterial :: giveThermalDilatationVector(GaussPoint *gp, TimeStep *tStep) const
165{
166 bool vitr = tStep->giveIntrinsicTime() < this->vitrTime;
167 return {
168 vitr ? this->alpha_r.at(1) : this->alpha.at(1),
169 vitr ? this->alpha_r.at(2) : this->alpha.at(2),
170 vitr ? this->alpha_r.at(3) : this->alpha.at(3),
171 0., 0., 0.,
172 };
173}
174
175
176std::unique_ptr<MaterialStatus> SimpleVitrificationMaterial :: CreateStatus(GaussPoint *gp) const
177{
178 return std::make_unique<StructuralMaterialStatus>(gp);
179}
180} // end namespace oofem
#define REGISTER_Material(class)
void setField(int item, InputFieldType id)
double at(std::size_t i, std::size_t j) const
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
FloatArray E_r
Material parameters for the rubbery part of the model (before vitrification).
FloatArray E
Material parameters for the glassy part of the model (after vitrification).
double vitrTime
Vitrification time (when equal or larger than this time the material changes response).
FloatMatrixF< 6, 6 > computeTangent(bool vitr) const
FloatArrayF< 6 > computeStressIndependentStrainVector_3d(GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
Definition timestep.h:166
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
double dot(const FloatArray &x, const FloatArray &y)
#define _IFT_SimpleVitrificationMaterial_E_r
#define _IFT_SimpleVitrificationMaterial_G_r
#define _IFT_SimpleVitrificationMaterial_vitrificationTime
Describes the time where the material switches response.
#define _IFT_SimpleVitrificationMaterial_E
#define _IFT_SimpleVitrificationMaterial_G
#define _IFT_SimpleVitrificationMaterial_alpha_r
#define _IFT_SimpleVitrificationMaterial_nu
#define _IFT_SimpleVitrificationMaterial_alpha
#define _IFT_SimpleVitrificationMaterial_nu_r

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