AGX Dynamics  2.35.0.1
ImpellerActuator.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 
67 
73 
74 
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:
141  FlowUnitRef m_flowUnit;
142  RotationalFlowConnectorRef m_impellerChamberConnector;
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 
176 
177  // Methods called by the rest of the PowerLine/Hydraulics framework.
178  public:
179 #ifndef SWIG
184  virtual bool store(agxStream::StorageStream& str) const override;
185 
190  virtual bool restore(agxStream::StorageStream& str) override;
191 
193 #endif
194 
195  protected:
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 
231 
232 
233 #ifndef SWIG
237  virtual bool store(agxStream::StorageStream& str) const override;
241  virtual bool restore(agxStream::StorageStream& str) override;
242 
244 #endif
245 
246  protected:
249 
250  virtual void createRotationalFlowConnector() override;
251  };
252 
253 
254 
255 }
256 
257 #endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#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
#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 AGXHYDRAULICS_EXPORT
FlowUnit is the base class for Units that contains a FlowDimension.
Definition: FlowUnit.h:67
An Actuator that converts hydraulic flow into rotation of a hinge.
const agxHydraulics::RotationalFlowConnector * getMotorConnector() const
virtual void createRotationalFlowConnector() override
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
agxHydraulics::RotationalFlowConnector * getMotorConnector()
HydraulicMotorActuator(agx::Hinge *hinge, agx::Real chamberLength, agx::Real chamberArea, agx::Real fluidDensity)
Creates a motor actuator that causes rotation about the given hinge when there is flow in the interna...
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
An Actuator that converts rotation of a hinge into hydraulic flow.
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
virtual void createRotationalFlowConnector() override
HydraulicPumpActuator(agx::Hinge *hinge, agx::Real chamberLength, agx::Real chamberArea, agx::Real chamberDensity)
Creates a pump actuator that causes flow in the internal chamber when there is rotation about the giv...
agxHydraulics::RotationalFlowConnector * getPumpConnector()
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
const agxHydraulics::RotationalFlowConnector * getPumpConnector() const
Base class for Actuators that convert between hydraulic flow and mechanical 6-DOF rotation,...
agxHydraulics::FlowUnit * getChamber()
const agxHydraulics::RotationalFlowConnector * getRotationalFlowConnector() const
agx::Real getDisplacement() const
virtual bool getEnable() const override
const agxHydraulics::FlowUnit * getChamber() const
agxHydraulics::RotationalFlowConnector * getRotationalFlowConnector()
void setDisplacement(agx::Real displacement)
Set the relationship between hydraulic flow and mechanical rotation.
virtual void setEnable(bool enabled) override
Abstract base class containing overlapping functionality for pump and motor.
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:52
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:57
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
The hinge constraint between two rigid bodies or one rigid body and the world.
Definition: Hinge.h:104
Templated vector class.
Definition: agx/Vector.h:53
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:28
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:37
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:24
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
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.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:42