OOFEM 3.0
Loading...
Searching...
No Matches
beam3d.h
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#ifndef beam3d_h
36#define beam3d_h
37
41#include "dofmanager.h"
42#include "vtkxmlexportmodule.h"
43
45
46#define _IFT_Beam3d_Name "beam3d"
47#define _IFT_Beam3d_dofstocondense "dofstocondense"
48#define _IFT_Beam3d_refnode "refnode"
49#define _IFT_Beam3d_refangle "refangle"
50#define _IFT_Beam3d_yaxis "yaxis"
51#define _IFT_Beam3d_zaxis "zaxis"
52#define _IFT_Beam3d_subsoilmat "subsoilmat"
54
55#define Beam3d_nSubBeams 10
56
57namespace oofem {
58
59class FEI3dLineLin;
60class ParamKey;
61
77{
78protected:
81
85 double referenceAngle = 0;
86 //IntArray *dofsToCondense;
87 /*
88 * Ghost nodes are used to introduce additional DOFs at element.
89 * These are needed as we actually do not want to condense selected DOFs, but rather
90 * allocate an extra equation to these. This allows to get cooresponding DOFs directly from
91 * the global system, avoiding the need to postprocess local displacements at element.
92 */
96
99
106
107public:
108 Beam3d(int n, Domain *d);
109 virtual ~Beam3d();
110
111 FEInterpolation *giveInterpolation() const override;
112
113 void computeConsistentMassMatrix(FloatMatrix &answer, TimeStep *tStep, double &mass, const double *ipDensity = NULL) override;
114 void computeInitialStressMatrix(FloatMatrix &answer, TimeStep *tStep) override;
115 void computeLumpedInitialStressMatrix(FloatMatrix &answer, TimeStep *tStep) override;
116 void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep) override;
117 int giveLocalCoordinateSystem(FloatMatrix &answer) override;
118 void giveInternalForcesVector(FloatArray &answer, TimeStep *, int useUpdatedGpRecord = 0) override;
119 void giveEndForcesVector(FloatArray &answer, TimeStep *tStep);
120
121 int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords) override;
122
123
125 return ( ( ext == Element_EdgeLoadSupport ) ? 1 : 0 );
126 }
127 //int hasLayeredSupport () {return 1;}
128
129 int computeNumberOfDofs() override { return 12; }
130 int computeNumberOfGlobalDofs() override { return 12 + this->numberOfCondensedDofs; }
131 void giveDofManDofIDMask(int inode, IntArray &) const override;
132 int giveNumberOfInternalDofManagers() const override { return ( ghostNodes [ 0 ] != nullptr ) + ( ghostNodes [ 1 ] != nullptr ); }
133 DofManager *giveInternalDofManager(int i) const override {
134 if ( i == 1 ) {
135 if ( ghostNodes [ 0 ] ) { return ghostNodes [ 0 ]; } else { return ghostNodes [ 1 ]; }
136 } else if ( i == 2 ) { // i==2
137 return ghostNodes [ 1 ];
138 } else {
139 OOFEM_ERROR("No such DOF available on Element %d", number);
140 }
141 }
142 void giveInternalDofManDofIDMask(int i, IntArray &answer) const override {
143 if ( i == 1 ) {
144 if ( ghostNodes [ 0 ] ) {
145 ghostNodes [ 0 ]->giveCompleteMasterDofIDArray(answer);
146 } else {
147 ghostNodes [ 1 ]->giveCompleteMasterDofIDArray(answer);
148 }
149 } else if ( i == 2 ) { // i==2
150 ghostNodes [ 1 ]->giveCompleteMasterDofIDArray(answer);
151 } else {
152 OOFEM_ERROR("No such DOF available on Element %d", number);
153 }
154 }
155 void giveBoundaryLocationArray(IntArray &locationArray, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIds = NULL) override {
156 giveLocationArray (locationArray, s, dofIds);
157 }
158
159 void giveBoundaryLocationArray(IntArray &locationArray, const IntArray &bNodes, const IntArray &dofIDMask, const UnknownNumberingScheme &s, IntArray *dofIds = NULL) override {
160 giveLocationArray (locationArray, dofIDMask, s, dofIds);
161 }
162
163 double computeVolumeAround(GaussPoint *gp) override;
164
165 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override;
166
167 void printOutputAt(FILE *file, TimeStep *tStep) override;
168
169 //
170 // fibered cross section support functions
171 //
173 GaussPoint *slaveGp, TimeStep *tStep) override;
174
176
177 // definition & identification
178 const char *giveClassName() const override { return "Beam3d"; }
179 const char *giveInputRecordName() const override { return _IFT_Beam3d_Name; }
180 void initializeFrom(InputRecord &ir, int priority) override;
181 void postInitialize() override;
183 integrationDomain giveIntegrationDomain() const override { return _Line; }
184 //Element_Geometry_Type giveGeometryType() const override { return EGT_line_1; }
185 Element_Geometry_Type giveGeometryType() const override { return EGT_Composite; }
187
188 /*
190
191 virtual void B3SSI_getNMatrix (FloatMatrix &answer, GaussPoint *gp) {
192 this->computeNmatrixAt(gp->giveNaturalCoordinates(), answer);
193 }
194 virtual void B3SSI_getGtoLRotationMatrix (FloatMatrix &answer) {
195 this->computeGtoLRotationMatrix(answer);
196 }
197 virtual double B3SSI_computeVolumeAround (GaussPoint* gp) {
198 return this->computeVolumeAround(gp);
199 }
200 */
202
203 void giveCompositeExportData(std::vector< ExportRegion > &vtkPieces, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep ) override;
204
205#ifdef __OOFEG
206 void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override;
208#endif
209
210protected:
211 void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int edge, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true) override;
212 int computeLoadGToLRotationMtrx(FloatMatrix &answer) override;
213 void computeBmatrixAt(GaussPoint *, FloatMatrix &, int = 1, int = ALL_STRAINS) override;
214 void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &) override;
215 bool computeGtoLRotationMatrix(FloatMatrix &answer) override;
216 void computeBodyLoadVectorAt(FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode) override;
217
218 double giveKappayCoeff(TimeStep *tStep);
219 double giveKappazCoeff(TimeStep *tStep);
220 void computeKappaCoeffs(TimeStep *tStep);
221 double computeLength() override;
222 void computeGaussPoints() override;
223 void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override;
224 void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override;
225
226 MaterialMode giveMaterialMode() override { return _3dBeam; }
227 int giveNumberOfIPForMassMtrxIntegration() override { return 4; }
228
229 bool hasDofs2Condense() { return ( ghostNodes [ 0 ] || ghostNodes [ 1 ] ); }
230
231
233 void computeSubSoilStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep);
234
235 void giveInternalForcesVectorAtPoint(FloatArray &answer, TimeStep *tStep, FloatArray &coords);
236 void computeInternalForcesFromBoundaryEdgeLoadVectorAtPoint(FloatArray &answer, BoundaryLoad *load, int edge, CharType type, ValueModeType mode,
237 TimeStep *tStep, FloatArray &pointCoords, double ds, bool global);
238 void computeInternalForcesFromBodyLoadVectorAtPoint(FloatArray &answer, Load *forLoad, TimeStep *tStep, ValueModeType mode, FloatArray &pointCoords, double ds);
239 virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords, const FloatArray &point);
240
241};
242} // end namespace oofem
243#endif // beam3d_h
#define _IFT_Beam3d_Name
Definition beam3d.h:46
void FiberedCrossSectionInterface_computeStrainVectorInFiber(FloatArray &answer, const FloatArray &masterGpStrain, GaussPoint *slaveGp, TimeStep *tStep) override
Definition beam3d.C:936
void giveDofManDofIDMask(int inode, IntArray &) const override
Definition beam3d.C:412
int computeLoadGToLRotationMtrx(FloatMatrix &answer) override
Definition beam3d.C:272
void computeInternalForcesFromBodyLoadVectorAtPoint(FloatArray &answer, Load *forLoad, TimeStep *tStep, ValueModeType mode, FloatArray &pointCoords, double ds)
Definition beam3d.C:1228
void giveEndForcesVector(FloatArray &answer, TimeStep *tStep)
Definition beam3d.C:668
void giveInternalForcesVector(FloatArray &answer, TimeStep *, int useUpdatedGpRecord=0) override
Definition beam3d.C:628
integrationDomain giveIntegrationDomain() const override
Definition beam3d.h:183
double kappaz
Definition beam3d.h:82
void postInitialize() override
Performs post initialization steps. Called after all components are created and initialized.
Definition beam3d.C:578
static FEI3dLineLin interp
Geometry interpolator only.
Definition beam3d.h:80
void computeInitialStressMatrix(FloatMatrix &answer, TimeStep *tStep) override
Definition beam3d.C:830
double computeLength() override
Definition beam3d.C:421
void computeConsistentMassMatrix(FloatMatrix &answer, TimeStep *tStep, double &mass, const double *ipDensity=NULL) override
Definition beam3d.C:734
DofManager * ghostNodes[2]
Definition beam3d.h:93
FloatArray zaxis
Definition beam3d.h:84
void computeSubSoilStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Definition beam3d.C:1040
MaterialMode giveMaterialMode() override
Definition beam3d.h:226
static ParamKey IPK_Beam3d_refangle
[optional] Reference angle for the beam
Definition beam3d.h:102
void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &) override
Definition beam3d.C:156
Element_Geometry_Type giveGeometryType() const override
Definition beam3d.h:185
void computeSubSoilNMatrixAt(GaussPoint *gp, FloatMatrix &answer)
Definition beam3d.C:1032
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
Definition beam3d.C:370
void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override
Definition beam3d.C:978
void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep) override
Definition beam3d.C:204
virtual ~Beam3d()
Definition beam3d.C:89
void computeKappaCoeffs(TimeStep *tStep)
Definition beam3d.C:440
static ParamKey IPK_Beam3d_zaxis
[optional] Z axis for the beam
Definition beam3d.h:104
void computeLumpedInitialStressMatrix(FloatMatrix &answer, TimeStep *tStep) override
Definition beam3d.C:902
void computeGaussPoints() override
Definition beam3d.C:143
Beam3d(int n, Domain *d)
Definition beam3d.C:74
double giveKappayCoeff(TimeStep *tStep)
Definition beam3d.C:465
void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType) override
Definition beam3d.C:1004
Interface * giveInterface(InterfaceType it) override
Definition beam3d.C:953
void initializeFrom(InputRecord &ir, int priority) override
Definition beam3d.C:564
double giveKappazCoeff(TimeStep *tStep)
Definition beam3d.C:476
FloatMatrixF< 6, 6 > B3SSMI_getUnknownsGtoLRotationMatrix() const override
Evaluate transformation matrix for reciver unknowns.
Definition beam3d.C:345
DofManager * giveInternalDofManager(int i) const override
Definition beam3d.h:133
int testElementExtension(ElementExtension ext) override
Definition beam3d.h:124
int numberOfCondensedDofs
number of condensed DOFs
Definition beam3d.h:95
bool computeGtoLRotationMatrix(FloatMatrix &answer) override
Definition beam3d.C:291
void giveBoundaryLocationArray(IntArray &locationArray, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) override
Definition beam3d.h:155
void giveInternalForcesVectorAtPoint(FloatArray &answer, TimeStep *tStep, FloatArray &coords)
Definition beam3d.C:1074
const char * giveInputRecordName() const override
Definition beam3d.h:179
int computeNumberOfGlobalDofs() override
Definition beam3d.h:130
double computeVolumeAround(GaussPoint *gp) override
Definition beam3d.C:363
void giveInternalDofManDofIDMask(int i, IntArray &answer) const override
Definition beam3d.h:142
double kappay
Definition beam3d.h:82
static ParamKey IPK_Beam3d_dofsToCondense
[optional] DOFs to condense
Definition beam3d.h:100
int giveNumberOfInternalDofManagers() const override
Definition beam3d.h:132
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
Definition beam3d.C:661
FloatArray yaxis
Definition beam3d.h:84
void printOutputAt(FILE *file, TimeStep *tStep) override
Definition beam3d.C:695
void giveCompositeExportData(std::vector< ExportRegion > &vtkPieces, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep) override
Definition beam3d.C:1274
void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int edge, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true) override
Definition beam3d.C:227
bool hasDofs2Condense()
Definition beam3d.h:229
static ParamKey IPK_Beam3d_yaxis
[optional] Y axis for the beam
Definition beam3d.h:103
static ParamKey IPK_Beam3d_refnode
[optional] Reference node for the beam
Definition beam3d.h:101
void giveBoundaryLocationArray(IntArray &locationArray, const IntArray &bNodes, const IntArray &dofIDMask, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) override
Definition beam3d.h:159
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
Definition beam3d.C:654
void computeBodyLoadVectorAt(FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode) override
Definition beam3d.C:725
const char * giveClassName() const override
Definition beam3d.h:178
int computeNumberOfDofs() override
Definition beam3d.h:129
void computeInternalForcesFromBoundaryEdgeLoadVectorAtPoint(FloatArray &answer, BoundaryLoad *load, int edge, CharType type, ValueModeType mode, TimeStep *tStep, FloatArray &pointCoords, double ds, bool global)
Definition beam3d.C:1180
int subsoilMat
Subsoil material.
Definition beam3d.h:98
static ParamKey IPK_Beam3d_subsoilmat
[optional] Subsoil material for the beam
Definition beam3d.h:105
int referenceNode
Definition beam3d.h:83
double referenceAngle
Definition beam3d.h:85
int giveNumberOfIPForMassMtrxIntegration() override
Definition beam3d.h:227
int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords) override
Definition beam3d.C:812
int giveLocalCoordinateSystem(FloatMatrix &answer) override
Definition beam3d.C:487
double length
Definition beam3d.h:82
void computeBmatrixAt(GaussPoint *, FloatMatrix &, int=1, int=ALL_STRAINS) override
Definition beam3d.C:98
FEInterpolation * giveInterpolation() const override
Definition beam3d.C:95
void updateLocalNumbering(EntityRenumberingFunctor &f) override
Definition beam3d.C:968
BeamBaseElement(int n, Domain *d)
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
Definition element.C:429
int number
Component number.
Definition femcmpnn.h:77
#define OOFEM_ERROR(...)
Definition error.h:79
@ Element_EdgeLoadSupport
Element extension for edge loads.
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define ALL_STRAINS

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