Simbody  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Force_LinearBushing.h
Go to the documentation of this file.
1 #ifndef SimTK_SIMBODY_FORCE_LINEAR_BUSHING_H_
2 #define SimTK_SIMBODY_FORCE_LINEAR_BUSHING_H_
3 
4 /* -------------------------------------------------------------------------- *
5  * Simbody(tm) *
6  * -------------------------------------------------------------------------- *
7  * This is part of the SimTK biosimulation toolkit originating from *
8  * Simbios, the NIH National Center for Physics-Based Simulation of *
9  * Biological Structures at Stanford, funded under the NIH Roadmap for *
10  * Medical Research, grant U54 GM072970. See https://simtk.org/home/simbody. *
11  * *
12  * Portions copyright (c) 2009-12 Stanford University and the Authors. *
13  * Authors: Michael Sherman *
14  * Contributors: *
15  * *
16  * Licensed under the Apache License, Version 2.0 (the "License"); you may *
17  * not use this file except in compliance with the License. You may obtain a *
18  * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
19  * *
20  * Unless required by applicable law or agreed to in writing, software *
21  * distributed under the License is distributed on an "AS IS" BASIS, *
22  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
23  * See the License for the specific language governing permissions and *
24  * limitations under the License. *
25  * -------------------------------------------------------------------------- */
26 
27 #include "SimTKcommon.h"
28 #include "simbody/internal/Force.h"
29 
36 namespace SimTK {
102 public:
125  const MobilizedBody& body1, const Transform& frameFOnB1,
126  const MobilizedBody& body2, const Transform& frameMOnB2,
127  const Vec6& stiffness, const Vec6& damping);
128 
147  const MobilizedBody& body1,
148  const MobilizedBody& body2,
149  const Vec6& stiffness, const Vec6& damping);
150 
153 
154 
155  //--------------------------------------------------------------------------
169 
170  LinearBushing& setDefaultFrameOnBody1(const Transform& X_B1F);
189  LinearBushing& setDefaultFrameOnBody2(const Transform& X_B2M);
198  LinearBushing& setDefaultStiffness(const Vec6& stiffness);
207  LinearBushing& setDefaultDamping(const Vec6& damping);
208 
215  const Transform& getDefaultFrameOnBody1() const;
222  const Transform& getDefaultFrameOnBody2() const;
227  const Vec6& getDefaultStiffness() const;
233  const Vec6& getDefaultDamping() const;
235 
236 
237 
238  //--------------------------------------------------------------------------
255 
256  const LinearBushing& setFrameOnBody1(State& state,
269  const Transform& X_B1F) const;
282  const LinearBushing& setFrameOnBody2(State& state,
283  const Transform& X_B2M) const;
295  const LinearBushing& setStiffness(State& state,
296  const Vec6& stiffness) const;
308  const LinearBushing& setDamping(State& state,
309  const Vec6& damping) const;
310 
320  const Transform& getFrameOnBody1(const State& state) const;
330  const Transform& getFrameOnBody2(const State& state) const;
340  const Vec6& getStiffness(const State& state) const;
350  const Vec6& getDamping(const State& state) const;
352 
353 
354 
355  //--------------------------------------------------------------------------
366 
367  const Vec6& getQ(const State& state) const;
380 
388  const Transform& getX_GF(const State& state) const;
389 
397  const Transform& getX_GM(const State& state) const;
398 
406  const Transform& getX_FM(const State& state) const;
408 
409 
410 
411  //--------------------------------------------------------------------------
422 
423  const Vec6& getQDot(const State& state) const;
436 
448  const SpatialVec& getV_GF(const State& state) const;
449 
461  const SpatialVec& getV_GM(const State& state) const;
462 
475  const SpatialVec& getV_FM(const State& state) const;
477 
478 
479 
480  //--------------------------------------------------------------------------
491 
492  const Vec6& getF(const State& state) const;
506 
516  const SpatialVec& getF_GM(const State& state) const;
517 
528  const SpatialVec& getF_GF(const State& state) const;
530 
531 
532 
533  //--------------------------------------------------------------------------
539 
540  Real getPotentialEnergy(const State& state) const;
549 
560  Real getPowerDissipation(const State& state) const;
561 
575  Real getDissipatedEnergy(const State& state) const;
576 
589  void setDissipatedEnergy(State& state, Real energy) const;
591 
592  // Don't show this in Doxygen.
595  (LinearBushing, LinearBushingImpl, Force);
597 };
598 
599 } // namespace SimTK
600 
601 #endif // SimTK_SIMBODY_FORCE_LINEAR_BUSHING_H_
This is the base class from which all Force element handle classes derive.
Definition: Force.h:50
This force element represents a bushing acting to connect a frame F fixed on one body (B1) to a frame...
Definition: Force_LinearBushing.h:101
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:577
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:276
Includes internal headers providing declarations for the basic SimTK Core classes, including Simmatrix.
#define SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS(DERIVED, DERIVED_IMPL, PARENT)
Definition: PrivateImplementation.h:343
This is a concrete subsystem which can apply arbitrary forces to a MultibodySystem.
Definition: GeneralForceSubsystem.h:47
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:72
A MobilizedBody is Simbody's fundamental body-and-joint object used to parameterize a system's motion...
Definition: MobilizedBody.h:167
This is a fixed-length column vector designed for no-overhead inline computation. ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:589
LinearBushing()
Default constructor creates an empty handle.
Definition: Force_LinearBushing.h:152