AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
NeedleValve.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_NEEDLE_VALVE_H
19#define AGXHYDRAULICS_NEEDLE_VALVE_H
20
22
23
24namespace 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
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:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#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.
NeedleValve & operator=(const NeedleValve &)
agx::Real getOpeningFraction() const
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 restore(agxStream::StorageStream &str)
Restores internal data from stream.
virtual bool store(agxStream::StorageStream &str) const
Stores internal data into 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