mbsimflexiblebody 4.0.0 MBSim Flexible Body Module

linear_external_lumped_node.h
1 /* Copyright (C) 2004-2013 MBSim Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 *
17 * Contact: thorsten.schindler@mytum.de
18 * rzander@users.berlios.de
19 */
20
21 #ifndef _FINITE_ELEMENT_LINEAR_EXTERNAL_LUMPED_NODE_H_
22 #define _FINITE_ELEMENT_LINEAR_EXTERNAL_LUMPED_NODE_H_
23
24 #include <fmatvec/fmatvec.h>
25 #include "mbsim/mbsim_event.h"
26 #include "mbsimFlexibleBody/discretization_interface.h"
27
28 namespace MBSimFlexibleBody {
29
30 class FiniteElementLinearExternalLumpedNode : public DiscretizationInterface {
31
32 public:
36 FiniteElementLinearExternalLumpedNode(double& mij_, fmatvec::Vec3& u0_, fmatvec::Mat3xV phi_);
37
41 ~FiniteElementLinearExternalLumpedNode() override;
42
43 /* INTERFACE OF DISCRETIZATIONINTERFACE */
44 const fmatvec::SymMat& getM() const override;
45 const fmatvec::Vec& geth() const override;
46 const fmatvec::SqrMat& getdhdq() const override;
47 const fmatvec::SqrMat& getdhdu() const override;
48 int getqSize() const override;
49 int getuSize() const override;
50 void computeM(const fmatvec::Vec& qG) override;
51 void computeh(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
52 void computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
53 double computeKineticEnergy(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
54 double computeGravitationalEnergy(const fmatvec::Vec& qG) override;
55 double computeElasticEnergy(const fmatvec::Vec& qG) override;
56 virtual fmatvec::Vec3 getPosition(const fmatvec::Vec& qElement, double s);
57 virtual fmatvec::SqrMat3 getOrientation(const fmatvec::Vec& qElement, double s);
58 virtual fmatvec::Vec3 getVelocity (const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
59 virtual fmatvec::Vec3 getAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
60 virtual fmatvec::Mat getJacobianOfMotion(const fmatvec::Vec& qElement, double s);
61 /***************************************************/
62
63 const double getMij() const { return mij; }
64 const fmatvec::Vec3& getU0() const { return u0; }
65 const fmatvec::Mat3xV& getModeShape() const { return phi; }
66
67 private:
71 const double mij;
75 const fmatvec::Vec3 u0;
79 fmatvec::Mat3xV phi;
80 };
81
82 }
83
84 #endif
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::computeM
void computeM(const fmatvec::Vec &qG) override
compute mass matrix
Definition: linear_external_lumped_node.cc:64
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::computeElasticEnergy
double computeElasticEnergy(const fmatvec::Vec &qG) override
compute elastic energy
Definition: linear_external_lumped_node.cc:82
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::computedhdz
void computedhdz(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute Jacobian for implicit integration
Definition: linear_external_lumped_node.cc:70
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode
Definition: linear_external_lumped_node.h:30
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::computeGravitationalEnergy
double computeGravitationalEnergy(const fmatvec::Vec &qG) override
compute gravitational energy
Definition: linear_external_lumped_node.cc:78
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::getuSize
int getuSize() const override
Definition: linear_external_lumped_node.cc:60
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::getqSize
int getqSize() const override
Definition: linear_external_lumped_node.cc:58
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::mij
const double mij
lumped mass
Definition: linear_external_lumped_node.h:71
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::~FiniteElementLinearExternalLumpedNode
~FiniteElementLinearExternalLumpedNode() override
destructor
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::geth
const fmatvec::Vec & geth() const override
Definition: linear_external_lumped_node.cc:46
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::computeKineticEnergy
double computeKineticEnergy(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute kinetic energy
Definition: linear_external_lumped_node.cc:74
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::u0
const fmatvec::Vec3 u0
undeformed position vector
Definition: linear_external_lumped_node.h:75
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::getdhdu
const fmatvec::SqrMat & getdhdu() const override
Definition: linear_external_lumped_node.cc:54
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::computeh
void computeh(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute smooth right hand side
Definition: linear_external_lumped_node.cc:66
MBSimFlexibleBody::DiscretizationInterface
discretization interface for flexible systems
Definition: discretization_interface.h:36
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::phi
fmatvec::Mat3xV phi
mode shape vector: 3*nf
Definition: linear_external_lumped_node.h:79
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::getM
const fmatvec::SymMat & getM() const override
Definition: linear_external_lumped_node.cc:42
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::getdhdq
const fmatvec::SqrMat & getdhdq() const override
Definition: linear_external_lumped_node.cc:50
MBSimFlexibleBody::FiniteElementLinearExternalLumpedNode::FiniteElementLinearExternalLumpedNode
FiniteElementLinearExternalLumpedNode(double &mij_, fmatvec::Vec3 &u0_, fmatvec::Mat3xV phi_)
constructor
Definition: linear_external_lumped_node.cc:34