1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/aero/aerodyn_.h,v 1.23 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 /* Elementi aerodinamici 33 * 34 * - Proprieta' dell'aria: 35 * elemento unico, contiene: 36 * - direzione e modulo del vento relativo. Il modulo e' associato 37 * ad un driver che ne consente la variazione, per consentire la 38 * simulazione di un transitorio di galleria. 39 * Verra' aggiunta una variazione della direzione per simulare la raffica. 40 * - densita' dell'aria 41 * - celerita' del suono 42 * - ... 43 * 44 * - Elemento di rotore: 45 * classe virtuale che possiede alcuni dati topologici e geometrici di rotore 46 * ed i metodi per calcolare grandezze utili agli elementi aerodinamici che 47 * fanno parte di un rotore 48 * 49 * - Elemento aerodinamico: 50 * stazionario o quasi-stazionario, con metodo p-k di ordine 0, 1 o 2, 51 * associato ad un corpo rigido, basato sulla strip theory. 52 * 53 * - Elemento aerodinamico: 54 * analogo al precedente, ma associato alla trave a Volumi Finiti a tre nodi 55 * 56 * - Elemento aerodinamico instazionario: 57 * in fase di sviluppo, modella dinamicamente alcuni stati a dare 58 * il comportamento instazionario di una superficie aerodinamica 59 * modellata con la strip theory 60 * 61 * - Elemento Aerodinamico modale: 62 * in fase di sviluppo, contiene una rappresentazione agli stati delle forze 63 * aerodinamiche generalizzate associate ai modi di vibrare e alle raffiche 64 * deve essere associato ad un elemento modale su cui il modello si appoggia. 65 * 66 * -Elemento aerodinamico external: 67 * in fase di sviluppo, elemento che permette di svolgere simulazioni 68 * integrate di interazioni fluido-struttura interfacciando MBDyn con 69 * codici aerodynamici esterni. L'elemento manda all'esterno le informazioni 70 * riguardo alla posizione dei nodi associati e ottiene i carichi che il codice 71 * aerodinamico esterno genera 72 * 73 * 74 */ 75 76 #ifndef AERODYN__H 77 #define AERODYN__H 78 79 #include "aerodyn.h" 80 81 /* BasicAirProperties - begin */ 82 83 class BasicAirProperties 84 : virtual public Elem, public AirProperties { 85 protected: 86 DriveOwner AirDensity; 87 doublereal dSoundSpeed; 88 89 public: 90 BasicAirProperties(const TplDriveCaller<Vec3>* pDC, 91 const DriveCaller *pRho, doublereal dSS, std::vector<const Gust *>& g, 92 const RigidBodyKinematics *pRBK, 93 flag fOut); 94 95 virtual ~BasicAirProperties(void); 96 97 /* Scrive il contributo dell'elemento al file di restart */ 98 virtual std::ostream& Restart(std::ostream& out) const; 99 100 /* 101 * Deprecated; use GetAirProps instead 102 */ 103 virtual doublereal dGetAirDensity(const Vec3& /* X */ ) const; 104 105 virtual doublereal dGetAirPressure(const Vec3& /* X */ ) const; 106 107 virtual doublereal dGetAirTemperature(const Vec3& /* X */ ) const; 108 109 virtual doublereal dGetSoundSpeed(const Vec3& /* X */ ) const; 110 111 /* 112 * End of deprecated; use GetAirProps instead 113 */ 114 115 virtual bool GetAirProps(const Vec3& X, doublereal& rho, 116 doublereal& c, doublereal& p, doublereal& T) const; 117 }; 118 119 /* BasicAirProperties - end */ 120 121 122 /* StdAirProperties - begin */ 123 124 class StdAirProperties 125 : virtual public Elem, public AirProperties { 126 protected: 127 doublereal PRef; 128 const DriveCaller *RhoRef; 129 doublereal TRef; 130 doublereal a; 131 doublereal R; 132 doublereal g0; 133 doublereal z0; 134 doublereal z1; 135 // NOTE: z2 unused right now 136 doublereal z2; 137 138 public: 139 StdAirProperties(const TplDriveCaller<Vec3>* pDC, 140 doublereal PRef, const DriveCaller *RhoRef, doublereal TRef, 141 doublereal a, doublereal R, doublereal g0, 142 doublereal z0, doublereal z1, doublereal z2, 143 std::vector<const Gust *>& g, 144 const RigidBodyKinematics *pRBK, 145 flag fOut); 146 147 virtual ~StdAirProperties(void); 148 149 /* Scrive il contributo dell'elemento al file di restart */ 150 virtual std::ostream& Restart(std::ostream& out) const; 151 152 /* 153 * Deprecated; use GetAirProps instead 154 */ 155 virtual doublereal dGetAirDensity(const Vec3& /* X */ ) const; 156 157 virtual doublereal dGetAirPressure(const Vec3& /* X */ ) const; 158 159 virtual doublereal dGetAirTemperature(const Vec3& /* X */ ) const; 160 161 virtual doublereal dGetSoundSpeed(const Vec3& /* X */ ) const; 162 163 /* 164 * End of deprecated; use GetAirProps instead 165 */ 166 167 virtual bool GetAirProps(const Vec3& X, doublereal& rho, 168 doublereal& c, doublereal& p, doublereal& T) const; 169 }; 170 171 /* StdAirProperties - end */ 172 173 #endif /* AERODYN__H */ 174 175