|
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 <fmatvec/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(fmatvec::Function<double(double)> * relAlphaPA_) {relAlphaPA=boost::shared_ptr<fmatvec::Function<double(double)> >(relAlphaPA_); } 00049 void setMinimalRelativeAlpha(double minRelAlpha_); 00050 void setOffset(double off) {offset=off; } 00051 void setRelativePositionSignal(MBSimControl::Signal * s) {position = s; } 00052 void setSetValued(bool setValued=true); 00053 void setPInflow(HLine * hl); 00054 void setAOutflow(HLine * hl); 00055 void setBOutflow(HLine * hl); 00056 void setTOutflow(HLine * hl); 00057 void printRelativeAlphaCharacteristikCurve(bool print=true) {pRACC=print; } 00058 00059 protected: 00060 ClosableRigidLine * lPA, * lPB, * lAT, * lBT; 00061 RigidNode * nP, * nA, * nB, * nT; 00062 double offset; 00063 boost::shared_ptr<fmatvec::Function<double(double)> > relAlphaPA; 00064 MBSimControl::Signal * position; 00065 MBSimControl::Signal * checkSizeSignalPA, * checkSizeSignalPB, * checkSizeSignalAT, * checkSizeSignalBT; 00066 00067 private: 00068 std::string positionString; 00069 std::string nPInflowString, nAOutflowString, nBOutflowString, nTOutflowString; 00070 bool pRACC; 00071 }; 00072 } 00073 00074 #endif /* ----- #ifndef _CONTROLVALVE43_H_ ----- */ 00075
1.8.0