MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
aeromodal.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/aero/aeromodal.h,v 1.33 2017/01/12 14:45:58 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 /* Elemento aerodinamico modale */
33 
34 /* Aerodynamic Modal Element by Giuseppe Quaranta (C) - March 2002
35  * <quaranta@aero.polimi.it>
36  *
37  * This element is connected to a modal joint element.
38  * It needs a state-space representation of the instationary
39  * generalized aerodynamic forces of the following type:
40  *
41  * xa' = A*xa + B*q
42  * Fa = (1/2*rho*V^2) * ((c/2*V)^2*D2*q'' + (c/2*V)*D1*q'+ D0*q + C*xa)
43  * where
44  * xa are the aerodynamic states
45  * q are the modal coordinates (structural)
46  *
47  * The matrices A, B, C, D0, D1, D2 can be computed starting from the
48  * knowledge of the generalized aerodynamic forces frequency response
49  * H(jw,M).
50  * The current model can only deal with data relative to a specific Mach number.
51  * Future development will include:
52  * - aerodinamic forces generated by wind gust (FIXME: DONE?);
53  * - the capability to handle data at various Mach numbers;
54  * - the effect unsteady aerodynamic forces related to rigid-body motion (FIXME: DONE?).
55  */
56 
57 #ifndef AerodynamicModal_hh
58 #define AerodynamicModal_hh
59 
60 #include "myassert.h"
61 #include "mynewmem.h"
62 #include "elem.h"
63 #include "aerodyn.h"
64 #include "modal.h"
65 #include "spmapmh.h"
66 
67 /* AerodynamicModal - begin */
68 
70  virtual public Elem,
71  public AerodynamicElem,
72  public InitialAssemblyElem
73 {
74 protected:
75  const StructNode* pModalNode; /* Nodo modale per il moto rigido */
76  const Modal* pModalJoint; /* puntatore all'elemento modale di riferimento */
77  Vec3 P0; /* Posizione iniziale nodo modale */
78  Mat3x3 R0; /* Rotazione iniziale nel sistema aerodinamico del nodo modale */
79  const Mat3x3 Ra; /* Rotaz. del sistema aerodinamico al nodo */
80 
81  doublereal Chord; /* Reference Cord */
82  unsigned int NStModes; /* Numero di modi strutturali */
83  unsigned int NAeroStates; /* Numero stati aerodinamici */
84  unsigned int NGust; /* Numero ingressi raffica */
85 
86  SpMapMatrixHandler* pA; /* Vettore degli autovalori del sistema aerodinamco */
87  FullMatrixHandler* pB; /* Matrici del modello agli stati dell'aerodinamica */
92 
93  MyVectorHandler* pq; /* coordinate modali */
94  MyVectorHandler* pqPrime; /* velocita' modali */
95  MyVectorHandler* pqSec; /* accelerazioni modali */
96 
97  MyVectorHandler* pxa; /* coordinate modali aerodinamiche*/
98  MyVectorHandler* pxaPrime; /* velocita' modali aerodinamiche*/
99 
100  MyVectorHandler* pgs; /* coordinate modali raffica*/
101  MyVectorHandler* pgsPrime; /* derivate prime modali raffica*/
102 
103  const doublereal gustVff; /* frequenza di taglio filtro passa basso raffica */
104  const doublereal gustXi; /* smorzamento filtro del secondo ordine raffica */
105 
106 public:
107  enum RigidF_t {
108  NO_RIGID = 0,
109  RIGID = 6
110  };
111 
112 protected:
113  RigidF_t RigidF; /* Numero di gdl del corpo rigido */
114 
115  /* Assemblaggio residuo */
116  void AssVec(SubVectorHandler& WorkVec);
117 
118 public:
119  AerodynamicModal(unsigned int uLabel,
120  const StructNode* pN,
121  const Modal* pMJ,
122  const Mat3x3& RaTmp,
123  const DofOwner* pDO,
124  doublereal Cd,
125  const int NModal,
126  const int NAero,
127  RigidF_t rgF,
128  const int Gust,
129  const doublereal Vff,
130  SpMapMatrixHandler* pAMat,
131  FullMatrixHandler* pBMat,
132  FullMatrixHandler* pCMat,
133  FullMatrixHandler* pD0Mat,
134  FullMatrixHandler* pD1Mat,
135  FullMatrixHandler* pD2Mat,
136  flag fout);
137 
138  ~AerodynamicModal(void);
139 
140  /* Scrive il contributo dell'elemento al file di restart */
141  std::ostream& Restart(std::ostream& out) const;
142 
143  /* ritorna il numero di Dofs per gli elementi che sono anche DofOwners */
144  unsigned int iGetNumDof(void) const {
145  return NAeroStates + NGust*2;
146  };
147 
148  /* esegue operazioni sui dof di proprieta' dell'elemento */
149  DofOrder::Order GetDofType(unsigned int i) const {
150  /* gradi di liberta' differenziali (eq. modali) */
151  ASSERT(i < iGetNumDof());
152  return DofOrder::DIFFERENTIAL;
153  };
154 
155  /* Tipo dell'elemento (usato per debug ecc.) */
156  Elem::Type GetElemType(void) const {
157  return Elem::AEROMODAL;
158  };
159 
160  /* funzioni proprie */
161 
162  /* Dimensioni del workspace */
163  void WorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
164  *piNumRows = NAeroStates + NStModes + NGust*2;
165  *piNumCols = NAeroStates + 2*NStModes + NGust*2;
166  };
167 
168  /* assemblaggio jacobiano */
171  doublereal dCoef ,
172  const VectorHandler& /* XCurr */ ,
173  const VectorHandler& /* XPrimeCurr */);
174 
175  /* assemblaggio residuo */
177  AssRes(SubVectorHandler& WorkVec,
178  doublereal dCoef,
179  const VectorHandler& XCurr,
180  const VectorHandler& XPrimeCurr);
181 
182  /* output; si assume che ogni tipo di elemento sappia, attraverso
183  * l'OutputHandler, dove scrivere il proprio output */
184  void Output(OutputHandler& OH) const;
185 
186  /* Numero di GDL iniziali */
187  unsigned int iGetInitialNumDof(void) const {
188  return NAeroStates + NGust*2;
189  };
190 
191  /* Dimensioni del workspace */
192  void
193  InitialWorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
194  *piNumRows = NAeroStates + NStModes + NGust*2;
195  *piNumCols = NAeroStates + 2*NStModes + NGust*2;
196  };
197 
198  /* assemblaggio jacobiano */
201  const VectorHandler& XCurr)
202  {
203  DEBUGCOUTFNAME("AerodynamicModal::InitialAssJac");
204  AssJac(WorkMat, 0, XCurr, XCurr);
205  return WorkMat;
206  };
207 
208  /* assemblaggio residuo */
210  InitialAssRes(SubVectorHandler& WorkVec, const VectorHandler& XCurr);
211 
212  /* Tipo di elemento aerodinamico */
215  };
216 
217  /* *******PER IL SOLUTORE PARALLELO******** */
218  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
219  * utile per l'assemblaggio della matrice di connessione fra i dofs */
220  virtual void
221  GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
222  connectedNodes.resize(1);
223  connectedNodes[0] = pModalNode;
224  };
225  /* ************************************************ */
226 };
227 
228 /* AerodynamicModal - end */
229 
230 class DataManager;
231 class MBDynParser;
232 
233 extern Elem*
235  const DofOwner* pDO, unsigned int uLabel);
236 
237 #endif /* AerodynamicModal_hh */
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: aeromodal.cc:278
MyVectorHandler * pq
Definition: aeromodal.h:93
const StructNode * pModalNode
Definition: aeromodal.h:75
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: aeromodal.h:200
DofOrder::Order GetDofType(unsigned int i) const
Definition: aeromodal.h:149
void AssVec(SubVectorHandler &WorkVec)
Definition: aeromodal.cc:430
unsigned int iGetInitialNumDof(void) const
Definition: aeromodal.h:187
FullMatrixHandler * pB
Definition: aeromodal.h:87
long int flag
Definition: mbdyn.h:43
Definition: matvec3.h:98
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: aeromodal.h:163
void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: aeromodal.h:193
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
unsigned int NStModes
Definition: aeromodal.h:82
FullMatrixHandler * pC
Definition: aeromodal.h:88
SpMapMatrixHandler * pA
Definition: aeromodal.h:86
FullMatrixHandler * pD2
Definition: aeromodal.h:91
Elem::Type GetElemType(void) const
Definition: aeromodal.h:156
const Mat3x3 Ra
Definition: aeromodal.h:79
MyVectorHandler * pgs
Definition: aeromodal.h:100
~AerodynamicModal(void)
Definition: aeromodal.cc:102
MyVectorHandler * pqSec
Definition: aeromodal.h:95
const Modal * pModalJoint
Definition: aeromodal.h:76
MyVectorHandler * pxaPrime
Definition: aeromodal.h:98
FullMatrixHandler * pD0
Definition: aeromodal.h:89
RigidF_t RigidF
Definition: aeromodal.h:113
Definition: modal.h:74
MyVectorHandler * pxa
Definition: aeromodal.h:97
std::ostream & Restart(std::ostream &out) const
Definition: aeromodal.cc:142
unsigned int iGetNumDof(void) const
Definition: aeromodal.h:144
const doublereal gustVff
Definition: aeromodal.h:103
DataManager * pDM
Definition: mbpar.h:252
const doublereal gustXi
Definition: aeromodal.h:104
Definition: gust.h:44
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: aeromodal.h:221
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: aeromodal.cc:350
unsigned int NAeroStates
Definition: aeromodal.h:83
doublereal Chord
Definition: aeromodal.h:81
unsigned int uLabel
Definition: withlab.h:44
#define ASSERT(expression)
Definition: colamd.c:977
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &, const VectorHandler &)
Definition: aeromodal.cc:149
void Output(OutputHandler &OH) const
Definition: aeromodal.cc:595
MyVectorHandler * pqPrime
Definition: aeromodal.h:94
AerodynamicModal(unsigned int uLabel, const StructNode *pN, const Modal *pMJ, const Mat3x3 &RaTmp, const DofOwner *pDO, doublereal Cd, const int NModal, const int NAero, RigidF_t rgF, const int Gust, const doublereal Vff, SpMapMatrixHandler *pAMat, FullMatrixHandler *pBMat, FullMatrixHandler *pCMat, FullMatrixHandler *pD0Mat, FullMatrixHandler *pD1Mat, FullMatrixHandler *pD2Mat, flag fout)
Definition: aeromodal.cc:43
Definition: elem.h:75
Type
Definition: elem.h:91
FullMatrixHandler * pD1
Definition: aeromodal.h:90
MyVectorHandler * pgsPrime
Definition: aeromodal.h:101
Elem * ReadAerodynamicModal(DataManager *pDM, MBDynParser &HP, const DofOwner *pDO, unsigned int uLabel)
Definition: aeromodal.cc:612
unsigned int NGust
Definition: aeromodal.h:84
AerodynamicElem::Type GetAerodynamicElemType(void) const
Definition: aeromodal.h:213
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51