OOFEM 3.0
Loading...
Searching...
No Matches
structuralcrosssection.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
38#include "gausspoint.h"
39#include "element.h"
40#include "floatarray.h"
41
42namespace oofem {
45{
46 MaterialMode mode = gp->giveMaterialMode();
47 if ( mode == _2dBeam ) {
48 return this->giveGeneralizedStress_Beam2d(strain, gp, tStep);
49 } else if ( mode == _3dBeam ) {
50 return this->giveGeneralizedStress_Beam3d(strain, gp, tStep);
51 } else if ( mode == _2dPlate ) {
52 return this->giveGeneralizedStress_Plate(strain, gp, tStep);
53 } else if ( mode == _3dShell ) {
54 return this->giveGeneralizedStress_Shell(strain, gp, tStep);
55 } else if ( mode == _3dShellRot ) {
56 return this->giveGeneralizedStress_ShellRot(strain, gp, tStep);
57 } else if ( mode == _3dMat ) {
58 return this->giveRealStress_3d(strain, gp, tStep);
59 } else if ( mode == _PlaneStrain ) {
60 return this->giveRealStress_PlaneStrain(strain, gp, tStep);
61 } else if ( mode == _PlaneStress ) {
62 return this->giveRealStress_PlaneStress(strain, gp, tStep);
63 } else if ( mode == _1dMat ) {
64 return this->giveRealStress_1d(strain, gp, tStep);
65 } else if ( mode == _Warping ) {
66 return this->giveRealStress_Warping(strain, gp, tStep);
67 } else {
68 // This should never happen ?
70 auto mat = dynamic_cast< StructuralMaterial * >( this->giveMaterial(gp) );
71 if ( mat->hasMaterialModeCapability(mode) ) {
72 FloatArray answer;
73 mat->giveRealStressVector(answer, gp, strain, tStep);
74 return answer;
75 } else {
76 OOFEM_ERROR("unsupported mode");
77 }
78 }
79}
80
81
84{
85 MaterialMode mode = gp->giveMaterialMode();
86 if ( mode == _3dMat ) {
87 return this->giveFirstPKStress_3d(reducedF, gp, tStep);
88 } else if ( mode == _PlaneStrain ) {
89 return this->giveFirstPKStress_PlaneStrain(reducedF, gp, tStep);
90 } else if ( mode == _PlaneStress ) {
91 return this->giveFirstPKStress_PlaneStress(reducedF, gp, tStep);
92 } else if ( mode == _1dMat ) {
93 return this->giveFirstPKStress_1d(reducedF, gp, tStep);
94 } else {
95 OOFEM_ERROR("unsupported mode");
96 }
97}
98
99
100
101
104 FloatArray *gradientStressVector3d)
105//
106// returns modified gradient of stress vector, which is used to
107// bring stresses back to yield surface.
108//
109// imposes zeros on places, where zero stress occurs. if energetically connected
110// strain is zero, we do not impose zero there, because stress exist and
111// must be taken into account when computing yeld function. In such case
112// a problem is assumed to be full 3d with some explicit strain equal to 0.
113//
114// On the other hand, if some stress is imposed to be zero, we understand
115// such case as subspace of 3d case (like a classical plane stess problem, with no
116// tracing of ez, sigma_z)
117//
118{
119 MaterialMode mode = gp->giveMaterialMode();
120 if ( gradientStressVector3d->giveSize() != 6 ) {
121 OOFEM_ERROR("gradientStressVector3d size mismatch");
122 }
123
124 if ( mode == _3dMat ) {
125 return gradientStressVector3d;
126 }
127
128
129 switch ( mode ) {
130 case _PlaneStress:
131 gradientStressVector3d->at(3) = 0.;
132 gradientStressVector3d->at(4) = 0.;
133 gradientStressVector3d->at(5) = 0.;
134 break;
135 case _PlaneStrain:
136 // gradientStressVector3d ->at(3) = 0.;
137 gradientStressVector3d->at(4) = 0.;
138 gradientStressVector3d->at(5) = 0.;
139 break;
140 case _1dMat:
141 for ( int i = 2; i <= 6; i++ ) {
142 gradientStressVector3d->at(i) = 0.;
143 }
144
145 break;
146 default:
147 OOFEM_ERROR( "unknown mode (%s)", __MaterialModeToString(mode) );
148 break;
149 }
150
151 return gradientStressVector3d;
152}
153
156{
157 auto mat = static_cast< StructuralMaterial * >( this->giveMaterial(gp) );
158 return mat->giveRealStressVector_3dBeamSubSoil(generalizedStrain, gp, tStep);
159}
160
163{
164 auto mat = dynamic_cast< StructuralMaterial * >( this->giveMaterial(gp) );
165 return mat->give3dBeamSubSoilStiffMtrx(ElasticStiffness, gp, tStep);
166}
167
168
169
172 FloatArray *gradientStrainVector3d)
173//
174// returns modified gradient of strain vector, which is used to
175// compute plastic strain increment.
176//
177// imposes zeros on places, where zero strain occurs or energetically connected stress
178// is prescribed to be zero.
179//
180{
181 MaterialMode mode = gp->giveMaterialMode();
182 if ( gradientStrainVector3d->giveSize() != 6 ) {
183 OOFEM_ERROR("gradientStrainVector3d size mismatch");
184 }
185
186 if ( mode == _3dMat ) {
187 return gradientStrainVector3d;
188 }
189
190
191 switch ( mode ) {
192 case _PlaneStress:
193 gradientStrainVector3d->at(3) = 0.;
194 gradientStrainVector3d->at(4) = 0.;
195 gradientStrainVector3d->at(5) = 0.;
196 break;
197 case _PlaneStrain:
198 gradientStrainVector3d->at(3) = 0.;
199 gradientStrainVector3d->at(4) = 0.;
200 gradientStrainVector3d->at(5) = 0.;
201 break;
202 case _1dMat:
203 for ( int i = 2; i <= 6; i++ ) {
204 gradientStrainVector3d->at(i) = 0.;
205 }
206
207 break;
208 default:
209 OOFEM_ERROR( "unknown mode (%s)", __MaterialModeToString(mode) );
210 break;
211 }
212
213 return gradientStrainVector3d;
214}
215} // end namespace oofem
double & at(Index i)
Definition floatarray.h:202
Index giveSize() const
Returns the size of receiver.
Definition floatarray.h:261
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition gausspoint.h:190
virtual FloatArray * imposeStressConstrainsOnGradient(GaussPoint *gp, FloatArray *gradientStressVector3d)
virtual FloatArrayF< 9 > giveGeneralizedStress_ShellRot(const FloatArrayF< 9 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const =0
FloatArray giveRealStresses(const FloatArray &reducedStrain, GaussPoint *gp, TimeStep *tStep) const
virtual FloatArrayF< 2 > giveRealStress_Warping(const FloatArrayF< 2 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 8 > giveGeneralizedStress_Shell(const FloatArrayF< 8 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 5 > giveFirstPKStress_PlaneStrain(const FloatArrayF< 5 > &reducedF, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArray * imposeStrainConstrainsOnGradient(GaussPoint *gp, FloatArray *gradientStressVector3d)
virtual FloatArrayF< 6 > giveRealStress_3d(const FloatArrayF< 6 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatMatrixF< 6, 6 > give3dBeamSubSoilStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatArrayF< 1 > giveFirstPKStress_1d(const FloatArrayF< 1 > &reducedF, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 9 > giveFirstPKStress_3d(const FloatArrayF< 9 > &reducedF, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 1 > giveRealStress_1d(const FloatArrayF< 1 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 6 > giveGeneralizedStress_Beam3d(const FloatArrayF< 6 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 3 > giveRealStress_PlaneStress(const FloatArrayF< 3 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArray giveFirstPKStresses(const FloatArray &reducedF, GaussPoint *gp, TimeStep *tStep) const
Material * giveMaterial(IntegrationPoint *ip) const override
virtual FloatArrayF< 4 > giveRealStress_PlaneStrain(const FloatArrayF< 4 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 3 > giveGeneralizedStress_Beam2d(const FloatArrayF< 3 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 4 > giveFirstPKStress_PlaneStress(const FloatArrayF< 4 > &reducedF, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 6 > giveGeneralizedStress_3dBeamSubSoil(const FloatArrayF< 6 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const
virtual FloatArrayF< 5 > giveGeneralizedStress_Plate(const FloatArrayF< 5 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatMatrixF< 6, 6 > give3dBeamSubSoilStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatArrayF< 6 > giveRealStressVector_3dBeamSubSoil(const FloatArrayF< 6 > &reducedE, GaussPoint *gp, TimeStep *tStep) const
#define OOFEM_ERROR(...)
Definition error.h:79

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