|
mbsimhydraulics
3.2.0
|
00001 /* Copyright (C) 2004-2009 MBSim Development Team 00002 * 00003 * This library is free software; you can redistribute it and/or 00004 * modify it under the terms of the GNU Lesser General Public 00005 * License as published by the Free Software Foundation; either 00006 * version 2.1 of the License, or (at your option) any later version. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 * Contact: markus.ms.schneider@gmail.com 00018 */ 00019 00020 #ifndef _CONTROLVALVE43_H_ 00021 #define _CONTROLVALVE43_H_ 00022 00023 #include "mbsim/group.h" 00024 #include "mbsim/utils/function.h" 00025 00026 namespace MBSimControl { 00027 class Signal; 00028 } 00029 00030 namespace MBSimHydraulics { 00031 00032 class ClosableRigidLine; 00033 class RigidNode; 00034 class HLine; 00035 00037 class Controlvalve43 : public MBSim::Group { 00038 public: 00039 Controlvalve43(const std::string& name=""); 00040 00041 void init(MBSim::InitStage stage); 00042 void initializeUsingXML(MBXMLUtils::TiXmlElement * element); 00043 00044 void setLength(double l_); 00045 void setDiameter(double d_); 00046 void setAlpha(double alpha_, double alphaBack_=0); 00047 void setPARelativeAlphaFunction(MBSim::Function1<double, double> * relAlphaPA_) {relAlphaPA=relAlphaPA_; } 00048 void setMinimalRelativeAlpha(double minRelAlpha_); 00049 void setOffset(double off) {offset=off; } 00050 void setRelativePositionSignal(MBSimControl::Signal * s) {position = s; } 00051 void setSetValued(bool setValued=true); 00052 void setPInflow(HLine * hl); 00053 void setAOutflow(HLine * hl); 00054 void setBOutflow(HLine * hl); 00055 void setTOutflow(HLine * hl); 00056 void printRelativeAlphaCharacteristikCurve(bool print=true) {pRACC=print; } 00057 00058 protected: 00059 ClosableRigidLine * lPA, * lPB, * lAT, * lBT; 00060 RigidNode * nP, * nA, * nB, * nT; 00061 double offset; 00062 MBSim::Function1<double, double> * relAlphaPA; 00063 MBSimControl::Signal * position; 00064 MBSimControl::Signal * checkSizeSignalPA, * checkSizeSignalPB, * checkSizeSignalAT, * checkSizeSignalBT; 00065 00066 private: 00067 std::string positionString; 00068 std::string nPInflowString, nAOutflowString, nBOutflowString, nTOutflowString; 00069 bool pRACC; 00070 }; 00071 } 00072 00073 #endif /* ----- #ifndef _CONTROLVALVE43_H_ ----- */ 00074
1.8.0