AGX Dynamics  2.37.2.0
CheckValve.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 AGXHYDRAULIC_CHECK_VALVE_H
19 #define AGXHYDRAULIC_CHECK_VALVE_H
20 
22 
23 namespace agxHydraulics
24 {
26 
35  {
36  public:
38  {
41  };
42 
51  CheckValve(agx::Real length, agx::Real area, agx::Real density, AllowedDirection direction = FORWARD);
52 
62  void setAllowedDirection(AllowedDirection direction);
63 
67  AllowedDirection getAllowedDirection() const;
68 
76  agxHydraulics::FlowBlockConstraint* getFlowBlockConstraint();
77  const agxHydraulics::FlowBlockConstraint* getFlowBlockConstraint() const;
78 
79 
80  // Methods called by the rest of the PowerLine/Hydraulics frame work.
81  public:
87  virtual bool addNotification(agxSDK::Simulation* simulation) override;
88 
89 #ifndef SWIG
90 
93  virtual bool removeNotification(agxUtil::ConstraintHolder* constraintHolder, agxSDK::Simulation* simulation) override;
94 
95  virtual bool store(agxStream::StorageStream& str) const override;
96  virtual bool postStore(agxStream::StorageStream& str) const override;
97 
98  virtual bool restore(agxStream::StorageStream& str) override;
99  virtual bool postRestore(agxStream::StorageStream& str) override;
100 #endif
103 
104  protected:
105  CheckValve();
106  virtual ~CheckValve() {}
107 
112  void updateFlowDirection();
113 
114  private:
116  agxHydraulics::FlowBlockConstraintRef m_flowBlockConstraint;
117 
120  AllowedDirection m_allowedDirection;
121  };
122 
123 }
124 
125 
126 #endif
Utility class to hold custom implementations of constraints.
Definition: agxUtil.h:463
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
A check valve is a FlowUnit that only allows flow in one direction.
Definition: CheckValve.h:34
#define AGXHYDRAULICS_EXPORT
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:27
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
#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
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
#define AGXHYDRAULICS_FLOWDIRECTION_BACKWARD
Definition: FlowDirection.h:24
double Real
Definition: Real.h:42
#define AGXHYDRAULICS_FLOWDIRECTION_FORWARD
Definition: FlowDirection.h:23
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
FlowUnit is the base class for Units that contains a FlowDimension.
Definition: FlowUnit.h:66