AGX Dynamics  2.37.2.0
NeedleValve.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_NEEDLE_VALVE_H
19 #define AGXHYDRAULICS_NEEDLE_VALVE_H
20 
21 #include <agxHydraulics/FlowUnit.h>
22 
23 
24 namespace agxHydraulics
25 {
27 
43  {
44  public:
49  NeedleValve(agx::Real maxOpeningArea, agx::Real fluidDensity);
50 
57  void setOpeningFraction(agx::Real fractionOfMax);
58 
65  void setOpeningDiameterFraction(agx::Real fractionOfMax);
66 
72  void setOpeningArea(agx::Real area);
73 
77  agx::Real getOpeningFraction() const;
78 
82  agx::Real getOpeningDiameterFraction() const;
83 
87  agx::Real getOpeningArea() const;
88 
92  agx::Real getMaxOpeningArea() const;
93 
99  void setFlowCoefficient(agx::Real coefficient);
100 
104  agx::Real getFlowCoefficient() const;
105 
110  void setCutoffArea(agx::Real cutoff);
111 
115  agx::Real getCutoffArea() const;
116 
117 
118  // Methods called by the rest of the power line framework.
119  public:
121  virtual agx::Real computeFrictionLoss(agx::Real flowRate) override;
123 
124 #ifndef SWIG
126 
129 #endif
130  protected:
131  NeedleValve();
132  virtual ~NeedleValve() {}
133 
134  // Just to get rid of warning C4512
135  NeedleValve& operator=(const NeedleValve&);
136 
137  private:
138  agx::Real m_maxOpeningArea;
139  agx::Real m_flowCoefficient;
140  agx::Real m_cutoffArea;
141  agx::Real m_minFlowRateForLossCalculation;
142  bool m_closed;
143  };
144 }
145 
146 
147 
148 #endif
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
A needle valve represents a controllable orifice opening.
Definition: NeedleValve.h:42
#define AGXHYDRAULICS_EXPORT
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:27
#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
double Real
Definition: Real.h:42
#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