AGX Dynamics  2.37.2.0
ImpellerActuator.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 
18 #ifndef AGXHYDRAULICS_IMPELLER_ACTUATOR_H
19 #define AGXHYDRAULICS_IMPELLER_ACTUATOR_H
20 
21 #include <agxHydraulics/FlowUnit.h>
22 #include <agxHydraulics/Pipe.h>
27 
28 namespace agx
29 {
30  class RigidBody;
31 }
32 
33 namespace agxModel
34 {
35  class Connector;
36 }
37 
38 namespace agxHydraulics
39 {
41 
55  {
56  public:
61  void setDisplacement(agx::Real displacement);
62 
66  agx::Real getDisplacement() const;
67 
71  agxHydraulics::FlowUnit* getChamber();
72  const agxHydraulics::FlowUnit* getChamber() const;
73 
74 
78  agxHydraulics::RotationalFlowConnector* getRotationalFlowConnector();
79  const agxHydraulics::RotationalFlowConnector* getRotationalFlowConnector() const;
80 
81  virtual void setEnable(bool enabled) override;
82  virtual bool getEnable() const override;
83 
84  // Methods used by the rest of the framework.
85  public:
87 #ifndef SWIG
88  virtual agxPowerLine::DimensionAndSide getConnectableDimension(
90 
91  virtual void getConnectableDimensionTypes(
93 
97  virtual bool store(agxStream::StorageStream& str) const override;
98 
102  virtual bool restore(agxStream::StorageStream& str) override;
103 
104 
106 
107  void restore(agxStream::InputArchive& in) override;
108 
109  void store(agxStream::OutputArchive& out) const override;
110 #endif
112 
113  protected:
119  ImpellerActuator(agx::Hinge* hinge, agx::Real chamberLength, agx::Real chamberArea, agx::Real chamberDensity);
121 
122  virtual ~ImpellerActuator();
123 
130  virtual void createRotationalFlowConnector() = 0;
131 
132 
133  virtual bool internalConnect(
134  agxPowerLine::ActuatorBodyUnit* flowSideBody,
135  agxPowerLine::ActuatorBodyUnit* oppositeSideBody,
136  agxHydraulics::FlowUnit* flowUnit,
137  agxPowerLine::Side connectorFlowSide);
139 
140  protected:
143  };
144 
145 
146 
147 
148 
149 
150 
152 
157  {
158  public:
168  HydraulicMotorActuator(agx::Hinge* hinge, agx::Real chamberLength, agx::Real chamberArea, agx::Real fluidDensity);
169 
170 
174  agxHydraulics::RotationalFlowConnector* getMotorConnector();
175  const agxHydraulics::RotationalFlowConnector* getMotorConnector() const;
176 
177  // Methods called by the rest of the PowerLine/Hydraulics framework.
178  public:
179 #ifndef SWIG
180 
184  virtual bool store(agxStream::StorageStream& str) const override;
185 
190  virtual bool restore(agxStream::StorageStream& str) override;
191 
193 #endif
194 
195  protected:
197  virtual ~HydraulicMotorActuator();
198 
199  virtual void createRotationalFlowConnector() override;
200  };
201 
202 
203 
204 
205 
206 
208 
213  {
214  public:
224  HydraulicPumpActuator(agx::Hinge* hinge, agx::Real chamberLength, agx::Real chamberArea, agx::Real chamberDensity);
225 
229  agxHydraulics::RotationalFlowConnector* getPumpConnector();
230  const agxHydraulics::RotationalFlowConnector* getPumpConnector() const;
231 
232 
233 #ifndef SWIG
234 
237  virtual bool store(agxStream::StorageStream& str) const override;
241  virtual bool restore(agxStream::StorageStream& str) override;
242 
244 #endif
245 
246  protected:
248  virtual ~HydraulicPumpActuator();
249 
250  virtual void createRotationalFlowConnector() override;
251  };
252 
253 
254 
255 }
256 
257 #endif
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Definition: InputArchive.h:400
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Abstract base class containing overlapping functionality for pump and motor.
RotationalFlowConnectorRef m_impellerChamberConnector
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:36
Templated vector class.
Definition: Vector.h:52
An Actuator that converts hydraulic flow into rotation of a hinge.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXHYDRAULICS_EXPORT
An ActuatorBodyUnit forms a connection between the power line world and the rest of the simulation...
Definition: ActuatorUnit.h:143
The hinge constraint between two rigid bodies or one rigid body and the world.
Definition: Hinge.h:103
Base class for Actuators that convert between hydraulic flow and mechanical 6-DOF rotation...
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:27
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
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
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:56
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
double Real
Definition: Real.h:42
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
An Actuator that converts rotation of a hinge into hydraulic flow.
FlowUnit is the base class for Units that contains a FlowDimension.
Definition: FlowUnit.h:66