35 #include "../sm/Elements/Beams/beam2d.h" 36 #include "../sm/Materials/structuralms.h" 104 double l, ksi,
kappa, c1;
110 c1 = 1. + 2. *
kappa;
115 answer.
at(1, 1) = -1. / l;
116 answer.
at(1, 4) = 1. / l;
117 answer.
at(2, 2) = ( 6. - 12. * ksi ) / ( l * l * c1 );
118 answer.
at(2, 3) = ( -2. * ( 2. +
kappa ) + 6. * ksi ) / ( l * c1 );
119 answer.
at(2, 5) = ( -6. + 12. * ksi ) / ( l * l * c1 );
120 answer.
at(2, 6) = ( -2. * ( 1. -
kappa ) + 6. * ksi ) / ( l * c1 );
121 answer.
at(3, 2) = ( -2. *
kappa ) / ( l * c1 );
122 answer.
at(3, 3) = kappa / ( c1 );
123 answer.
at(3, 5) = 2. * kappa / ( l * c1 );
124 answer.
at(3, 6) = kappa / ( c1 );
149 double l, ksi, ksi2, ksi3,
kappa, c1;
153 ksi = 0.5 + 0.5 * iLocCoord.
at(1);
155 c1 = 1. + 2. *
kappa;
162 answer.
at(1, 1) = 1. - ksi;
163 answer.
at(1, 4) = ksi;
164 answer.
at(2, 2) = ( c1 - 2. * kappa * ksi - 3. * ksi2 + 2. * ksi3 ) / c1;
165 answer.
at(2, 3) = l * ( -( 1. +
kappa ) * ksi + ( 2. + kappa ) * ksi2 - ksi3 ) / c1;
166 answer.
at(2, 5) = ( 2. * kappa * ksi + 3. * ksi2 - 2. * ksi3 ) / c1;
167 answer.
at(2, 6) = l * ( kappa * ksi + ( 1. -
kappa ) * ksi2 - ksi3 ) / c1;
168 answer.
at(3, 2) = ( 6. * ksi - 6. * ksi2 ) / ( l * c1 );
169 answer.
at(3, 3) = ( c1 - 2. * ( 2. +
kappa ) * ksi + 3. * ksi2 ) / c1;
170 answer.
at(3, 5) = ( -6. * ksi + 6. * ksi2 ) / ( l * c1 );
171 answer.
at(3, 6) = ( -2. * ( 1. -
kappa ) * ksi + 3. * ksi2 ) / c1;
184 double dV = gp->giveWeight() * 0.5 * l;
212 answer.
resize(ndofs, ndofs);
217 answer.
at(1, 1) = cosine;
218 answer.
at(1, 2) = sine;
219 answer.
at(2, 1) = -sine;
220 answer.
at(2, 2) = cosine;
221 answer.
at(3, 3) = 1.;
222 answer.
at(4, 4) = cosine;
223 answer.
at(4, 5) = sine;
224 answer.
at(5, 4) = -sine;
225 answer.
at(5, 5) = cosine;
226 answer.
at(6, 6) = 1.;
228 for (
int i = 7; i <= ndofs; i++ ) {
229 answer.
at(i, i) = 1.0;
233 int condensedDofCounter = 0;
240 for (
int inode = 0; inode < 2; inode++ ) {
242 for (
int idof = 0; idof < 3; idof++ ) {
243 int eq = inode * 3 + idof + 1;
245 if (
ghostNodes [ inode ]->hasDofID(dofids [ idof ]) ) {
246 condensedDofCounter++;
247 l2p.
at(eq, 6 + condensedDofCounter) = 1.0;
251 l2p.
at(eq, eq) = 1.0;
277 double layerZeta, layerZCoord, top, bottom;
282 layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
286 answer.
at(1) = masterGpStrain.
at(1) + masterGpStrain.
at(2) * layerZCoord;
287 answer.
at(2) = masterGpStrain.
at(3);
311 length = sqrt(dx * dx + dy * dy);
321 double xA, xB, yA, yB;
324 if (
pitch == 10. ) {
331 pitch = atan2(yB - yA, xB - xA);
348 kappa = 6. * d.
at(2, 2) / ( d.
at(3, 3) * l * l );
370 answer.
at(1, 1) = cosine;
371 answer.
at(1, 2) = sine;
372 answer.
at(2, 1) = -sine;
373 answer.
at(2, 2) = cosine;
374 answer.
at(3, 3) = 1.0;
399 for (
int i = 1; i <= val.
giveSize(); i++ ) {
400 if ( val.
at(i) <= 3 ) {
449 OOFEM_ERROR(
"Beam2D only has 1 edge (the midline) that supports loads. Attempted to apply load to edge %d", edge);
452 if ( type != ExternalForcesVector ) {
462 const FloatArray &lcoords = gp->giveNaturalCoordinates();
466 load->
computeValues(t, tStep, coords, { D_u, D_w, R_v }, mode);
468 load->
computeValues(t, tStep, lcoords, { D_u, D_w, R_v }, mode);
477 double dl = gp->giveWeight() * 0.5 * l;
501 if ( type == IST_BeamForceMomentTensor ) {
504 }
else if ( type == IST_BeamStrainCurvatureTensor ) {
507 }
else if ( type == IST_ShellForceTensor || type == IST_ShellStrainTensor ) {
510 const FloatArray &help = type == IST_ShellForceTensor ?
515 answer.
at(1) = help.
at(1);
519 answer.
at(5) = help.
at(2);
522 }
else if ( type == IST_ShellMomentTensor || type == IST_CurvatureTensor ) {
523 const FloatArray &help = type == IST_ShellMomentTensor ?
532 answer.
at(6) = help.
at(3);
553 fprintf(File,
" local displacements ");
554 for (
auto &val : rl ) {
555 fprintf(File,
" %.4e", val);
558 fprintf(File,
"\n local end forces ");
559 for (
auto &val : Fl ) {
560 fprintf(File,
" %.4e", val);
566 iRule->printOutputAt(File, tStep);
585 double kappa2 = kappa *
kappa;
588 if ( ipDensity != NULL ) {
590 density = * ipDensity;
594 double c2 = ( area * density ) / ( ( 1. + 2. * kappa ) * ( 1. + 2. *
kappa ) );
595 double c1 = ( area * density );
600 answer.
at(1, 1) = c1 * l / 3.0;
601 answer.
at(1, 4) = c1 * l / 6.0;
602 answer.
at(2, 2) = c2 * l * ( 13. / 35. + 7. * kappa / 5. + 4. * kappa2 / 3. );
603 answer.
at(2, 3) = -c2 * l * l * ( 11. / 210. + kappa * 11. / 60. + kappa2 / 6. );
604 answer.
at(2, 5) = c2 * l * ( 9. / 70. + kappa * 3. / 5. + kappa2 * 2. / 3. );
605 answer.
at(2, 6) = c2 * l * l * ( 13. / 420. + kappa * 3. / 20. + kappa2 / 6. );
606 answer.
at(3, 3) = c2 * l * l * l * ( 1. / 105. + kappa / 30. + kappa2 / 30. );
607 answer.
at(3, 5) = -c2 * l * l * ( 13. / 420. + kappa * 3. / 20. + kappa2 / 6. );
608 answer.
at(3, 6) = -c2 * l * l * l * ( 1. / 140. + kappa / 30. + kappa2 / 30. );
610 answer.
at(4, 4) = c1 * l / 3.0;
611 answer.
at(5, 5) = c2 * l * ( 13. / 35. + kappa * 7. / 5. + kappa2 * 4. / 3. );
612 answer.
at(5, 6) = c2 * l * l * ( 11. / 210. + kappa * 11. / 60. + kappa2 / 6. );
613 answer.
at(6, 6) = c2 * l * l * l * ( 1. / 105. + kappa / 30. + kappa2 / 30. );
617 mass = l * area * density;
631 double kappa2 = kappa *
kappa;
637 answer.
at(2, 2) = 4. * kappa2 + 4. * kappa + 6. / 5.;
638 answer.
at(2, 3) = -l / 10.;
639 answer.
at(2, 5) = -4. * kappa2 - 4. * kappa - 6. / 5.;
640 answer.
at(2, 6) = -l / 10.;
641 answer.
at(3, 3) = l * l * ( kappa2 / 3. + kappa / 3. + 2. / 15. );
642 answer.
at(3, 5) = l / 10.;
643 answer.
at(3, 6) = -l * l * ( kappa2 / 3. + kappa / 3. + 1. / 30. );
645 answer.
at(5, 5) = 4. * kappa2 + 4. * kappa + 6. / 5.;
646 answer.
at(5, 6) = l / 10.;
647 answer.
at(6, 6) = l * l * ( kappa2 / 3. + kappa / 3. + 2. / 15. );
649 answer.
at(1, 1) =
min( fabs( answer.
at(2, 2) ), fabs( answer.
at(3, 3) ) ) / 1000.;
650 answer.
at(1, 4) = -answer.
at(1, 1);
651 answer.
at(4, 4) = answer.
at(1, 1);
657 N = ( -endForces.
at(1) + endForces.
at(4) ) / 2.;
658 answer.
times( N / ( l * ( 1. + 2. * kappa ) * ( 1. + 2. * kappa ) ) );
684 go = CreateLine3D(p);
685 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
686 EGAttachObject(go, ( EObjectP )
this);
687 EMAddGraphicsToModel(ESIModel(), go);
712 go = CreateLine3D(p);
713 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
714 EMAddGraphicsToModel(ESIModel(), go);
CrossSection * giveCrossSection()
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &)
Computes interpolation matrix for element unknowns.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
virtual void giveGeneralizedStress_Beam2d(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)=0
Computes the generalized stress vector for given strain and integration point.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Access method for default integration rule.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Class implementing internal element dof manager having some DOFs.
virtual bool computeGtoLRotationMatrix(FloatMatrix &answer)
Returns transformation matrix from global c.s.
virtual void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int edge, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true)
Computes the contribution of the given load at the given boundary edge.
Load is specified in global c.s.
virtual void computeStrainVectorInLayer(FloatArray &answer, const FloatArray &masterGpStrain, GaussPoint *masterGp, GaussPoint *slaveGp, TimeStep *tStep)
Computes full 3D strain vector in element layer.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the stress vector of receiver at given integration point, at time step tStep.
#define OOFEG_RAW_GEOMETRY_LAYER
This class implements a structural material status information.
void clear()
Clears receiver (zero size).
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
virtual int computeNumberOfGlobalDofs()
Computes the total number of element's global dofs.
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
virtual CoordSystType giveCoordSystMode()
Returns receiver's coordinate system.
virtual double computeLength()
Computes the length (zero for all but 1D geometries)
int numberOfCondensedDofs
number of condensed DOFs
virtual double giveCoordinate(int i)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void computeLocalForceLoadVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Computes element end force vector from applied loading in local coordinate system.
#define OOFEG_DEFORMED_GEOMETRY_LAYER
Beam2d(int n, Domain *aDomain)
void rotatedWith(FloatMatrix &r, char mode)
Returns the receiver a rotated according the change-of-base matrix r.
virtual FEInterpolation * giveInterpolation() const
EPixel getDeformedElementColor()
Class representing a general abstraction for finite element interpolation class.
Class representing "master" degree of freedom.
virtual void computeValues(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, const IntArray &dofids, ValueModeType mode)
Computes components values for specified dof ids.
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
virtual void computeBodyLoadVectorAt(FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode)
Computes the load vector due to body load acting on receiver, at given time step. ...
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes numerically stiffness matrix of receiver.
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of receiver.
DofManager * ghostNodes[2]
Ghost nodes are used to introduce additional DOFs at element.
DofIDItem
Type representing particular dof type.
virtual int computeLoadGToLRotationMtrx(FloatMatrix &answer)
Returns transformation matrix from global coordinate system to local element coordinate system for el...
#define OOFEG_RAW_GEOMETRY_WIDTH
virtual double giveWeight()
Returns integration weight of receiver.
UnknownType
Type representing particular unknown (its physical meaning).
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
void times(double f)
Multiplies receiver by factor f.
virtual double giveUpdatedCoordinate(int ic, TimeStep *tStep, double scale=1.)
Returns updated ic-th coordinate of receiver.
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
double at(int i, int j) const
Coefficient access function.
void appendDof(Dof *dof)
Adds the given Dof into the receiver.
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
int numberOfGaussPoints
Number of integration points as specified by nip.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to stream, for given time step.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
virtual void giveEndForcesVector(FloatArray &answer, TimeStep *tStep)
IRResultType
Type defining the return values of InputRecord reading operations.
virtual void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord=0)
Returns equivalent nodal forces vectors.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord=0)
Returns equivalent nodal forces vectors.
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
void times(double s)
Multiplies receiver with scalar.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
static FEI2dLineLin interp_geom
void zero()
Zeroes all coefficient of receiver.
Domain * giveDomain() const
virtual void computeConsistentMassMatrix(FloatMatrix &answer, TimeStep *tStep, double &mass, const double *ipDensity=NULL)
Computes consistent mass matrix of receiver using numerical integration over element volume...
InterfaceType
Enumerative type, used to identify interface type.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void computeInitialStressMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes initial stress matrix for linear stability problem.
int min(int i, int j)
Returns smaller value from two given decimals.
Load is base abstract class for all loads.
The element interface required by LayeredCrossSection.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
the oofem namespace is to define a context or scope in which all oofem names are defined.
bool isNotEmpty() const
Returns true if receiver is not empty.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
Class implementing node in finite element mesh.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
static FEI2dLineHermite interp_beam
virtual void computeBmatrixAt(GaussPoint *, FloatMatrix &, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
#define _IFT_Beam2d_dofstocondense
virtual int giveLocalCoordinateSystem(FloatMatrix &answer)
Returns local coordinate system of receiver Required by material models with ortho- and anisotrophy...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void give2dBeamStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
Computes the stiffness matrix for 2d beams.
Class representing integration point in finite element program.
#define OOFEM_WARNING(...)
Class representing solution step.
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
int numberOfDofMans
Number of dofmanagers.
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
This class implements a base beam intented to be a base class for beams based on lagrangian interpola...
virtual void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType)
void computeBodyLoadVectorAt(FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode)
Computes the load vector due to body load acting on receiver, at given time step. ...
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
double giveKappaCoeff(TimeStep *tStep)
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
Adds the product .