Simbody 3.9
Loading...
Searching...
No Matches
ExponentialSpringParameters.h
Go to the documentation of this file.
1#ifndef SimTK_SIMBODY_EXPONENTIAL_SPRING_PARAMETERS_H_
2#define SimTK_SIMBODY_EXPONENTIAL_SPRING_PARAMETERS_H_
3
4/*-----------------------------------------------------------------------------
5 Simbody(tm)
6-------------------------------------------------------------------------------
7 Copyright (c) 2021-22 Authors.
8 Authors: Frank C. Anderson
9 Contributors:
10
11 Licensed under the Apache License, Version 2.0 (the "License"); you may
12 not use this file except in compliance with the License. You may obtain a
13 copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
14
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20 ----------------------------------------------------------------------------*/
21
22#include "SimTKmath.h"
23
24namespace SimTK {
25
26//=============================================================================
119public:
123
128 = default;
129
134 operator=(const ExponentialSpringParameters& source) = default;
135
140 bool operator==(const ExponentialSpringParameters& other) const;
141
144 bool operator!=(const ExponentialSpringParameters& other) const;
145
172 void setShapeParameters(Real d0, Real d1 = 0.5336, Real d2 = 1150.0);
173
176 void getShapeParameters(Real& d0, Real& d1, Real& d2) const;
177
185
191
201
204
218
225
232
249
256
261 void setSettleVelocity(Real vSettle);
262
267
274
278
285
289
290private:
291 Real d0;
292 Real d1;
293 Real d2;
294 Real cz;
295 Real maxFz;
296 Real kxy;
297 Real cxy;
298 Real vSettle;
299 Real initMus;
300 Real initMuk;
301};
302
303} // namespace SimTK
304#endif // SimTK_SIMBODY_EXPONENTIAL_SPRING_PARAMETERS_H_
305
#define SimTK_SIMBODY_EXPORT
Definition Simbody/include/simbody/internal/common.h:68
ExponentialSpringParameters is a helper class used to customize the force-producing characteristics o...
Definition ExponentialSpringParameters.h:118
void setSettleVelocity(Real vSettle)
Set the velocity below which the coefficient of friction transitions to the static coefficient of fri...
Real getMaxNormalForce() const
Get the maximum normal force allowed for an ExponentialSpringForce.
void setInitialMuStatic(Real mus)
Set the initial value of the static coefficient of friction (μₛ).
void getShapeParameters(Real &d0, Real &d1, Real &d2) const
Get the parameters that determine the shape of the exponential.
bool operator==(const ExponentialSpringParameters &other) const
Equality operator.
void setShapeParameters(Real d0, Real d1=0.5336, Real d2=1150.0)
Set the parameters that determine the shape of the exponential.
Real getFrictionElasticity() const
Get the elasticity of the friction spring.
Real getInitialMuStatic() const
Get the initial value of the static coefficient of friction (μₛ).
Real getSettleVelocity() const
Get the velocity magnitude below which the coefficient of friction transitions to the static coeffici...
void setElasticityAndViscosityForCriticalDamping(Real kxy, Real mass=1.0)
Set both the elasticity and viscosity of the damped linear spring used to model friction in Friction ...
Real getNormalViscosity() const
Get the viscosity of the exponential part of an ExponentialSpringForce.
ExponentialSpringParameters & operator=(const ExponentialSpringParameters &source)=default
Copy assignment operator.
Real getInitialMuKinetic() const
Get the initial value of the kinetic coefficient of friction (μₖ).
ExponentialSpringParameters(const ExponentialSpringParameters &source)=default
Copy constructor.
void setFrictionElasticity(Real kxy)
Set the elasticity of the friction spring (kxy).
void setInitialMuKinetic(Real muk)
Set the initial value of the kinetic coefficient of friction (μₖ).
void setNormalViscosity(Real cz)
Set the viscosity of the exponential part of an ExponentialSpringForce.
bool operator!=(const ExponentialSpringParameters &other) const
Inquality operator.
ExponentialSpringParameters()
Default Constructor.
Real getFrictionViscosity() const
Get the viscosity of the friction spring.
void setMaxNormalForce(Real maxFz)
Set the maximum normal force allowed for an ExponentialSpringForce.
void setFrictionViscosity(Real cxy)
Set the viscosity of the friction spring (cxy).
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:626