All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
controlvalve43.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 _CONTROLVALVE43_H_
21 #define _CONTROLVALVE43_H_
22 
23 #include "mbsim/group.h"
24 #include <mbsim/functions/function.h>
25 #include <boost/shared_ptr.hpp>
26 
27 namespace MBSimControl {
28  class Signal;
29 }
30 
31 namespace MBSimHydraulics {
32 
33  class ClosableRigidLine;
34  class RigidNode;
35  class HLine;
36 
38  class Controlvalve43 : public MBSim::Group {
39  public:
40  Controlvalve43(const std::string& name="");
41 
42  void init(InitStage stage);
43  void initializeUsingXML(xercesc::DOMElement * element);
44 
45  void setLength(double l_);
46  void setDiameter(double d_);
47  void setAlpha(double alpha_, double alphaBack_=0);
48  void setPARelativeAlphaFunction(MBSim::Function<double(double)> * relAlphaPA_) {
49  relAlphaPA=boost::shared_ptr<MBSim::Function<double(double)> >(relAlphaPA_);
50  relAlphaPA->setParent(this);
51  relAlphaPA->setName("PARealtvieAlpha");
52  }
53  void setMinimalRelativeAlpha(double minRelAlpha_);
54  void setOffset(double off) {offset=off; }
55  void setRelativePositionSignal(MBSimControl::Signal * s) {position = s; }
56  void setSetValued(bool setValued=true);
57  void setPInflow(HLine * hl);
58  void setAOutflow(HLine * hl);
59  void setBOutflow(HLine * hl);
60  void setTOutflow(HLine * hl);
61  void printRelativeAlphaCharacteristikCurve(bool print=true) {pRACC=print; }
62 
63  protected:
64  ClosableRigidLine * lPA, * lPB, * lAT, * lBT;
65  RigidNode * nP, * nA, * nB, * nT;
66  double offset;
67  boost::shared_ptr<MBSim::Function<double(double)> > relAlphaPA;
68  MBSimControl::Signal * position;
69  MBSimControl::Signal * checkSizeSignalPA, * checkSizeSignalPB, * checkSizeSignalAT, * checkSizeSignalBT;
70 
71  private:
72  std::string positionString;
73  std::string nPInflowString, nAOutflowString, nBOutflowString, nTOutflowString;
74  bool pRACC;
75  };
76 }
77 
78 #endif /* ----- #ifndef _CONTROLVALVE43_H_ ----- */
79 
Definition: hnode.h:187
Definition: hline.h:41
Definition: rigid_line.h:59
Definition: controlvalve43.h:38

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML