AGX Dynamics  2.35.0.1
DryClutch.h
Go to the documentation of this file.
1 #pragma once
2 /*
3 Copyright 2007-2022. Algoryx Simulation AB.
4 
5 All AGX source code, intellectual property, documentation, sample code,
6 tutorials, scene files and technical white papers, are copyrighted, proprietary
7 and confidential material of Algoryx Simulation AB. You may not download, read,
8 store, distribute, publish, copy or otherwise disseminate, use or expose this
9 material unless having a written signed agreement with Algoryx Simulation AB, or having been
10 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
11 valid commercial license from Algoryx Simulation AB.
12 
13 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
14 from using this software, unless otherwise stated in written agreements with
15 Algoryx Simulation AB.
16 */
17 
18 #pragma once
19 
20 #include <agxPowerLine/PowerLine.h>
22 
23 namespace agxDriveTrain
24 {
25 
82  {
83  public:
85 
92  void setEngage(bool engage);
93 
97  bool isEngaged() const;
98 
102  void setFraction(agx::Real fraction);
103 
109 
117 
123  void setManualMode(bool manual);
124 
128  bool isManualMode() const;
129 
134 
139  void setLock(bool setLock);
140 
144  bool isLocked() const;
145 
150  void setTorqueCapacity(agx::Real capacity);
151 
156 
164  void calculateTorqueCapacity(agx::Real maxForce, agx::Real mu, agx::Real radii[2]);
165 
171  void setAutoLock(bool autoLock);
172 
176  bool isAutoLock() const;
177 
182 
187 
192 
197 
202  void setMinRelativeSlip(agx::Real minRelativeSlip);
203 
208 
210 
211 #ifndef SWIG
213 #endif
214 
215  virtual agx::RegularizationParameters::VariableType calculateComplianceAndDamping(const agx::Real timeStep, agx::Real& compliance, agx::Real& damping) override;
216 
217  virtual bool preUpdate(agx::Real timeStep) override;
218 
219  virtual bool addNotification(agxSDK::Simulation* simulation) override;
220 
221 #ifndef SWIG
222  virtual bool postStore(agxStream::StorageStream& str) const override;
223 
224  virtual bool postRestore(agxStream::StorageStream& str) override;
225 
229  virtual bool store(agxStream::StorageStream& str) const override;
230 
234  virtual bool restore(agxStream::StorageStream& str) override;
235 
237 #endif
238 
240 
241  protected:
242  virtual ~DryClutch();
243 
244  agx::Real m_torqueCapacity;
245  bool m_isEngaged;
246  bool m_isAutoLock;
247  bool m_isManual;
248  agx::Real m_timeConstant;
249  agx::Real m_minRelativeSlip;
250  agx::Real m_fraction;
251  bool m_isLocked;
252 
253  };
254  typedef agx::ref_ptr<DryClutch> DryClutchRef;
255 
256 } // namespace agxDriveTrain
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXMODEL_EXPORT
Single disk plate clutch with dry friction.
Definition: DryClutch.h:82
void calculateTorqueCapacity(agx::Real maxForce, agx::Real mu, agx::Real radii[2])
Calculate the torque capacity based on the geometric and physical parameters of the clutch.
void setAutoLock(bool autoLock)
In auto lock mode, the clutch will lock when the slip is small enough in proportion to the velocity o...
void setTorqueCapacity(agx::Real capacity)
This is the maximum torque that the clutch can transfer: it will slip if this is exceeded.
agx::Real getTorque() const
agx::Real getInputVelocity() const
agx::Real getSlip() const
void setFraction(agx::Real fraction)
agx::Real getMinRelativeSlip() const
void setManualMode(bool manual)
When manual mode is false, user must control all aspects of the clutch engagement and disengagement.
agx::Real getTorqueCapacity() const
agx::Real getTimeConstant() const
void setEngage(bool engage)
Puts the clutch in assisted mode so it will fully engage or disengage in a time determined by setTime...
agx::Real getOutputVelocity() const
void setTimeConstant(agx::Real tau)
Set the time constant for clutch engagement and disengagement.
bool isLocked() const
Returns the lock status.
void setMinRelativeSlip(agx::Real minRelativeSlip)
In autolock mode, the clutch will lock with the ratio of slip to input shaft velocity is less than th...
void setLock(bool setLock)
Lock or unlock the clutch.
agx::Real getFraction() const
Constraint implementation for constraining a number of physical dimensions of the same type.
Defines a stiff gear constraint between two rotational dimensions.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
A library of agxPowerLine components designed to model the various parts of a vehicle drive train.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:42