AGX Dynamics
2.38.0.2
PistonActuator.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_PISTON_ACTUATOR_H
19
#define AGXHYDRAULICS_PISTON_ACTUATOR_H
20
21
#include <
agxHydraulics/FlowUnit.h
>
22
#include <
agxHydraulics/Pipe.h
>
23
#include <
agxHydraulics/PistonActuatorConnector.h
>
24
#include <
agxPowerLine/Actuator1DOF.h
>
25
#include <
agxPowerLine/ActuatorConnector.h
>
26
#include <
agxPowerLine/ActuatorUnit.h
>
27
28
namespace
agx
29
{
30
class
RigidBody;
31
}
32
33
namespace
agxModel
34
{
35
class
Connector;
36
}
37
38
namespace
agxHydraulics
39
{
40
41
class
PistonActuator;
42
class
FlowUnit;
43
44
45
46
47
AGX_DECLARE_POINTER_TYPES
(
PistonActuator
);
48
AGX_DECLARE_VECTOR_TYPES
(
PistonActuator
);
49
50
65
class
AGXHYDRAULICS_EXPORT
PistonActuator
:
public
agxPowerLine::TranslationalActuator
66
{
67
public
:
68
84
PistonActuator
(
85
agx::Prismatic
* prismatic,
agx::Real
inputChamberArea,
agx::Real
outputChamberArea,
agx::Real
fluidDensity);
86
93
PistonActuator
(
94
agx::DistanceJoint
* distancejoint,
agx::Real
inputChamberArea,
agx::Real
outputChamberArea,
95
agx::Real
fluidDensity);
96
97
PistonActuator
(
agx::Constraint
* constraint,
agxPowerLine::ConstraintGeometry
* constraintGeometry,
98
agx::Real
inputChamberArea,
agx::Real
outputChamberArea,
99
agx::Real
fluidDensity);
100
101
105
agxHydraulics::FlowUnit
* getInputChamber();
106
const
agxHydraulics::FlowUnit
* getInputChamber()
const
;
107
111
agxHydraulics::FlowUnit
* getOutputChamber();
112
const
agxHydraulics::FlowUnit
* getOutputChamber()
const
;
113
119
agxHydraulics::FlowUnit
* getChamber(
agxPowerLine::Side
side);
120
121
125
agxHydraulics::PistonActuatorConnector
* getInputChamberConnector();
126
const
agxHydraulics::PistonActuatorConnector
* getInputChamberConnector()
const
;
127
131
agxHydraulics::PistonActuatorConnector
* getOutputChamberConnector();
132
const
agxHydraulics::PistonActuatorConnector
* getOutputChamberConnector()
const
;
133
140
agxHydraulics::PistonActuatorConnector
* getChamberConnector(
agxPowerLine::Side
side);
141
142
146
agx::Real
getPistonPosition()
const
;
147
148
149
150
151
152
// Deprecated methods.
153
public
:
158
agxHydraulics::FlowUnit
* getFrontChamber();
159
const
agxHydraulics::FlowUnit
* getFrontChamber()
const
;
160
165
agxHydraulics::FlowUnit
* getRearChamber();
166
const
agxHydraulics::FlowUnit
* getRearChamber()
const
;
167
168
174
agxHydraulics::PistonActuatorConnector
* getFrontChamberConnector();
175
181
agxHydraulics::PistonActuatorConnector
* getRearChamberConnector();
182
183
184
185
186
// Methods called by the rest of the power line framework.
187
public
:
188
using
agxPowerLine::Actuator1DOF::connect
;
189
190
DOXYGEN_START_INTERNAL_BLOCK
()
191
virtual
bool
preUpdate(
agx::Real
timeStep)
override
;
192
200
virtual
agx::Real
calculateChamberLength(
agxPowerLine::Side
side)
const
;
201
DOXYGEN_END_INTERNAL_BLOCK
()
202
203
204
#ifndef SWIG
205
virtual
void
getConnectableDimensionTypes(
206
agxPowerLine::PhysicalDimension::TypeVector
& types,
agxPowerLine::Side
side)
const override
;
207
208
virtual
agxPowerLine::DimensionAndSide
getConnectableDimension(
209
agxPowerLine::PhysicalDimension::Type
type,
agxPowerLine::Side
side)
override
;
210
211
215
virtual
bool
store(
agxStream::StorageStream
& str)
const override
;
216
220
virtual
bool
restore(
agxStream::StorageStream
& str)
override
;
221
222
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxHydraulics::PistonActuator
);
223
#endif
224
225
226
protected
:
227
void
create(
agx::Constraint
* constraint,
agx::Real
inputChamberArea,
agx::Real
outputChamberArea,
agx::Real
fluidDensity);
228
bool
connect(
agxPowerLine::ActuatorBodyUnit
* flowSideBody,
agxPowerLine::ActuatorBodyUnit
* oppositeSideBody,
agxPowerLine::Side
index);
229
230
PistonActuator
();
231
virtual
~
PistonActuator
();
232
233
private
:
234
agx::Real
m_chamberBufferLength;
235
agx::ref_ptr<FlowUnit>
m_flowUnits[2];
236
agx::ref_ptr<agxHydraulics::PistonActuatorConnector>
m_pistonChamberConnectors[2];
237
};
238
239
240
241
242
243
244
}
245
246
#endif
agxPowerLine::ConstraintGeometry
Description of how an Actuator is allowed to apply forces and torques on the body or bodies attached ...
Definition:
Actuator1DOF.h:46
agx::Real
double Real
Definition:
Real.h:42
agxPowerLine::Side
Side
Definition:
Sides.h:28
agxModel
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition:
FlowUnit.h:36
agx::Vector
Templated vector class.
Definition:
Vector.h:52
agxPowerLine::ActuatorBodyUnit
An ActuatorBodyUnit forms a connection between the power line world and the rest of the simulation.
Definition:
ActuatorUnit.h:142
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition:
macros.h:97
agxPowerLine::Unit::connect
virtual bool connect(agxPowerLine::Connector *connector)
Connect the unit to a connector.
agx::Prismatic
A prismatic joint keeps a fixed relative orientation between the attached bodies but allows them to s...
Definition:
Prismatic.h:66
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition:
macros.h:96
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition:
StorageStream.h:48
AGXSTREAM_DECLARE_SERIALIZABLE
#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
agxPowerLine::PhysicalDimension::Type
int Type
Definition:
PhysicalDimension.h:95
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
AGXHYDRAULICS_EXPORT
#define AGXHYDRAULICS_EXPORT
Definition:
agxHydraulics/export.h:39
agxHydraulics::PistonActuator
A PistonActuator is a model of a hydraulic cylinder.
Definition:
PistonActuator.h:65
AGX_DECLARE_VECTOR_TYPES
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition:
Vector.h:34
agx::ref_ptr< FlowUnit >
ActuatorConnector.h
Pipe.h
Actuator1DOF.h
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:254
agx::Constraint
The base class for a constraint.
Definition:
Constraint.h:88
agxPowerLine::TranslationalActuator
Definition:
Actuator1DOF.h:512
agxHydraulics
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition:
Accumulator.h:27
agxHydraulics::FlowUnit
FlowUnit is the base class for Units that contains a FlowDimension.
Definition:
FlowUnit.h:66
agx::DistanceJoint
This joint will preserve the initial distance between a body and a point in world coordinate or betwe...
Definition:
DistanceJoint.h:27
agxHydraulics::PistonActuatorConnector
The PistonChamberConnector is an internal Connector to the PistonActuator.
Definition:
PistonActuatorConnector.h:37
PistonActuatorConnector.h
FlowUnit.h
ActuatorUnit.h
agxPowerLine::DimensionAndSide
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
Definition:
PhysicalDimension.h:77
include
agxHydraulics
PistonActuator.h
Generated on Sun Sep 1 2024 11:18:52 for AGX Dynamics by
1.8.17