OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
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 - 2014 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"
36 #include "../sm/Materials/structuralms.h"
37 #include "floatmatrix.h"
38 #include "gausspoint.h"
39 #include "classfactory.h"
40 #include "dynamicinputrecord.h"
41 
42 namespace oofem {
43 REGISTER_Material(WinklerMaterial);
44 
46 { }
47 
49 { }
50 
53 {
54  IRResultType result; // Required by IR_GIVE_FIELD macro
55 
57  globalFromulation = true;
58  int var=1;
61 
63 }
64 
65 
66 void
68 {
70 
71  input.setField(this->c1, _IFT_WinklerMaterial_C1);
72 }
73 
74 
75 void
77 {
78  FloatMatrix tangent;
79  this->give2dPlateSubSoilStiffMtrx(tangent, ElasticStiffness, gp, tStep);
80  answer.beProductOf(tangent, reducedE);
81 
82  StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
83  status->letTempStrainVectorBe(reducedE);
84  status->letTempStressVectorBe(answer);
85 }
86 
87 void
89 {
90  FloatMatrix tangent;
91  this->give3dBeamSubSoilStiffMtrx(tangent, ElasticStiffness, gp, tStep);
92  answer.beProductOf(tangent, reducedE);
93 
94  StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >( this->giveStatus(gp) );
95  status->letTempStrainVectorBe(reducedE);
96  status->letTempStressVectorBe(answer);
97 }
98 
99 
100 void
102 {
103  answer.resize(3, 3);
104  answer.zero();
105 
106  answer.at(1, 1) = c1.at(1);
107  //answer.at(2, 2) = c2;
108  //answer.at(3, 3) = c2;
109 }
110 
111 
112 void
114 {
115 
116  if (this->c1.giveSize() == 6) {
117  answer.beDiagonal(this->c1);
118 
119  if (globalFromulation) {
121  FloatMatrix T;
122  if (ei) {
124  answer.rotatedWith(T, 't');
125  } else {
126  OOFEM_ERROR("Beam3dSubsoilMaterialInterface required from element");
127  }
128  }
129 
130  } else {
131  OOFEM_ERROR ("C1 attribute size error (shouldequal to 6 for 3dBeamSubsoil mode)");
132  }
133 }
134 
135 
138 {
139  return new StructuralMaterialStatus(1, this->giveDomain(), gp);
140 }
141 
142 
143 int
145 //
146 // returns whether receiver supports given mode
147 //
148 {
149  return ((mode == _2dPlateSubSoil) || (mode == _3dBeamSubSoil));
150 }
151 
152 
153 
154 
155 } // end namespace oofem
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: winklermodel.C:52
void setField(int item, InputFieldType id)
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
Definition: structuralms.h:137
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: material.C:244
Class and object Domain.
Definition: domain.h:115
WinklerMaterial(int n, Domain *d)
Constructor.
Definition: winklermodel.C:45
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
Definition: winklermodel.C:137
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
This class implements a structural material status information.
Definition: structuralms.h:65
#define _IFT_WinklerMaterial_globalFlag
Definition: winklermodel.h:50
virtual void give3dBeamSubSoilStiffMtrx(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Method for computing stiffness matrix of beam3d subsoil model.
Definition: winklermodel.C:113
#define _IFT_WinklerMaterial_C1
Definition: winklermodel.h:49
virtual void B3SSMI_getUnknownsGtoLRotationMatrix(FloatMatrix &answer)=0
Evaluate transformation matrix for reciver unknowns.
void beDiagonal(const FloatArray &diag)
Modifies receiver to be a diagonal matrix with the components specified in diag.
Definition: floatmatrix.C:1433
Element * giveElement()
Returns corresponding element to receiver.
Definition: gausspoint.h:188
virtual void give2dPlateSubSoilStiffMtrx(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Method for computing stiffness matrix of plate subsoil model.
Definition: winklermodel.C:101
virtual void giveRealStressVector_2dPlateSubSoil(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation is not provided.
Definition: winklermodel.C:76
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
MatResponseMode
Describes the character of characteristic material matrix.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
bool globalFromulation
Flag indicating whether subsoil model defined in global or element local c.s.
Definition: winklermodel.h:70
#define OOFEM_ERROR(...)
Definition: error.h:61
virtual ~WinklerMaterial()
Destructor.
Definition: winklermodel.C:48
virtual int hasMaterialModeCapability(MaterialMode mode)
Tests if material supports material mode.
Definition: winklermodel.C:144
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver &#39;a&#39; transformed using give transformation matrix r.
Definition: floatmatrix.C:1557
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
Abstract base class representing a material status information.
Definition: matstatus.h:84
virtual void giveRealStressVector_3dBeamSubSoil(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Definition: winklermodel.C:88
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: winklermodel.C:67
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
Definition: structuralms.h:135
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
Class representing the general Input Record.
Definition: inputrecord.h:101
FloatArray c1
C1 constant, defined as $^hE_{oed}(z)(d(z) dz)^2\ dz$.
Definition: winklermodel.h:68
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
Definition: femcmpnn.h:179
Class representing the a dynamic Input Record.
Abstract base class for all "structural" constitutive models.
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
Domain * giveDomain() const
Definition: femcmpnn.h:100
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
REGISTER_Material(DummyMaterial)
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
Interface defining required functionality from associated element.
Definition: winklermodel.h:103
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011