All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
leakage_line.h
1 /* Copyright (C) 2004-2009 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: markus.ms.schneider@gmail.com
18  */
19 
20 #ifndef _LEAKAGE_LINE_H_
21 #define _LEAKAGE_LINE_H_
22 
23 #include "mbsimHydraulics/hline.h"
24 
25 namespace MBSimControl {
26  class Signal;
27 }
28 
29 namespace MBSimHydraulics {
30 
31  class LeakagePressureLoss;
32  class PlaneLeakagePressureLoss;
33  class CircularLeakagePressureLoss;
34 
36  class LeakageLine : public RigidHLine {
37  public:
38  LeakageLine(const std::string &name) : RigidHLine(name), lpl(NULL), s1vSignal(NULL), s2vSignal(NULL), glSignal(NULL), s1vPath(""), s2vPath(""), glPath("") {}
39  ~LeakageLine();
40  virtual std::string getType() const { return "LeakageLine"; }
41 
42  void setGapLengthSignal(MBSimControl::Signal * s) {glSignal=s; }
43  double getGapLength() const;
44  void setSurface1VelocitySignal(MBSimControl::Signal * s) {s1vSignal=s; }
45  double getSurface1Velocity() const;
46  void setSurface2VelocitySignal(MBSimControl::Signal * s) {s2vSignal=s; }
47  double getSurface2Velocity() const;
48 
49  void init(InitStage stage);
50 
51  void initializeUsingXML(xercesc::DOMElement * element);
52  protected:
53  LeakagePressureLoss * lpl;
54  private:
55  MBSimControl::Signal *s1vSignal, *s2vSignal, *glSignal;
56  std::string s1vPath, s2vPath, glPath;
57  };
58 
60  class PlaneLeakageLine : public LeakageLine {
61  public:
62  PlaneLeakageLine(const std::string &name="") : LeakageLine(name), hGap(0), wGap(0) {};
63  virtual std::string getType() const { return "PlaneLeakageLine"; }
64 
65  void setGapWidth(double wGap_) {wGap=wGap_; }
66  double getGapWidth() const {return wGap; }
67  void setGapHeight(double hGap_) {hGap=hGap_; }
68  double getGapHeight() const {return hGap; }
69  void setPlaneLeakagePressureLoss(PlaneLeakagePressureLoss * plpl);
70 
71  void init(InitStage stage);
72 
73  void initializeUsingXML(xercesc::DOMElement * element);
74  private:
75  double hGap, wGap;
76  };
77 
80  public:
81  CircularLeakageLine(const std::string &name="") : LeakageLine(name), rI(0), rO(0), hGap(0) {}
82  virtual std::string getType() const { return "CircularLeakageLine"; }
83 
84  void setInnerRadius(double rI_) {rI=rI_; }
85  double getInnerRadius() const {return rI; }
86  void setGapHeight(double hGap_) {hGap=hGap_; }
87  double getGapHeight() const {return hGap; }
88  double getOuterRadius() const {return rO; }
89  void setCircularLeakagePressureLoss(CircularLeakagePressureLoss * clpl);
90 
91  void init(InitStage stage);
92 
93  void initializeUsingXML(xercesc::DOMElement * element);
94  private:
95  double rI, rO, hGap;
96  };
97 
98 }
99 
100 #endif /* ----- #ifndef _LEAKAGE_H_ ----- */
101 
Definition: leakage_line.h:36
Definition: hline.h:88
Definition: pressure_loss.h:273
Definition: pressure_loss.h:282
Definition: leakage_line.h:79
Definition: leakage_line.h:60
Definition: pressure_loss.h:293

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML