AGX Dynamics  2.37.3.2
VariableDisplacementPumpParameters.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_INTERNAL_UTILS_H
19 #define AGXHYDRAULICS_INTERNAL_UTILS_H
20 
21 #include <agx/Referenced.h>
22 
23 #include <agxHydraulics/FlowUnit.h>
24 
25 namespace agxHydraulics
26 {
27  class Pipe;
28  class Pump;
29  class PumpUnit;
30 
31  namespace detail
32  {
34 
40  {
41  public:
43  agx::Real cutoffPressure, agx::Real deadheadPressure,
44  agx::Real internalLeakage, agx::Real flowRatio,
45  agx::Real compensatorArea)
46  :
47  m_cutoffPressure(cutoffPressure),
48  m_deadheadPressure(deadheadPressure),
49  m_internalLeakage(internalLeakage),
50  m_flowRatio(flowRatio),
51  m_compensatorArea(compensatorArea),
52 
53  m_springConstant(force(deadheadPressure) - force(cutoffPressure)),
54  m_noFlowSpringElongation(elongation(deadheadPressure)),
55  m_fullFlowSpringElongation(elongation(cutoffPressure)),
56  m_noFlowPoppetPosition(poppetPosition(deadheadPressure)),
57  m_fullFlowPoppetPosition(poppetPosition(cutoffPressure))
58  {
59  // this->print(std::cout);
60  agxVerify(agx::equivalent(m_noFlowSpringElongation - m_fullFlowSpringElongation, agx::Real(1)));
61  }
62 
63  agx::Real cutoffPressure() const { return m_cutoffPressure; }
64  agx::Real deadheadPressure() const { return m_deadheadPressure; }
65  agx::Real internalLeakage() const { return m_internalLeakage; }
66  agx::Real flowRatio() const { return m_flowRatio; }
67  agx::Real compensatorArea() const { return m_compensatorArea; }
68  agx::Real springConstant() const { return m_springConstant; }
69  agx::Real noFlowSpringElongation() const { return m_noFlowSpringElongation; }
70  agx::Real fullFlowSpringElongation() const { return m_fullFlowSpringElongation; }
71  agx::Real springRestPosition() const { return m_noFlowSpringElongation; }
72  agx::Real noFlowPoppetPosition() const { return m_noFlowPoppetPosition; }
73  agx::Real fullFlowPoppetPosition() const { return m_fullFlowPoppetPosition; }
74 
76  {
77  return pressure * m_compensatorArea;
78  }
79 
81  {
82  return force(pressure) / m_springConstant;
83  }
84 
86  {
87  return m_noFlowSpringElongation - elongation(pressure);
88  }
89 
90 
91  void print(std::ostream& stream) const;
92 
93 
94 
95  private:
101 
103  {
104  return *this;
105  }
106 
107  private:
108  const agx::Real m_cutoffPressure;
109  const agx::Real m_deadheadPressure;
110  const agx::Real m_internalLeakage;
111  const agx::Real m_flowRatio;
112  const agx::Real m_compensatorArea;
113 
114  const agx::Real m_springConstant;
115  const agx::Real m_noFlowSpringElongation;
116  const agx::Real m_fullFlowSpringElongation;
117  const agx::Real m_noFlowPoppetPosition;
118  const agx::Real m_fullFlowPoppetPosition;
119  };
120 
121 
122  std::ostream& operator<<(std::ostream& stream, const VariableDisplacementPumpParameters& pumpParameters);
123 
124  } // namespace detail
125 
126 } // namespace agxHydraulics
127 
128 
129 
130 #endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define agxVerify(expr)
Definition: debug.h:131
Base class providing referencing counted objects.
Definition: Referenced.h:119
#define AGXHYDRAULICS_EXPORT
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:27
std::ostream & operator<<(std::ostream &stream, const VariableDisplacementPumpParameters &pumpParameters)
VariableDisplacementPumpParameters(agx::Real cutoffPressure, agx::Real deadheadPressure, agx::Real internalLeakage, agx::Real flowRatio, agx::Real compensatorArea)
double Real
Definition: Real.h:42