AGX Dynamics  2.35.0.1
NeedleValve.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 
66 
73 
78 
83 
88 
93 
99  void setFlowCoefficient(agx::Real coefficient);
100 
105 
110  void setCutoffArea(agx::Real cutoff);
111 
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:
132  virtual ~NeedleValve() {}
133 
134  // Just to get rid of warning C4512
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
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#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
#define AGXHYDRAULICS_EXPORT
FlowUnit is the base class for Units that contains a FlowDimension.
Definition: FlowUnit.h:67
A needle valve represents a controllable orifice opening.
Definition: NeedleValve.h:43
agx::Real getMaxOpeningArea() const
agx::Real getFlowCoefficient() const
void setOpeningDiameterFraction(agx::Real fractionOfMax)
Set the orifice opening diameter using an argument in the range [0..1] that represents diameters betw...
void setCutoffArea(agx::Real cutoff)
Set smallest area that the needle valve is allowed to have.
void setOpeningArea(agx::Real area)
Set the area of the valve directly.
agx::Real getOpeningDiameterFraction() const
agx::Real getCutoffArea() const
void setFlowCoefficient(agx::Real coefficient)
Set the flow coefficient of the valve.
agx::Real getOpeningArea() const
NeedleValve(agx::Real maxOpeningArea, agx::Real fluidDensity)
Create a new needle valve with the given area and fluid density.
agx::Real getOpeningFraction() const
NeedleValve & operator=(const NeedleValve &)
void setOpeningFraction(agx::Real fractionOfMax)
Set the orifice opening area using an argument in the range [0..1] that repsents areas between 0 and ...
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
#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
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:42