MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
actuator.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/hydr/actuator.h,v 1.28 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 #ifndef ACTUATOR_H
38 #define ACTUATOR_H
39 
40 #include "preselem.h"
41 
42 /* Actuator - begin */
43 
44 class Actuator : virtual public Elem, public HydraulicElem {
45  private:
49  doublereal area1; /* area su cui agisce p1 */
50  doublereal area2; /* area su cui agisce p2 */
51 
52  doublereal dl; /* lunghezza della camera
53  * (a meno dello spessore del pistone) */
54 
55  const Vec3 axis; /* asse dell'attuatore */
56 
57  doublereal dp1; /* pressioni e derivate stati interni */
61 
68 
69  const StructNode* pNodeStr1; /* nodo strutturale 1 */
70  const StructNode* pNodeStr2; /* nodo strutturale 2 */
71  const Vec3 f1; /* offset nodo1 */
72  const Vec3 f2; /* offset nodo2 */
73 
74  public:
75  Actuator(unsigned int uL, const DofOwner* pD,
76  const PressureNode* p1, const PressureNode* p2,
77  const StructNode* pN1, const StructNode* pN2,
78  const Vec3& f1Tmp, const Vec3& f2Tmp,
79  const Vec3& axisTmp,
80  HydraulicFluid* hf1,
81  HydraulicFluid* hf2,
82  doublereal A_1, doublereal A_2,
83  doublereal l,
84  flag fOut);
85 
86  ~Actuator(void);
87 
88  /* Tipo di elemento idraulico (usato solo per debug ecc.) */
89  virtual HydraulicElem::Type GetHydraulicType(void) const;
90 
91  /* Contributo al file di restart */
92  virtual std::ostream& Restart(std::ostream& out) const;
93 
94  virtual unsigned int iGetNumDof(void) const;
95  virtual DofOrder::Order GetDofType(unsigned int i) const;
96  virtual DofOrder::Order GetEqType(unsigned int i) const;
97 
98  virtual void WorkSpaceDim(integer* piNumRows, integer* piNumCols) const;
99 
101  doublereal dCoef,
102  const VectorHandler& XCurr,
103  const VectorHandler& XPrimeCurr);
104 
106  doublereal dCoef,
107  const VectorHandler& XCurr,
108  const VectorHandler& XPrimeCurr);
109 
110  virtual void Output(OutputHandler& OH) const;
111 
112  virtual void SetValue(DataManager *pDM,
114  SimulationEntity::Hints *ph = 0);
115 
116  /* *******PER IL SOLUTORE PARALLELO******** */
117  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
118  utile per l'assemblaggio della matrice di connessione fra i dofs */
119  virtual void GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
120  connectedNodes.resize(4);
121  connectedNodes[0] = pNodeHyd1;
122  connectedNodes[1] = pNodeHyd2;
123  connectedNodes[2] = pNodeStr1;
124  connectedNodes[3] = pNodeStr2;
125  };
126  /* ************************************************ */
127 };
128 
129 /* Actuator - end */
130 
131 #endif
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: actuator.cc:367
doublereal dp2
Definition: actuator.h:58
Actuator(unsigned int uL, const DofOwner *pD, const PressureNode *p1, const PressureNode *p2, const StructNode *pN1, const StructNode *pN2, const Vec3 &f1Tmp, const Vec3 &f2Tmp, const Vec3 &axisTmp, HydraulicFluid *hf1, HydraulicFluid *hf2, doublereal A_1, doublereal A_2, doublereal l, flag fOut)
Definition: actuator.cc:100
long int flag
Definition: mbdyn.h:43
virtual HydraulicElem::Type GetHydraulicType(void) const
Definition: actuator.cc:152
const Vec3 f2
Definition: actuator.h:72
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
Definition: actuator.cc:479
Definition: matvec3.h:98
doublereal area2
Definition: actuator.h:50
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: actuator.cc:184
virtual std::ostream & Restart(std::ostream &out) const
Definition: actuator.cc:159
const PressureNode * pNodeHyd1
Definition: actuator.h:46
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: actuator.cc:193
doublereal dp1
Definition: actuator.h:57
virtual DofOrder::Order GetDofType(unsigned int i) const
Definition: actuator.cc:171
virtual void Output(OutputHandler &OH) const
Definition: actuator.cc:464
std::vector< Hint * > Hints
Definition: simentity.h:89
doublereal dl
Definition: actuator.h:52
doublereal Vol2
Definition: actuator.h:65
~Actuator(void)
Definition: actuator.cc:144
doublereal flow2
Definition: actuator.h:63
doublereal density2
Definition: actuator.h:67
virtual unsigned int iGetNumDof(void) const
Definition: actuator.cc:165
const Vec3 axis
Definition: actuator.h:55
const Vec3 f1
Definition: actuator.h:71
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: actuator.h:119
doublereal density1
Definition: actuator.h:66
HydraulicFluid * HF2
Definition: actuator.h:48
Definition: elem.h:75
doublereal dpP1
Definition: actuator.h:59
virtual DofOrder::Order GetEqType(unsigned int i) const
Definition: actuator.cc:177
doublereal flow1
Definition: actuator.h:62
doublereal dpP2
Definition: actuator.h:60
const StructNode * pNodeStr1
Definition: actuator.h:69
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
doublereal Vol1
Definition: actuator.h:64
doublereal area1
Definition: actuator.h:49
const PressureNode * pNodeHyd2
Definition: actuator.h:47
const StructNode * pNodeStr2
Definition: actuator.h:70