AGX Dynamics  2.37.2.0
Clutch.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 #include <agxPowerLine/PowerLine.h>
21 
22 
23 
24 namespace agxDriveTrain
25 {
26 
33  {
34  public:
35  Clutch();
36 
37  explicit Clutch(agx::Real efficiency);
38 
39  void setEfficiency(agx::Real efficiency);
40  agx::Real getEfficiency() const;
41 
42  void setTorqueTransferConstant(agx::Real constant);
43  agx::Real getTorqueTransferConstant() const;
44 
45  void setForcedCompliance(agx::Real compliance);
46  agx::Real getForcedCompliance() const;
47 
48 
49 
53  agx::Real calculateCompliance(agx::Real limitTorque) const;
54 
59  agx::Real calculateLimitTorque() const;
60 
64  bool getUseForcedCompliance() const;
65 
66 
67 
68 
72  virtual agx::RegularizationParameters::VariableType calculateComplianceAndDamping(const agx::Real timeStep, agx::Real& compliance, agx::Real& damping) override;
73 
74 
75  virtual bool addNotification(agxSDK::Simulation* simulation) override;
76 
77 #ifndef SWIG
78  virtual bool postStore(agxStream::StorageStream& str) const override;
79  virtual bool postRestore(agxStream::StorageStream& str) override;
80 
84  virtual bool store(agxStream::StorageStream& str) const override;
85 
89  virtual bool restore(agxStream::StorageStream& str) override;
90 
92 #endif
93 
94  protected:
95  virtual ~Clutch();
96 
100  };
102 }
103 
agx::Real m_efficiency
Definition: Clutch.h:97
agx::ref_ptr< Clutch > ClutchRef
Definition: Clutch.h:101
Defines a viscous coupling between two rotational dimensions.
Definition: Clutch.h:32
A library of agxPowerLine components designed to model the various parts of a vehicle drive train...
Defines a stiff gear constraint between two rotational dimensions.
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
agx::Real m_forcedCompliance
Definition: Clutch.h:99
agx::Real m_torqueTransferConstant
Definition: Clutch.h:98
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
#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
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
#define AGXMODEL_EXPORT
double Real
Definition: Real.h:42