|
mbsimhydraulics
4.0.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/functions/function.h> 00025 #include <boost/shared_ptr.hpp> 00026 00027 namespace MBSimControl { 00028 class Signal; 00029 } 00030 00031 namespace MBSimHydraulics { 00032 00033 class ClosableRigidLine; 00034 class RigidNode; 00035 class HLine; 00036 00038 class Controlvalve43 : public MBSim::Group { 00039 public: 00040 Controlvalve43(const std::string& name=""); 00041 00042 void init(InitStage stage); 00043 void initializeUsingXML(xercesc::DOMElement * element); 00044 00045 void setLength(double l_); 00046 void setDiameter(double d_); 00047 void setAlpha(double alpha_, double alphaBack_=0); 00048 void setPARelativeAlphaFunction(MBSim::Function<double(double)> * relAlphaPA_) { 00049 relAlphaPA=boost::shared_ptr<MBSim::Function<double(double)> >(relAlphaPA_); 00050 relAlphaPA->setParent(this); 00051 relAlphaPA->setName("PARealtvieAlpha"); 00052 } 00053 void setMinimalRelativeAlpha(double minRelAlpha_); 00054 void setOffset(double off) {offset=off; } 00055 void setRelativePositionSignal(MBSimControl::Signal * s) {position = s; } 00056 void setSetValued(bool setValued=true); 00057 void setPInflow(HLine * hl); 00058 void setAOutflow(HLine * hl); 00059 void setBOutflow(HLine * hl); 00060 void setTOutflow(HLine * hl); 00061 void printRelativeAlphaCharacteristikCurve(bool print=true) {pRACC=print; } 00062 00063 protected: 00064 ClosableRigidLine * lPA, * lPB, * lAT, * lBT; 00065 RigidNode * nP, * nA, * nB, * nT; 00066 double offset; 00067 boost::shared_ptr<MBSim::Function<double(double)> > relAlphaPA; 00068 MBSimControl::Signal * position; 00069 MBSimControl::Signal * checkSizeSignalPA, * checkSizeSignalPB, * checkSizeSignalAT, * checkSizeSignalBT; 00070 00071 private: 00072 std::string positionString; 00073 std::string nPInflowString, nAOutflowString, nBOutflowString, nTOutflowString; 00074 bool pRACC; 00075 }; 00076 } 00077 00078 #endif /* ----- #ifndef _CONTROLVALVE43_H_ ----- */ 00079
1.8.0