1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/hydr/preselem.h,v 1.22 2017/01/12 14:46:32 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati	<masarati@aero.polimi.it>
9  * Paolo Mantegazza	<mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
30  */
31 
32 /*
33  * Copyright 1999-2000 Lamberto Puggelli <puggelli@tiscalinet.it>
34  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
35  */
36 
37 
38 #ifndef PRESELEM_H
39 #define PRESELEM_H
40 
41 #include "elem.h"
42 #include "presnode.h"
43 #include "drive.h"    /* per parametri variabili */
44 #include "strnode.h"  /* per attuatore */
45 
46 #include "hfluid.h"
47 
48 
49 extern const char* psHydraulicNames[];
50 
51 
52 /* HydraulicElem - begin */
53 
54 class HydraulicElem : virtual public Elem, public ElemWithDofs {
55  public:
56    /* Tipi di elementi idraulici */
57    enum Type {
58       UNKNOWN = -1,
59 
60 	MINOR_LOSS = 0,
61 	THREEWAYMINORLOSS,
62 	CONTROL_VALVE,
63 	DYNAMIC_CONTROL_VALVE,
64         PRESSURE_FLOW_CONTROL_VALVE,
65         PRESSURE_VALVE,
66 	FLOW_VALVE,
67 	ORIFICE,
68 	ACCUMULATOR,
69         TANK,
70         PIPE,
71         DYNAMIC_PIPE,
72 	HYDRAULIC_ACTUATOR,
73         ACTUATOR,
74 
75 	LASTHYDRAULICTYPE
76    };
77 
78  protected:
79    HydraulicFluid* HF;
80 
81  public:
82    HydraulicElem(unsigned int uL, const DofOwner* pDO,
83 		 HydraulicFluid* hf, flag fOut);
84    virtual ~HydraulicElem(void);
85 
86    /* Tipo dell'elemento (usato per debug ecc.) */
87    virtual Elem::Type GetElemType(void) const;
88 
89    /* Contributo al file di restart
90     * (Nota: e' incompleta, deve essere chiamata dalla funzione corrispndente
91     * relativa alla classe derivata */
92    virtual std::ostream& Restart(std::ostream& out) const;
93 
94    /* Tipo di elemento elettrico (usato solo per debug ecc.) */
95    virtual HydraulicElem::Type GetHydraulicType(void) const = 0;
96 };
97 
98 /* HydraulicElem - end */
99 
100 
101 class DataManager;
102 class MBDynParser;
103 
104 extern Elem* ReadHydraulicElem(DataManager* pDM,
105 			       MBDynParser& HP,
106 			       const DofOwner* pDO,
107 			       unsigned int uLabel);
108 
109 
110 #endif /* PRESELEM_H */
111