All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
isotropic_rotational_spring_damper.h
1 /* Copyright (C) 2004-2012 MBSim Development Team
2  * This library is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU Lesser General Public
4  * License as published by the Free Software Foundation; either
5  * version 2.1 of the License, or (at your option) any later version.
6  *
7  * This library is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10  * Lesser General Public License for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public
13  * License along with this library; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15  *
16  * Contact: ghorst@amm.mw.tum.de
17  */
18 
19 #ifndef _ISOTROPICROTATIONALSPRINGDAMPER_H_
20 #define _ISOTROPICROTATIONALSPRINGDAMPER_H_
21 
22 #include "mbsim/link_mechanics.h"
23 #include "mbsim/frame.h"
24 
25 namespace MBSim {
26 
38  public:
43  IsotropicRotationalSpringDamper(const std::string &name);
44 
49 
50  /* INHERITED INTERFACE OF LINKINTERFACE */
51  virtual void updateh(double t, int i = 0);
52  virtual void updateg(double t);
53  virtual void updategd(double t);
54  /***************************************************/
55 
56  /* INHERITED INTERFACE OF EXTRADYNAMICINTERFACE */
57  virtual void init(InitStage stage);
58  /***************************************************/
59 
60  /* INHERITED INTERFACE OF LINK */
61  virtual bool isActive() const {
62  return true;
63  }
64  virtual bool gActiveChanged() {
65  return false;
66  }
67  virtual bool isSingleValued() const {
68  return true;
69  }
70  /***************************************************/
71 
72  void connect(Frame *frame1, Frame* frame2);
73 
74  /* SETTER */
75  void setParameters(double c_, double d_, double alpha0_) {
76  c = c_;
77  d = d_;
78  alpha0 = alpha0_;
79  }
80  void setMomentDirection(const fmatvec::Mat& md);
81 
82  private:
86  double c, d, alpha0;
87 
92  fmatvec::Index IR;
93 
98 
99  };
100 
101 }
102 
103 #endif /* _ISOTROPICROTATIONALSPRINGDAMPER_H_ */
104 
double c
stiffness, damping, relaxed angle
Definition: isotropic_rotational_spring_damper.h:86
fmatvec::Mat momentDir
Definition: isotropic_rotational_spring_damper.h:91
Isotropic rotational spring damper force law. This class connects two frames and applies a torque whi...
Definition: isotropic_rotational_spring_damper.h:37
fmatvec::Mat Wm
global moment direction
Definition: isotropic_rotational_spring_damper.h:97
virtual bool isActive() const
Definition: isotropic_rotational_spring_damper.h:61
virtual void init(InitStage stage)
plots time series header
Definition: isotropic_rotational_spring_damper.cc:89
virtual bool isSingleValued() const
asks the link if it contains single valued force laws that contribute to the right-hand side vector h...
Definition: isotropic_rotational_spring_damper.h:67
InitStage
The stages of the initialization.
Definition: element.h:97
std::string name
name of element
Definition: element.h:290
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
general link to one or more objects
Definition: link_mechanics.h:48
virtual ~IsotropicRotationalSpringDamper()
destructor
Definition: isotropic_rotational_spring_damper.cc:35
IsotropicRotationalSpringDamper(const std::string &name)
constructor
Definition: isotropic_rotational_spring_damper.cc:31
virtual bool gActiveChanged()
Definition: isotropic_rotational_spring_damper.h:64

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML