AGXDynamics
2.35.0.3
FlowConnector.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
19
#ifndef AGXHYDRAULICS_FLOW_CONNECTOR_H
20
#define AGXHYDRAULICS_FLOW_CONNECTOR_H
21
22
#include <
agxHydraulics/export.h
>
23
#include <
agxHydraulics/PressureConnector.h
>
24
#include <
agxPowerLine/PowerLineUtils.h
>
25
26
27
namespace
agxHydraulics
28
{
29
AGX_DECLARE_POINTER_TYPES
(
FlowConnector
);
30
AGX_DECLARE_VECTOR_TYPES
(
FlowConnector
);
31
39
class
AGXHYDRAULICS_EXPORT
FlowConnector
:
public
agxHydraulics::PressureConnector
40
{
41
public
:
49
FlowConnector
(
bool
holonomic =
true
);
50
57
virtual
bool
connect(
58
agxPowerLine::Side
mySide,
59
agxPowerLine::Side
unitSide,
60
agxPowerLine::Unit
* unit)
override
;
61
62
using
agxHydraulics::PressureConnector::connect
;
63
81
void
setCompliance
(
agx::Real
volumePerPressure);
82
87
agx::Real
getCompliance()
const
;
88
93
void
setDamping
(
agx::Real
damping);
94
98
agx::Real
getDamping()
const
;
99
101
void
setVolumeExpansionPressureRatio(
agx::Real
ratio);
102
104
agx::Real
getVolumeExpansionPressureRatio()
const
;
105
109
virtual
agx::Real
getPressure()
const override
;
110
115
agx::Real
getStoredFluid()
const
;
116
117
118
119
127
static
void
setDefaultCompliance(
agx::Real
compliance);
128
132
static
agx::Real
getDefaultCompliance();
133
141
static
void
setDefaultDamping(
agx::Real
damping);
142
146
static
agx::Real
getDefaultDamping();
147
148
149
// Methods called by the rest of the PowerLine/Hydraulics frame work.
150
public
:
151
152
DOXYGEN_START_INTERNAL_BLOCK
()
153
void
setStoredFluid(
agx::Real
storedFluid);
154
155
159
virtual
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation
* createConstraint()
override
;
160
161
165
virtual
agx::RegularizationParameters::VariableType
calculateComplianceAndDamping(
166
const
agx::Real
timeStep,
agx::Real
& compliance,
agx::Real
& damping)
override
;
167
171
void
setIsImpacting(
bool
impact);
172
173
#ifndef SWIG
174
178
virtual
bool
postStore(
agxStream::StorageStream
& str)
const override
;
179
184
virtual
bool
postRestore(
agxStream::StorageStream
& str)
override
;
185
186
190
virtual
bool
store(
agxStream::StorageStream
& str)
const override
;
191
196
virtual
bool
restore(
agxStream::StorageStream
& str)
override
;
197
198
199
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxHydraulics::FlowConnector
);
200
#endif
201
DOXYGEN_END_INTERNAL_BLOCK
()
202
203
protected
:
204
205
// Swig tries to generate bindings to this protected connect member function
206
// which leads to compiler errors since the function is protected.
207
#ifndef SWIG
208
virtual
bool
connect(
209
agxPowerLine::Unit
* inputUnit,
agxPowerLine::Side
inputUnitSide,
210
agxPowerLine::Side
outputUnitSide,
agxPowerLine::Unit
* outputUnit)
override
;
211
#endif
212
213
virtual
~FlowConnector
() {}
214
215
private
:
216
agx::Real
m_volumeExpansionPressureRatio;
217
agx::Real
m_damping;
218
bool
m_holonomic;
219
220
static
agx::Real
s_defaultCompliance;
221
static
agx::Real
s_defaultDamping;
222
};
223
224
225
}
226
227
#endif
agxHydraulics::FlowConnector::~FlowConnector
virtual ~FlowConnector()
Definition:
FlowConnector.h:213
agx::Real
double Real
Definition:
Real.h:42
agxPowerLine::Side
Side
Definition:
Sides.h:30
agx::RegularizationParameters::VariableType
VariableType
Definition:
RegularizationParameters.h:32
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition:
macros.h:97
PowerLineUtils.h
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation
Constraint implementation for constraining a number of physical dimensions of the same type.
Definition:
PowerLineConstraints.h:150
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition:
macros.h:96
agxFMI2::Export::Constraint::setCompliance
AGXFMI_EXPORT InputVariable_Real * setCompliance(agx::Constraint *constraint)
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
AGXHYDRAULICS_EXPORT
#define AGXHYDRAULICS_EXPORT
Definition:
agxHydraulics/export.h:39
agxPowerLine::Unit
Pure virtual class.
Definition:
Unit.h:72
AGX_DECLARE_VECTOR_TYPES
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition:
Vector.h:34
agxHydraulics::PressureConnector
The PressureConnector is an abstract base class for all Connectors that has a pressure.
Definition:
PressureConnector.h:36
agxHydraulics::FlowConnector
A FlowConnector is a junction of a set of FlowUnits.
Definition:
FlowConnector.h:39
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
agxHydraulics
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition:
Accumulator.h:27
agxFMI2::Export::Constraint::setDamping
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
agxPowerLine::Connector::connect
virtual bool connect(agxPowerLine::Unit *unit)
Connect a unit to this Connector.
PressureConnector.h
export.h
include
agxHydraulics
FlowConnector.h
Generated on Fri Feb 10 2023 14:06:10 for AGXDynamics by
1.8.17