Showing posts with label simulation. Show all posts
Showing posts with label simulation. Show all posts

Thursday, 26 April 2012

CADAC4 - Head.ASC

The two input files for the ROCKET.EXE executable are the HEAD.ASC and the CADIN.ASC. The HEAD file looks something like this:

 SCROLL NOECHOIN NOINTMSG NOSTGMSG NORANVAR NOTRAJBIN TRAJASC NOSTATBIN NOSTATASC NOTABOUT NOSWEEP
*
      51    REARTH       E Radius of the Earth = 6370987 - m
      52    CRAD         E Conversion factor = 57.29577951 (Deg/Rad)
      54    AGRAV        E Acceleration due to gravity @ sea level             =
      58    WEII3        E Earth Angular rotation = 7.2921154E-5 (rad/s)
     200    MAIR         D =0:Std Atmosphere, =1: Weather Deck
     201    TEMPK        G Atmospheric temperature - degK
     202    PRESS        O Atmospheric pressure - Pa
     203    RHO          O Atmospheric density - kg/m^3
     204    VSOUND       G Sonic speed - m/sec
 *   205    GRAV         O Gravity acceleration - m/s^2
     206    VMACH        O Mach number of rocket - ND
     207    PDYNMC       G Dynamic Pressure - Pa
    1200    MAERO        D =|MAERT|MAERV|, MAERT=1:Type, MAERV:Stage #
 *  1201    CD           O Drag coefficient - ND
 *  1202    CL           O Lift coefficient - ND
    1203    ALPHAX       D Angle of attack - deg
 *  1206    CA           G Axial force coefficient - ND

The original file is generated from the MKHEAD3.EXE program parsing the MODULE.FOR code and extracting all the parameters. However in order to get some output from the run, some of these parameters need to be marked as outputs. This is done by putting an asterisk ('*') in the second column. If there is no asterisk then this variable is not written to the TRAJ.ASC output file.

Monday, 9 April 2012

CADAC4 Software

I have been learning to use the CADAC4 software, which is available for download from the AIAA or as part of the self study CD:

Fundamentals of Six Degrees of Freedom Aerospace Simulation and Analysis in FORTRAN and C++

Library of Flight
2004, CD ROM
ISBN: 9781563476907
The Fortran version of the software is available from the AIAA. However I found there were a few issues when using the code under Windows and compiling with Gnu Fortran (gfortran). To fix this I had to edit some of the files especially to do with reading and opening files. I will upload the corrected versions of these files here.

Reference link: http://arc.aiaa.org/doi/book/10.2514/4.102523