AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
VariableDisplacementPumpParameters.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_INTERNAL_UTILS_H
19#define AGXHYDRAULICS_INTERNAL_UTILS_H
20
21#include <agx/Referenced.h>
22
24
25namespace 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 AGXHYDRAULICS_EXPORT
VariableDisplacementPumpParameters(agx::Real cutoffPressure, agx::Real deadheadPressure, agx::Real internalLeakage, agx::Real flowRatio, agx::Real compensatorArea)
Base class providing referencing counted objects.
Definition Referenced.h:120
#define agxVerify(expr)
Definition debug.h:131
std::ostream & operator<<(std::ostream &stream, const VariableDisplacementPumpParameters &pumpParameters)
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition Accumulator.h:28
double Real
Definition Real.h:42
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)