AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
DryClutch.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
21
22namespace agxDriveTrain
23{
24
81 {
82 public:
84
91 void setEngage(bool engage);
92
96 bool isEngaged() const;
97
101 void setFraction(agx::Real fraction);
102
108
116
122 void setManualMode(bool manual);
123
127 bool isManualMode() const;
128
133
138 void setLock(bool setLock);
139
143 bool isLocked() const;
144
150
155
164
170 void setAutoLock(bool autoLock);
171
175 bool isAutoLock() const;
176
181
186
191
196
201 void setMinRelativeSlip(agx::Real minRelativeSlip);
202
207
209
210#ifndef SWIG
212#endif
213
214 virtual agx::RegularizationParameters::VariableType calculateComplianceAndDamping(const agx::Real timeStep, agx::Real& compliance, agx::Real& damping) override;
215
216 virtual bool preUpdate(agx::Real timeStep) override;
217
218 virtual bool addNotification(agxSDK::Simulation* simulation) override;
219
220#ifndef SWIG
221 virtual bool postStore(agxStream::StorageStream& str) const override;
222
223 virtual bool postRestore(agxStream::StorageStream& str) override;
224
228 virtual bool store(agxStream::StorageStream& str) const override;
229
233 virtual bool restore(agxStream::StorageStream& str) override;
234
236#endif
237
239
240 protected:
241 virtual ~DryClutch();
242
243 agx::Real m_torqueCapacity;
244 bool m_isEngaged;
245 bool m_isAutoLock;
246 bool m_isManual;
247 agx::Real m_timeConstant;
248 agx::Real m_minRelativeSlip;
249 agx::Real m_fraction;
250 bool m_isLocked;
251
252 };
253 typedef agx::ref_ptr<DryClutch> DryClutchRef;
254
255} // 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...
#define AGXMODEL_EXPORT
Single disk plate clutch with dry friction.
Definition DryClutch.h:81
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 true, 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:126
Abstract base class for storing/restoring a line/drums with version control.
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