OOFEM 3.0
Loading...
Searching...
No Matches
winklermodel.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 "winklermodel.h"
37#include "floatmatrix.h"
38#include "gausspoint.h"
39#include "classfactory.h"
40#include "dynamicinputrecord.h"
41
42namespace oofem {
44
47
48
49void
50WinklerMaterial :: initializeFrom(InputRecord &ir)
51{
52 StructuralMaterial :: initializeFrom(ir);
53
55 globalFromulation = true;
56 int var=1;
59}
60
61
62void
63WinklerMaterial :: giveInputRecord(DynamicInputRecord &input)
64{
65 StructuralMaterial :: giveInputRecord(input);
66
68}
69
70
73{
74 auto tangent = this->give2dPlateSubSoilStiffMtrx(ElasticStiffness, gp, tStep);
75 auto answer = dot(tangent, reducedE);
76
77 auto status = static_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
78 status->letTempStrainVectorBe(reducedE);
79 status->letTempStressVectorBe(answer);
80 return answer;
81}
82
85{
86 auto tangent = this->give3dBeamSubSoilStiffMtrx(ElasticStiffness, gp, tStep);
87 auto answer = dot(tangent, reducedE);
88
89 auto status = static_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
90 status->letTempStrainVectorBe(reducedE);
91 status->letTempStressVectorBe(answer);
92 return answer;
93}
94
95
97WinklerMaterial :: give2dPlateSubSoilStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
98{
99 FloatMatrixF<3,3> answer;
100 answer.at(1, 1) = c1.at(1);
101 //answer.at(2, 2) = c2;
102 //answer.at(3, 3) = c2;
103 return answer;
104}
105
106
108WinklerMaterial::give3dBeamSubSoilStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const
109{
110 if ( this->c1.giveSize() == 6 ) {
111 auto answer = diag(FloatArrayF<6>(this->c1));
112
113 if (globalFromulation) {
115 if (ei) {
116 auto T = ei->B3SSMI_getUnknownsGtoLRotationMatrix();
117 answer = unrotate(answer, T);
118 } else {
119 OOFEM_ERROR("Beam3dSubsoilMaterialInterface required from element");
120 }
121 }
122 return answer;
123 } else {
124 OOFEM_ERROR ("C1 attribute size error (shouldequal to 6 for 3dBeamSubsoil mode)");
125 }
126}
127
128
129std::unique_ptr<MaterialStatus>
130WinklerMaterial :: CreateStatus(GaussPoint *gp) const
131{
132 return std::make_unique<StructuralMaterialStatus>(gp);
133}
134
135
136bool
137WinklerMaterial :: hasMaterialModeCapability(MaterialMode mode) const
138//
139// returns whether receiver supports given mode
140//
141{
142 return mode == _2dPlateSubSoil || mode == _3dBeamSubSoil;
143}
144
145
146
147
148} // end namespace oofem
#define REGISTER_Material(class)
void setField(int item, InputFieldType id)
virtual Interface * giveInterface(InterfaceType t)
Definition femcmpnn.h:181
double at(std::size_t i, std::size_t j) const
Element * giveElement()
Returns corresponding element to receiver.
Definition gausspoint.h:187
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
StructuralMaterial(int n, Domain *d)
FloatArrayF< 3 > giveRealStressVector_2dPlateSubSoil(const FloatArrayF< 3 > &reducedE, GaussPoint *gp, TimeStep *tStep) const override
Default implementation is not provided.
FloatArrayF< 6 > giveRealStressVector_3dBeamSubSoil(const FloatArrayF< 6 > &reducedE, GaussPoint *gp, TimeStep *tStep) const override
bool globalFromulation
Flag indicating whether subsoil model defined in global or element local c.s.
FloatArray c1
C1 constant, defined as $\int_0^hE_{oed}(z)\left(d\Psi(z)\over dz\right)^2\ dz$.
FloatMatrixF< 6, 6 > give3dBeamSubSoilStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
WinklerMaterial(int n, Domain *d)
FloatMatrixF< 3, 3 > give2dPlateSubSoilStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
FloatMatrixF< N, N > diag(const FloatArrayF< N > &v)
double dot(const FloatArray &x, const FloatArray &y)
FloatMatrixF< M, M > unrotate(FloatMatrixF< N, N > &a, const FloatMatrixF< M, N > &r)
Computes .
@ Beam3dSubsoilMaterialInterfaceType
#define _IFT_WinklerMaterial_globalFlag
#define _IFT_WinklerMaterial_C1

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