AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
ReliefValve.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17
18#ifndef AGXHYDRAULICS_RELIEF_VALVE_H
19#define AGXHYDRAULICS_RELIEF_VALVE_H
20
21
24#include <agxHydraulics/Pipe.h>
25
27
29
30
31namespace agx
32{
33 class Constraint;
34}
35
36namespace agxSDK
37{
38 class Simulation;
39}
40
41
42
43namespace agxHydraulics
44{
46
73 {
74 public:
82 ReliefValve(agx::Real crackingPressure, agx::Real fullyOpenPressure, agx::Real fullyOpenArea, agx::UInt32 numDrains=6);
83
93 void setPressures(agx::Real crackingPressure, agx::Real fullyOpenPressure);
94
103 void setCrackingPressure(agx::Real crackingPressure);
104
109
118 void setFullyOpenPressure(agx::Real fullyOpenPressure);
119
124
129
136
141
147
153
159
164
165
171
177
185
190
191
192 // Methods called by the rest of the PowerLine/Hydraulics frame work.
193 public:
195#ifndef SWIG
199 virtual void getConnectableDimensionTypes(
201
207 virtual agxPowerLine::DimensionAndSide getConnectableDimension(
209
214 virtual bool addNotification(agxSDK::Simulation *simulation) override;
215
220 virtual bool removeNotification(agxUtil::ConstraintHolder* constraintHolder, agxSDK::Simulation *simulation) override;
221
228 virtual bool store(agxStream::StorageStream& str) const override;
229
230 virtual bool postStore(agxStream::StorageStream& str) const override;
231
238 virtual bool restore(agxStream::StorageStream& str) override;
239
240 virtual bool postRestore(agxStream::StorageStream& str) override;
241
243#endif
245
246 protected:
248
249 private:
250 agxHydraulics::PipeRef m_inputChamber;
251 agxHydraulics::PipeRef m_outputChamber;
253 agxHydraulics::detail::LimitedFlowBlockConstraintRefVector m_flowBlockConstraints;
254
255 agx::Real m_crackingPressure;
256 agx::Real m_fullyOpenPressure;
257 agx::Real m_fullyOpenArea;
258
259 // Owned by the base class SubGraph.
260 FlowConnectorObserver m_drainConnector;
261 };
262}
263
264#endif
265
266
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXHYDRAULICS_EXPORT
A FlowConnector is a junction of a set of FlowUnits.
FlowUnit is the base class for Units that contains a FlowDimension.
Definition FlowUnit.h:67
A pipe carries fluid flow through the hydraulics system.
Definition Pipe.h:32
The relief valve is a hydraulic component that limits the pressure at some point in the system.
Definition ReliefValve.h:73
agx::Real getOpeningFraction() const
The opening fraction will always be a multiple of 1/num_drains, and will always be in the range [0....
agx::Real getFullyOpenPressure() const
agx::Real getDrainFlowRate() const
void setFullyOpenPressure(agx::Real fullyOpenPressure)
Set the pressure at which the drain should reach fully open.
agxHydraulics::FlowUnit * getChamber(agxPowerLine::Side side)
const agxHydraulics::FlowUnit * getInputChamber() const
agx::UInt32 getNumDrains() const
agxHydraulics::Pipe * getDrain(agx::UInt32 index)
ReliefValve(agx::Real crackingPressure, agx::Real fullyOpenPressure, agx::Real fullyOpenArea, agx::UInt32 numDrains=6)
Create a new relief valve.
const agxHydraulics::FlowUnit * getChamber(agxPowerLine::Side side) const
agxHydraulics::FlowUnit * getOutputChamber()
agx::Real getPressure() const
agxHydraulics::FlowConnector * getDrainConnector()
const agxHydraulics::Pipe * getDrain(agx::UInt32 index) const
void setPressures(agx::Real crackingPressure, agx::Real fullyOpenPressure)
Set the pressure range for the relief valve.
agxHydraulics::FlowUnit * getInputChamber()
agx::Constraint * getFlowBlockConstraint(agx::UInt32 index)
The implementation uses constraints to control when drain pipes should open or close.
const agxHydraulics::FlowUnit * getOutputChamber() const
agx::Real getCrackingPressure() const
void setCrackingPressure(agx::Real crackingPressure)
Set the pressure at which the drain should start to open.
Pure virtual class.
Definition Unit.h:72
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
Abstract base class for storing/restoring a line/drums with version control.
Utility class to hold custom implementations of constraints.
Definition agxUtil.h:464
The base class for a constraint.
Definition Constraint.h:89
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
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition Integer.h:32
double Real
Definition Real.h:42