From: Konrad H. <ko...@ne...> - 2000-02-13 17:49:10
|
All -- What will be the scope of the Rocket WorkBench ? My wish list would be: 1. Physical Description 2. Aerodynamics ( Drag and Stability ) 3. Powerplant 4. Environmental I suppose we might want to begin with a data structure that describes a rocket. I started working on a similar project a few years ago but ran out of time between my real job and my work on the AltAcc. Below is my first stab at a data structure describing a rocket. It is nowhere near complete or even correct as far as it goes. it is a start. Input ? Let's get ready to rumble ! -- kjh /************************** rocket.h ********************************/ struct AtmProf /* optional Atmospheric Info for Sims */ { AtmProf * prev; /* linked list ... pointer to prev element */ AtmProf * next; /* linked list ... pointer to next element */ double alt; /* altitude of measurement */ double press; /* measured barometric pressure */ double temp; /* measured temperature */ double humidity; /* measured humidity */ double rho; /* computed air density */ double viscosity; /* computed air viscosity */ double dirwind; /* measured wind direction (NSEW) */ double velwind; /* measured wind velocity */ }; struct Site /* Launch Site Environmental Data */ { double ialt; /* Site Altitude */ double bpress; /* Site Barometric Pressure */ double temp; /* Site Temperature */ double rho0; /* Site Air Density ( computed ) */ double rodlen; /* Launch Rod Length */ double theta; /* Launch Angle */ double falt; /* Final Altitude for Sim ( crash Alt ;-) */ atmos * AtmProf; /* [O] pointer to Atmospheric Profile */ }; struct CD /* optional CD vs Velocity data */ { CD * next; /* linked list; pointer to previous */ CD * prev ; double mach; /* mach number */ double rnumber; /* computed Reynolds Number */ double coff; /* CD at CD.mach */ }; struct Vertex /* Fin Vertices Details */ { Vertex * prev; /* linked list */ Vertex * next; double z; double r; }; struct Fins /* Fin Geometry Info */ { int numfin; /* number of fins */ double offset; /* offset from leading tip of stage */ double thickness; /* max thickness */ double farea; /* fin surface area */ int shape; /* enumerated fin shape ( Poly, Para, Ellip */ int numvert; /* number of vertices */ Vertex * vertices; /* [O] optional pointer to Vertex.z, .r */ double fdiam; /* diameter at front of fin can */ double rdiam; /* diameter at rear of fin can */ double span; /* fin span */ double root; /* root chord length */ double tip; /* tip chord length */ double midchord; /* mid chord length */ double sweepback ; /* sweepback distance */ double parea; /* plan area of fincan */ double aspectratio; /* aspect ratio */ }; struct Thrust /* Linked List Thrust Curve Tuples */ { Thrust * next; Thrust * prev; double time; double thrust; }; struct Motor /* Stolen from RASP ;-) */ { char * name; /* engine name */ char * mfg; /* manufacturer info */ double diam; /* engine diameter (millimeters) */ double len; /* engine length (millimeters) */ double mass; /* initial engine wt. (kilograms) */ double promass; /* propellant wt. (kilograms) */ double dtime; /* thrust duration (seconds) */ Thrust * tcurve; /* thrust curve (Time-sec,Thrust-Newtons) */ double i_avg; /* average thrust (newtons) */ double i_tot; /* total impulse (newton-seconds) */ double i_max; /* peak thrust (newtons) */ char * delay; /* ejection delays available (sec) */ Motor * next; /* linked list of motors */ }; struct Stage /* stolen from rasp v4.1 -- needs more ! */ { int nose ; /* nose type on stage */ double length; /* length of stage */ double diameter; /* max diameter of stage */ CD * cd; /* kjh added cd per stage */ double totalw; /* launch wt of stage ( w/ motors(s) ) */ double dryw; /* dry stage wt ( w/o motor(s) ) */ double prowt; /* propellant wt of all motors */ Motor * motors; /* pointer to motor structure */ double itime; /* Start of motors ( time since LO ) */ double etime; /* End of engine burn ( absolute time ) */ double dtime; /* When is the Stage dropped from the rest */ Thrust * thrust; /* sum of all motors or ->motors.tcurve */ Fin * fins; /* finfo for stage */ Stage * next; /* next Stage ( From Bottom, Up ) */ Stage * prev; /* previous Stage ( just burned out ) */ }; struct Rocket /* What is in a rocket */ { char * name; int nose ; double diameter; double length ; Stage * stages ; Site * environ ; }; struct NoseCones { char * name ; /* Verbose Nose Cone Name */ int form ; /* M,C&B Formula to Apply */ } Noses [ ] = { "undefined", 1 , "ogive", 1 , "conic", 1 , "elliptic", 2 , "parabolic", 2 , "blunt", 2 } ; struct FinShapes { char * name ; /* Verbose Fin Shape Name */ int form ; /* Enum Data */ } FinShape [ ] = { "undefined", 0 , "polygonal", 1 , "elliptical", 2 , "parabolic", 3 } ; #define NUMFINTYPE ( sizeof FinShapes / sizeof ( struct FinShape )) |