AGXDynamics
2.35.0.2
FlowDimension.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_FLOW_DIMENSION_H
19
#define AGXHYDRAULICS_FLOW_DIMENSION_H
20
21
#include <
agxHydraulics/export.h
>
22
23
#include <
agxPowerLine/PhysicalDimension.h
>
24
#include <
agxPowerLine/detail/DimensionState.h
>
25
26
27
#ifndef SWIG
28
namespace
agxHydraulics
29
{
30
const
agx::Real
complianceScaling
(1);
31
const
agx::Real
dampingScaling
(1);
32
}
33
#endif
34
35
36
namespace
agxHydraulics
37
{
38
class
FlowUnit;
39
class
FlowConnector;
40
}
41
42
43
44
namespace
agxHydraulics
45
{
46
AGX_DECLARE_POINTER_TYPES
(
FlowDimension
);
47
AGX_DECLARE_VECTOR_TYPES
(
FlowDimension
);
48
49
53
class
AGXHYDRAULICS_EXPORT
FlowDimension
:
public
agxPowerLine::PhysicalDimension
54
{
55
public
:
56
FlowDimension
(
agxHydraulics::FlowUnit
* unit);
57
58
FlowDimension
(
agxHydraulics::FlowUnit
* unit,
agx::RigidBody
* body,
agx::UInt8
slot);
59
60
65
agxHydraulics::FlowConnector
* getFlowConnector(
agxPowerLine::Side
side);
66
const
agxHydraulics::FlowConnector
* getFlowConnector(
agxPowerLine::Side
side)
const
;
67
72
agxHydraulics::FlowConnector
* getInputFlowConnector();
73
const
agxHydraulics::FlowConnector
* getInputFlowConnector()
const
;
74
79
agxHydraulics::FlowConnector
* getOutputFlowConnector();
80
const
agxHydraulics::FlowConnector
* getOutputFlowConnector()
const
;
81
82
86
FlowUnit
* getFlowUnit();
87
const
FlowUnit
* getFlowUnit()
const
;
88
89
96
virtual
agx::Real
getOutputLoad()
const override
;
97
104
virtual
agx::Real
getInputLoad()
const override
;
105
112
virtual
agx::Real
getPowerOut()
const override
;
113
120
virtual
agx::Real
getPowerIn()
const override
;
121
122
123
124
125
126
127
// Methods called by the rest of the PowerLine/Hydraulics framework.
128
public
:
132
static
std::string getStaticTypeName();
133
137
virtual
std::string getTypeName()
const override
;
138
146
static
agxPowerLine::PhysicalDimension::Type
getStaticType();
147
148
agxPowerLine::detail::Translational1DofState
* getFlowState();
149
const
agxPowerLine::detail::Translational1DofState
* getFlowState()
const
;
150
151
agx::UInt8
getElementIndex()
const
;
152
153
154
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxHydraulics::FlowDimension
);
155
156
#ifndef SWIG
157
161
virtual
bool
store(
agxStream::StorageStream
&
out
)
const override
;
162
163
using
agxPowerLine::PhysicalDimension::store
;
164
168
virtual
bool
restore(
agxStream::StorageStream
&
in
)
override
;
169
170
using
agxPowerLine::PhysicalDimension::restore
;
171
#endif
172
173
174
protected
:
175
FlowDimension
();
176
virtual
~FlowDimension
() {}
177
178
private
:
179
typedef
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation
* (
agxHydraulics::FlowDimension
::*GetConstraint)(
size_t
)
const
;
180
typedef
const
agxPowerLine::Connection
* (
agxHydraulics::FlowDimension
::*GetConnection)(
size_t
)
const
;
181
agx::Real
sumPower(
182
const
agxPowerLine::ConnectionRefVector
& connections,
183
GetConstraint getConstraintFunction,
184
GetConnection getConnectionFunction)
const
;
185
186
private
:
187
agxPowerLine::detail::Translational1DofState
* m_flowState;
188
};
189
}
190
#endif
DimensionState.h
agx::Real
double Real
Definition:
Real.h:42
agxHydraulics::FlowDimension::~FlowDimension
virtual ~FlowDimension()
Definition:
FlowDimension.h:176
agxPowerLine::Side
Side
Definition:
Sides.h:30
agxPowerLine::PhysicalDimension::store
virtual bool store(agxStream::StorageStream &str) const
Stores internal data into stream.
agxHydraulics::complianceScaling
const agx::Real complianceScaling(1)
agx::Vector< ConnectionRef >
agxStream::out
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.
Definition:
OutputArchive.h:412
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation
Constraint implementation for constraining a number of physical dimensions of the same type.
Definition:
PowerLineConstraints.h:150
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition:
StorageStream.h:48
agxHydraulics::dampingScaling
const agx::Real dampingScaling(1)
agxPowerLine::PhysicalDimension
Pure virtual class.
Definition:
PhysicalDimension.h:93
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:96
agxStream::in
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
AGXHYDRAULICS_EXPORT
#define AGXHYDRAULICS_EXPORT
Definition:
agxHydraulics/export.h:39
AGX_DECLARE_VECTOR_TYPES
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition:
Vector.h:34
agx::UInt8
uint8_t UInt8
Definition:
Integer.h:38
agxHydraulics::FlowConnector
A FlowConnector is a junction of a set of FlowUnits.
Definition:
FlowConnector.h:39
agxPowerLine::PhysicalDimension::restore
virtual bool restore(agxStream::StorageStream &in)
Restores internal data from stream.
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
agxPowerLine::detail::DimensionState1Dof
Templated one dimensional dimension state.
Definition:
DimensionState.h:210
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
agxPowerLine::Connection
Definition:
PowerLineUtils.h:258
agxHydraulics::FlowDimension
A FlowDimension represents the flow of fluid through a FlowUnit.
Definition:
FlowDimension.h:53
export.h
PhysicalDimension.h
include
agxHydraulics
FlowDimension.h
Generated on Mon Jan 30 2023 15:44:12 for AGXDynamics by
1.8.17