├── .gitignore ├── Doxyfile ├── LICENSE ├── Makefile ├── README ├── TODO ├── avl ├── Doxyfile ├── Makefile ├── README ├── avl_doc.txt ├── bin │ └── Makefile ├── docgen.py ├── eispack │ ├── Makefile │ └── eispack.f ├── plotlib │ ├── CHAR.INC │ ├── Doc │ ├── GPL-library │ ├── MATH.INC │ ├── Makefile │ ├── Notes │ ├── Readme │ ├── Readme.colors │ ├── SLAN.INC │ ├── SYMB.INC │ ├── Xwin.c │ ├── Xwin1.c │ ├── colors.inc │ ├── colorstuff │ │ ├── rgb.c │ │ ├── rgbtbl.h │ │ └── rgbtest.c │ ├── config.make │ ├── config.make.DP │ ├── config.make.QP │ ├── config.make.SP │ ├── config.make.g77 │ ├── examples │ │ ├── Makefile │ │ ├── Makefile.NT │ │ ├── Readme-examples │ │ ├── cmap2.f │ │ ├── cmap3.f │ │ ├── colors.inc │ │ ├── contest.f │ │ ├── defmap.f │ │ ├── gridtest.f │ │ ├── masks.inc │ │ ├── spectrum.f │ │ ├── squares.f │ │ ├── squares2.f │ │ ├── squaresdoublebuff.f │ │ ├── symbols.f │ │ ├── symbolsall.f │ │ ├── volts.f │ │ ├── volts_old.f │ │ └── zoomtest.f │ ├── gw_subs.f │ ├── lines │ ├── masks.inc │ ├── misc │ │ ├── Makefile.linux.shared │ │ ├── README │ │ ├── Readme.absoft │ │ └── makesplitlib │ ├── plt.ftnchek │ ├── plt_3D.f │ ├── plt_base.f │ ├── plt_color.f │ ├── plt_font.f │ ├── plt_old.f │ ├── plt_util.f │ ├── pltlib.inc │ ├── ps_subs.f │ ├── ps_subs_old.f │ ├── set_subs.f │ ├── sym │ │ ├── Makefile │ │ ├── Readme │ │ ├── char.fnt │ │ ├── math.fnt │ │ ├── slan.fnt │ │ ├── symb.fnt │ │ ├── symgen.f │ │ └── test.f │ ├── util-ops.f │ ├── version.inc │ └── win32 │ │ ├── Makefile.NT │ │ ├── Readme-win32 │ │ ├── W32win.c │ │ ├── Xdefs.h │ │ └── rgbtbl.h ├── runs │ ├── ag35.dat │ ├── ag36.dat │ ├── ag37.dat │ ├── ag38.dat │ ├── ag40d.dat │ ├── ag41d.dat │ ├── ag42d.dat │ ├── ag43d.dat │ ├── ag45c.dat │ ├── ag46c.dat │ ├── ag47c.dat │ ├── al.avl │ ├── al.ps │ ├── allegro.avl │ ├── allegro.mass │ ├── allegro.ps │ ├── asond.avl │ ├── asond.ps │ ├── bd.avl │ ├── bd.eig │ ├── bd.mass │ ├── bd.ps │ ├── bd.run │ ├── bd2.avl │ ├── bd2.eig │ ├── bd2.mass │ ├── bd2.ps │ ├── bd2.run │ ├── ellip.avl │ ├── ellip.ps │ ├── ellip2.avl │ ├── ellip2.ps │ ├── fort.6 │ ├── fuseBD.dat │ ├── fuseSupra.dat │ ├── geominp │ ├── h.avl │ ├── h.ps │ ├── h6.avl │ ├── h6.ps │ ├── hershey.avl │ ├── hershey.eig │ ├── hershey.ps │ ├── ht22.dat │ ├── ht23.dat │ ├── longwing.avl │ ├── longwing.ps │ ├── ow.avl │ ├── ow.ps │ ├── plane.avl │ ├── plane.eig │ ├── plane.mass │ ├── plane.ps │ ├── plane.run │ ├── plotgeom.sh │ ├── sample.avl │ ├── sample.ps │ ├── sd7037.dat │ ├── square.avl │ ├── square.ps │ ├── sub.avl │ ├── sub.dat │ ├── sub.ps │ ├── supergee.avl │ ├── supergee.eig │ ├── supergee.mass │ ├── supergee.ps │ ├── supergee.run │ ├── supra.avl │ ├── supra.mass │ ├── supra.ps │ ├── supra.run │ ├── supra.runv │ ├── supra0.avl │ ├── supra0.eig │ ├── supra0.mass │ ├── supra0.ps │ ├── supra0.run │ ├── supraf.avl │ ├── supraf.ps │ ├── test.avl │ ├── test.ps │ ├── test.run │ ├── testcd.avl │ ├── testcd.ps │ ├── testdes.avl │ ├── vanilla.avl │ ├── vanilla.ps │ ├── vanilla.run │ ├── vanilla2.avl │ ├── vanilla2.ps │ ├── whitcomb.dat │ ├── wing.avl │ └── wing.ps ├── session1.txt ├── session2.txt ├── src │ ├── AINDEX.INC │ ├── AVL.INC │ ├── AVLPLT.INC │ ├── MASKS.INC │ ├── aero.f │ ├── aic.f │ ├── ainput.f │ ├── airutil.f │ ├── amake.f │ ├── amass.f │ ├── amode.f │ ├── aoper.f │ ├── aoutput.f │ ├── aplotmd.f │ ├── aplottp.f │ ├── aplotvl.f │ ├── arrow3d.f │ ├── asetup.f │ ├── atime.f │ ├── atpforc.f │ ├── atrim.f │ ├── autil.f │ ├── avl.f │ ├── avl.ftnchek │ ├── cdcl.f │ ├── dtest.f │ ├── getvm.f │ ├── gpl.txt │ ├── hidden.f │ ├── limits.f │ ├── matrix-lapack.f │ ├── matrix-linpack.f │ ├── matrix.f │ ├── movie.f │ ├── plsubs.f │ ├── pltops.f │ ├── plutil.f │ ├── second.f │ ├── second_g77.f │ ├── second_ifc.f │ ├── sgutil.f │ ├── spline.f │ └── userio.f └── version_notes.txt ├── gpl.txt ├── pyavl ├── __init__.py ├── avl.py ├── case.py ├── case_plain.py ├── geometry.py ├── geometry_plain.py ├── mass.py ├── outpututils.py ├── runutils.py ├── testing │ ├── __init__.py │ ├── allegro.avl │ ├── allegro.mass │ ├── allegro.test.mass │ ├── avl.py │ ├── case.py │ ├── case_plain.py │ ├── filter_lines.avl │ ├── filter_test.avl │ ├── mass.py │ ├── read_test_write.avl │ ├── test.py │ ├── testcase.avl │ └── vanilla_test.avl ├── ui │ ├── __init__.py │ ├── case.py │ ├── envisage │ │ ├── __init__.py │ │ ├── application.py │ │ ├── avl_plugin.py │ │ ├── avl_traits_ui_view.py │ │ ├── avl_ui_plugin.py │ │ ├── handler.py │ │ ├── images │ │ │ └── splash.png │ │ ├── output_plugin.py │ │ ├── run.py │ │ └── treepipeline.py │ ├── geometry_viewer.py │ ├── output_viewer.py │ ├── section_viewer.py │ └── treeview.py └── utils │ ├── __init__.py │ ├── naca4_plotter.py │ ├── numerical.py │ ├── traitstools.py │ └── wizards │ ├── __init__.py │ └── parafoil.py ├── run.py └── testcase ├── avl_case ├── clarky.dat ├── ls417.dat ├── test3.avl ├── testcase.avl └── testflatplate.avl └── extras ├── clarky.gif ├── ls417.dat └── ls417.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # file types to ignore 2 | *.pyc 3 | *.so 4 | *.o 5 | *.a 6 | *~ 7 | 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The avl program bundled in the source is copyrighted by its authors: 2 | 3 | Mark Drela, drela (AT) mit (DOT) edu 4 | Harold Youngren, guppy (AT) maine (DOT) rr (DOT) com 5 | 6 | and available under the GPL license http://web.mit.edu/drela/Public/web/gpl.txt 7 | and also made available with pyavl in the file gpl.txt 8 | 9 | PyAvl is copyrighted by the author "pankaj pandey " 10 | and also distributed under the terms of the GPL license distributed 11 | herewith or under any newer version of the license. 12 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: avl 2 | 3 | avl: 4 | $(MAKE) -C avl $(MFLAGS) 5 | 6 | cleanavl: 7 | $(MAKE) -C avl $(MFLAGS) clean 8 | 9 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | pyavl is a python interface to the AVL (Athena Vortex Lattice) program 2 | 3 | Requirements: 4 | - python 5 | - pexpect 6 | - AVL executable 7 | - Traits, TraitsGUI and Mayavi from code.enthought.com 8 | 9 | 10 | What pyavl does currently: (23/06/2009) 11 | - provide a python interface to run the avl program through pexpect 12 | - ability to load existing .avl input files, change the geometry by adding/removing/modifying 13 | surfaces, sections and bodies through python and saving the .avl file 14 | - visualize the geometry through vtk (mayavi) : incomplete; only the section chords are 15 | currently displayed, and the surfaces do not honor the scale and translate keywords 16 | - case .run files can be loaded into the running avl instance (they are not parsed in python) 17 | the loaded run cases are interpreted into python from the output of avl. The various 18 | constraints and parameters can be modified from python 19 | - GUI is not not developed. To see a primitive GUI the user can call the .configure_traits() 20 | method on any instance of a class derived from HasTraits class. The displayed GUI has 21 | suitable editors for all Traits defined for the instance 22 | - Using the pexpect spawn instance avl, the user can send arbitrary commands to the avl engine 23 | Make sure to return to base state after that by calling AVL.goto_state(avl) so that the 24 | other calls from python are not confused 25 | 26 | --- 27 | Sample pyavl session: 28 | - For starting the pyavl usage check the test functions in testing.avl and testing.case modules 29 | 30 | 31 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | TODO for pyavl 2 | 3 | 23/09/2009 4 | - A Enable interpretation of the execution output of avl to return output variables 5 | - A create custom GUI views for the components 6 | - A implement geometry viewer for all parts of geometry (surface+body) and also implement 7 | scale and translate keywords 8 | - A implement cross section viewer for all section types (NACA, AFILE and AIRFOIL) 9 | - B embed the gui in an envisage workbench as views of various components (as in sample) 10 | - B Enable use of .mass file 11 | 12 | -------------------------------------------------------------------------------- /avl/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIRS = eispack plotlib bin 2 | 3 | all: $(SUBDIRS) 4 | 5 | .PHONY: $(SUBDIRS) 6 | 7 | $(SUBDIRS): 8 | $(MAKE) -C $@ $(MFLAGS) 9 | 10 | clean: 11 | -for d in $(SUBDIRS); do ( $(MAKE) -C $$d clean ); done 12 | 13 | -------------------------------------------------------------------------------- /avl/README: -------------------------------------------------------------------------------- 1 | 2 | General 3 | ------- 4 | AVL and its plot library should compile on any Unix system 5 | with normal Fortran-77, C, and X-Windows support. 6 | 7 | 8 | Build sequence 9 | -------------- 10 | 11 | 1) Build Xplot11 library in ./plotlib ... 12 | 13 | % cd plotlib 14 | % edit Makefile (set compiler flags for your system) 15 | % make (creates libPlt.a) 16 | 17 | 18 | 2) Build Eispack library in ./eispack ... 19 | 20 | % cd eispack 21 | % edit Makefile (set compiler flags for your system) 22 | % make (creates eispack.a) 23 | 24 | 25 | 3) Build AVL in ./bin ... 26 | 27 | % cd bin 28 | % edit Makefile (set compiler flags for your system) 29 | % make avl 30 | 31 | 32 | The executable will appear in the bin/ directory. 33 | 34 | 35 | Documentation 36 | ------------- 37 | User Guide is in the avl_doc.txt file. If impatient, you can just 38 | run AVL in the runs/ directory, which contains a few input files: 39 | 40 | % cd runs 41 | % ../bin/avl vanilla 42 | 43 | The files session1.txt, session2.txt contain keyboard input examples. 44 | 45 | -------------------------------------------------------------------------------- /avl/docgen.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | class Tree(object): 4 | def __init__(self, value, children=[], parent=None): 5 | self.value = value 6 | self.parent = parent 7 | self.children = children 8 | 9 | def add_child(self, child): 10 | self.children.append(Tree(child,[],self)) 11 | 12 | def __str__(self): 13 | return self.value 14 | 15 | def __repr__(self): 16 | if not self.children: 17 | return repr(self.value) 18 | return repr({self.value:[]}) 19 | else: 20 | return repr({self.value:[repr(child) for child in self.children]}) 21 | 22 | t = Tree('root') 23 | t.add_child('aa') 24 | t.add_child('ab') 25 | #print repr(t) 26 | 27 | #s = open('avl_doc.txt').readlines() 28 | #o = [] 29 | #for line in s: 30 | 31 | headers = [] 32 | 33 | #section functions determine if the given line starts a section and if yes returns the depth to be outputted and also changes the depth accordingly 34 | def section1(text, i): 35 | #'''assertion :len(output) == i-1)''' 36 | if len(text[i])>0 and len(text[i])==len(text[i+1]) and text[i+1]=='='*len(text[i]): 37 | headers.append(text[i]) 38 | return 1 39 | else: 40 | return 0 41 | 42 | def default_section(text, i): 43 | return 0 44 | 45 | sectionizers = [section1, default_section] 46 | 47 | 48 | def parse(lines): 49 | output = range(len(lines)) 50 | op = None 51 | for i in xrange(len(lines)): 52 | for sectionizer in sectionizers: 53 | op = sectionizer(lines, i) 54 | if op is not None: 55 | break 56 | output[i] = op 57 | return output, lines 58 | 59 | def section1_render(text, i): 60 | return '

%s

TOC' % (text[i],text[i]) 61 | 62 | def default_render(text,i): 63 | return text[i] 64 | 65 | section_renderers = [default_render, section1_render] 66 | 67 | def render(text, depth): 68 | li = ['%s' %(t,t) for t in headers] 69 | toc = 'TOC' % '\n
  • '.join(li) 70 | s = [] 71 | for i in xrange(len(depth)): 72 | s.append(section_renderers[depth[i]](text,i)) 73 | output = ''' 74 | 75 | AVL Documentation 76 | 77 | 78 | %s 79 |
    80 | %s 81 | 82 | 83 | ''' % (toc, '
    \n'.join(s)) 84 | return output 85 | 86 | if __name__ == '__main__': 87 | s = open('avl_doc.txt').readlines() 88 | s = [l.strip() for l in s] 89 | o = [] 90 | output, lines = parse(s) 91 | for i in xrange(len(lines)): 92 | print output[i], lines[i] 93 | of = open('avl_doc.html','w') 94 | of.write(render(lines, output)) 95 | of.close() 96 | -------------------------------------------------------------------------------- /avl/eispack/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #FC = f77 3 | FC = f95 4 | FLG = -O -fPIC 5 | EISLIB = eispack.a 6 | AR = ar r 7 | RAN = ranlib 8 | 9 | 10 | 11 | eispack.a: eispack.o 12 | $(FC) -c $(FLG) eispack.f 13 | $(AR) $(EISLIB) eispack.o 14 | $(RAN) $(EISLIB) 15 | 16 | clean: 17 | /bin/rm *.o *.a 18 | 19 | 20 | -------------------------------------------------------------------------------- /avl/plotlib/Readme.colors: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Module: Readme.colors 3 | 4 | Copyright (C) 1996 Harold Youngren, Mark Drela 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public 17 | License along with this library; if not, write to the Free 18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | 20 | Report problems to: guppy@maine.com 21 | or drela@mit.edu 22 | ***********************************************************************/ 23 | 24 | Xplot11 25 | C Version 4.46 11/28/01 26 | 27 | 28 | This Readme file pertains to problems with colors under some window managers. 29 | 30 | The color routines used here employ shared colormaps to avoid the major screen 31 | color dislocations that accompany switching mouse focus with private colormaps. 32 | When the window manager leaves a sufficient number of color entries unallocated 33 | this approach works fine. Newer window managers, notably the fvwm-95 variants 34 | that are now supplied with the Linux distributions, appear to eat up almost 35 | the complete colormap for themselves with allocations for many pixmaps for 36 | icons. This causes heartaches when using Xplot11 as you get lots of messages 37 | about trouble allocating colors (and the colors are messed up in the plot). 38 | 39 | This could be avoided by allocating private colormaps but this gets into the 40 | color flashing problem alluded to above. 41 | 42 | For the time being I suggest using a window manager that doesn't go overboard 43 | allocating lots of colors. Twm works fine, I use plain old fvwm with xfm 44 | for my usual interface, I set up an .fvwmrc file that does not use 45 | too many wasteful color features (like lots of pixmap icons). This leaves 46 | around 200 free colors most of the time. Note that if you run something like 47 | xv displaying a typical color gif file you will eat up most or all the free 48 | colors while that application is running. Once you quit xv (or whatever) the 49 | colors are freed and clashes with Xplot11 disappear. 50 | 51 | If there is a sufficient problem with this I will make an option of allocating 52 | a private colormap when no color space is available in the shared colormap... 53 | 54 | HY 55 | 56 | -------------------------------------------------------------------------------- /avl/plotlib/SYMB.INC: -------------------------------------------------------------------------------- 1 | C Version 4.46 11/28/01 2 | 3 | CHARACTER* 14 CHARS 4 | INTEGER NODE(20, 14) 5 | 6 | DIMENSION NODE0(20,10) 7 | DIMENSION NODE1(20, 4) 8 | EQUIVALENCE ( NODE(1, 1) , NODE0(1,1) ) 9 | EQUIVALENCE ( NODE(1, 11) , NODE1(1,1) ) 10 | DATA NCHARS / 14 / 11 | DATA CHARS( 1: 14) / '0123456789ABCD' / 12 | DATA NODE0 / 13 | & 24848,14880,18080,18016,11616,11680,14880, 0, 0, 0, 14 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15 | & 24848,14880,16480,18064,18032,16416,13216,11632,11664,13280, 16 | & 14880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17 | & 24848,14886,18128,11528,14886, 0, 0, 0, 0, 0, 18 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19 | & 24885,14811,21148,18548, 0, 0, 0, 0, 0, 0, 20 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21 | & 22175,17521,22121,17575, 0, 0, 0, 0, 0, 0, 22 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23 | & 24848,14882,18248,14814,11448,14882, 0, 0, 0, 0, 24 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25 | & 24848,14868,18168,14810,11568,14868, 0, 0, 0, 0, 26 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27 | & 21669,14848,14810,24848,18069, 0, 0, 0, 0, 0, 28 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29 | & 24886,14848,11627,24848,18027, 0, 0, 0, 0, 0, 30 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31 | & 23078,16618,23018,16678,21448,18248, 0, 0, 0, 0, 32 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 / 33 | DATA NODE1 / 34 | & 21866,17830,21830,17866,24882,14814, 0, 0, 0, 0, 35 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36 | & 21680,18016,11616,18080,11680, 0, 0, 0, 0, 0, 37 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38 | & 21616,18080,18016,11680,11616, 0, 0, 0, 0, 0, 39 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40 | & 24848,14859,11559,16917,14884,12717,18159,14859, 0, 0, 41 | & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 / 42 | -------------------------------------------------------------------------------- /avl/plotlib/colors.inc: -------------------------------------------------------------------------------- 1 | C*********************************************************************** 2 | C Module: colors.inc 3 | C 4 | C Copyright (C) 1996 Harold Youngren, Mark Drela 5 | C 6 | C This library is free software; you can redistribute it and/or 7 | C modify it under the terms of the GNU Library General Public 8 | C License as published by the Free Software Foundation; either 9 | C version 2 of the License, or (at your option) any later version. 10 | C 11 | C This library is distributed in the hope that it will be useful, 12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | C Library General Public License for more details. 15 | C 16 | C You should have received a copy of the GNU Library General Public 17 | C License along with this library; if not, write to the Free 18 | C Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | C 20 | C Report problems to: guppy@maine.com 21 | C or drela@mit.edu 22 | C*********************************************************************** 23 | C 24 | C Version 4.41 7/5/98 25 | C 26 | C****************************************** 27 | C Default color definitions for Xplot11 28 | C For use as arguments to NEWCOLOR, e.g. 29 | C 30 | C CALL NEWCOLOR(GREEN) 31 | C 32 | C 33 | C Alternatively, can also use... 34 | C 35 | C CALL NEWCOLORNAME('GREEN') 36 | C 37 | C****************************************** 38 | C 39 | Integer BLACK, 40 | & WHITE, 41 | & RED, 42 | & ORANGE, 43 | & YELLOW, 44 | & GREEN, 45 | & CYAN, 46 | & BLUE, 47 | & VIOLET, 48 | & MAGENTA 49 | C 50 | parameter (BLACK = 1) 51 | parameter (WHITE = 2) 52 | parameter (RED = 3) 53 | parameter (ORANGE = 4) 54 | parameter (YELLOW = 5) 55 | parameter (GREEN = 6) 56 | parameter (CYAN = 7) 57 | parameter (BLUE = 8) 58 | parameter (VIOLET = 9) 59 | parameter (MAGENTA = 10) 60 | -------------------------------------------------------------------------------- /avl/plotlib/colorstuff/rgbtest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include "rgbtbl.h" 7 | 8 | main(argc,argv) 9 | char **argv; 10 | int argc; 11 | { 12 | 13 | int IC,ic,ncols; 14 | int i,n,ired,igrn,iblu; 15 | char teststr[50], c; 16 | 17 | IC = sizeof(Colordef); 18 | ic = sizeof(colordef); 19 | ncols = ic/IC; 20 | 21 | printf("Colordef %d\n",IC); 22 | printf("colordef %d\n",ic); 23 | printf("#entries %d\n",ncols); 24 | 25 | printf("\nEnter color string: "); 26 | 27 | /*if ((c=fgetc(stdin)) != '\n') 28 | ungetc(c,stdin); */ 29 | 30 | fgets(teststr,50,stdin); 31 | printf("strlen = %d\n",strlen(teststr)); 32 | 33 | if ((n=strlen(teststr)) != 0) { 34 | while(n > 0 && teststr[--n] == '\n') 35 | teststr[n] = '\0'; } 36 | 37 | /*fscanf(stdin,"%s",teststr);*/ 38 | printf("\nTest string = %s\n",teststr); 39 | 40 | for (i=0; i < ncols; i++) { 41 | if(!strcasecmp(colordef[i].name,teststr)) { 42 | 43 | printf("test string %s found at %d\n",teststr,i); 44 | printf("found string %s code %d\n",colordef[i].name,colordef[i].rgb); 45 | 46 | ired = 0x000000ff & (colordef[i].rgb >> 16); 47 | igrn = 0x000000ff & (colordef[i].rgb >> 8); 48 | iblu = 0x000000ff & (colordef[i].rgb); 49 | 50 | printf("red = %d\ngrn = %d\nblu = %d\n",ired,igrn,iblu); 51 | } 52 | } 53 | 54 | } 55 | 56 | 57 | -------------------------------------------------------------------------------- /avl/plotlib/examples/Readme-examples: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Module: Readme-examples 3 | 4 | Copyright (C) 1996 Harold Youngren, Mark Drela 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | 20 | Report problems to: guppy@maine.com 21 | or drela@mit.edu 22 | ***********************************************************************/ 23 | 24 | Make the test programs under Unix by: 25 | 26 | change options in ../config.make to match your environment 27 | % make 28 | 29 | Make the test programs under Windoze: 30 | 31 | You need Visual C and either the Compaq Visual Fortran compiler or the Intel 32 | Fortran compiler. 33 | compile and link with command in DOS window: 34 | 35 | C:\Xfoil\plotlib\examples: nmake /f Makefile.NT 36 | 37 | 38 | 39 | 40 | Sample and test programs 41 | ------------------------- 42 | 43 | volts.f - demo program that draws a simple, labeled plot with axes. 44 | 45 | volts_old.f - demo program that draws a simple, labeled plot with axes. 46 | (uses old "Versatec" plot calls) 47 | 48 | squares.f - draws a sine wave in colored boxes, has colored labels 49 | 50 | squaresdoublebuff.f - demo of double buffering, draws a sine wave in colored 51 | boxes that cycle across the sine wave w/o flickering 52 | 53 | gridtest.f - tests the grid routines (obvious, aren't we...) 54 | 55 | symbols.f 56 | symbolsall.f - display and test the vector fonts 57 | 58 | cmap2.f 59 | cmap3.f - used for interactive viewing of RGB color components: 60 | 61 | zoomtest.f - test of zooming 62 | 63 | contest.f - test of contouring primitives for color, filled contours 64 | 65 | defmap.f - displays the default colormap produced by CALL COLORMAPDEFAULT 66 | 67 | spectrum.f - displays the "Spectrum" produced by 68 | CALL COLORSPECTRUMHUES(ncols, RYGCBM_string) 69 | in pie and bar form. 70 | 71 | Typical values for RYGCBM_string might be 72 | 'RYG' 73 | 'GYR' 74 | 'MCY' 75 | 'BMRY' 76 | 'BCGYR', etc. 77 | 78 | Choosing strongly non-contiguous sequences like 'RCB' is OK, 79 | but will make a horrid-looking Spectrum. 80 | 81 | sym/test.f - display current vector fonts 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /avl/plotlib/examples/colors.inc: -------------------------------------------------------------------------------- 1 | C*********************************************************************** 2 | C Module: colors.inc 3 | C 4 | C Copyright (C) 1996 Harold Youngren, Mark Drela 5 | C 6 | C This library is free software; you can redistribute it and/or 7 | C modify it under the terms of the GNU Library General Public 8 | C License as published by the Free Software Foundation; either 9 | C version 2 of the License, or (at your option) any later version. 10 | C 11 | C This library is distributed in the hope that it will be useful, 12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | C Library General Public License for more details. 15 | C 16 | C You should have received a copy of the GNU Library General Public 17 | C License along with this library; if not, write to the Free 18 | C Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | C 20 | C Report problems to: guppy@maine.com 21 | C or drela@mit.edu 22 | C*********************************************************************** 23 | C 24 | C 25 | C****************************************** 26 | C Default color definitions for Xplot11 27 | C For use as arguments to NEWCOLOR, e.g. 28 | C 29 | C CALL NEWCOLOR(GREEN) 30 | C 31 | C 32 | C Alternatively, can also use... 33 | C 34 | C CALL NEWCOLORNAME('GREEN') 35 | C 36 | C****************************************** 37 | C 38 | Integer BLACK, 39 | & WHITE, 40 | & RED, 41 | & ORANGE, 42 | & YELLOW, 43 | & GREEN, 44 | & CYAN, 45 | & BLUE, 46 | & VIOLET, 47 | & MAGENTA 48 | C 49 | parameter (BLACK = 1) 50 | parameter (WHITE = 2) 51 | parameter (RED = 3) 52 | parameter (ORANGE = 4) 53 | parameter (YELLOW = 5) 54 | parameter (GREEN = 6) 55 | parameter (CYAN = 7) 56 | parameter (BLUE = 8) 57 | parameter (VIOLET = 9) 58 | parameter (MAGENTA = 10) 59 | -------------------------------------------------------------------------------- /avl/plotlib/examples/masks.inc: -------------------------------------------------------------------------------- 1 | C*********************************************************************** 2 | C Module: masks.inc 3 | C 4 | C Copyright (C) 1996 Harold Youngren, Mark Drela 5 | C 6 | C This library is free software; you can redistribute it and/or 7 | C modify it under the terms of the GNU Library General Public 8 | C License as published by the Free Software Foundation; either 9 | C version 2 of the License, or (at your option) any later version. 10 | C 11 | C This library is distributed in the hope that it will be useful, 12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | C Library General Public License for more details. 15 | C 16 | C You should have received a copy of the GNU Library General Public 17 | C License along with this library; if not, write to the Free 18 | C Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | C 20 | C Report problems to: guppy@maine.com 21 | C or drela@mit.edu 22 | C*********************************************************************** 23 | C 24 | C 25 | C---- dot-pattern masks for use with PLGRID, NEWPAT, etc. 26 | C 27 | C mask0: _________________________ (solid) 28 | C 1: ......................... 29 | C 2: . . . . . . . . . . . . . 30 | C 3: . . . . . . . 31 | C 4: . . . . 32 | C 33 | data mask0, mask1, mask2, mask3, mask4 34 | & / -1 , -21846, -30584, -32640, -32768 / 35 | 36 | -------------------------------------------------------------------------------- /avl/plotlib/examples/volts_old.f: -------------------------------------------------------------------------------- 1 | C*********************************************************************** 2 | C Module: volts_old.f 3 | C 4 | C Copyright (C) 1996 Harold Youngren, Mark Drela 5 | C 6 | C This program is free software; you can redistribute it and/or modify 7 | C it under the terms of the GNU General Public License as published by 8 | C the Free Software Foundation; either version 2 of the License, or 9 | C (at your option) any later version. 10 | C 11 | C This program is distributed in the hope that it will be useful, 12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | C GNU General Public License for more details. 15 | C 16 | C You should have received a copy of the GNU General Public License 17 | C along with this program; if not, write to the Free Software 18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | C 20 | C Report problems to: guppy@maine.com 21 | C or drela@mit.edu 22 | C*********************************************************************** 23 | 24 | C VOLTS 25 | C 26 | C Old-style Versatec calls test routine 27 | C 28 | LOGICAL LODD 29 | DIMENSION X(26),Y(26),RED(9),BLUE(9),GREEN(9),NCOL(2) 30 | DATA X/0.,5.,15.,25.,30.,35.,40.,45.,50.,55.,60.,65.,70.,75.,80., 31 | 1 85.,90.,95.,100.,105.,110.,115.,120.,125.,2*0./ 32 | C 33 | DATA Y/0.,10.,15.,10.,-10.,-50.,-80.,-110.,-130.,-145.,-155., 34 | 1 -160.,-158.,-150.,-130.,-90.,-70.,-20.,20.,50.,70.,80.,85., 35 | 2 90.,2*0./ 36 | DATA NCOL/0,8/ 37 | DATA RED /0.0,0.0,0.0,1.0,0.0,1.0,1.0,0.0,1.0/ 38 | DATA BLUE /0.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,1.0/ 39 | DATA GREEN/0.0,0.0,1.0,0.0,1.0,0.0,1.0,0.0,1.0/ 40 | C 41 | C 42 | C...ALTER ACTUAL DATA SCALES 43 | DO 10 I=1,24 44 | X(I) = X(I) * 1000 45 | 10 Y(I) = Y(I) / 10000 46 | C 47 | IDUM = 0 48 | ICNT = 0 49 | IPD = 6 50 | 100 CALL PLOTS (IDUM,0,IPD) 51 | C 52 | LODD = (MOD(ICNT,2).EQ.1) 53 | CALL FACTOR (.9) 54 | IF(IPD .EQ. 6) THEN 55 | DO 20 I=1,NCOL(2) 56 | IF(.NOT.LODD) CALL SETCOL(I-1,RED(I),GREEN(I),BLUE(I)) 57 | IF(LODD) CALL SETCOL(I-1,RED(9-I),GREEN(9-I),BLUE(9-I)) 58 | 20 CONTINUE 59 | ENDIF 60 | C 61 | CALL PLOT (1.05,1.05,-3) 62 | C 63 | CALL SCALE (X,7.,24,+1) 64 | CALL SCALE (Y,7.,24,+1) 65 | C 66 | CALL COLOR(2) 67 | CALL NEWPEN (2) 68 | cc CALL LINE (X,Y,24,1,1,0) 69 | CALL LINE (X,Y,24,1,1,0) 70 | CALL NEWPEN (1) 71 | CALL COLOR(0) 72 | C 73 | CALL AXIS (0.,0.,'NANOSECONDS',-11,7.,0.,X(25),X(26)) 74 | CALL AXIS (0.,0.,'MILLIVOLTS',+10,7.,90.,Y(25),Y(26)) 75 | C 76 | CALL SYMBOL (.5,.5,.1,'DX = ',0.,+5) 77 | CALL NUMBER (999.,999.,.1,X(26),0.,+3) 78 | CALL NUMBER (1.,.75,.1,X(26),0.,0) 79 | CALL NUMBER (1.,1.,.1,X(26),0.,-1) 80 | CALL NUMBER (1.,1.25,.1,X(26),0.,-4) 81 | C 82 | CALL COLOR(4) 83 | CALL SYMBOL (2.3,6.5,.1,'VERSAPLOT SAMPLE',0.,+16) 84 | CALL SYMBOL (1.5,6.75,.2,'TIME VS VOLTAGE',0.,+15) 85 | CALL COLOR(0) 86 | CALL PLOTOF 87 | C 88 | ICNT = ICNT+1 89 | CALL PLOT (0.,0.,-999) 90 | WRITE(*,*) ' to cycle colors' 91 | READ(*,*) 92 | if(ICNT.LE.2) go to 100 93 | 94 | CALL PLOT (0.,0.,999) 95 | STOP 96 | END 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /avl/plotlib/examples/zoomtest.f: -------------------------------------------------------------------------------- 1 | C*********************************************************************** 2 | C Module: zoomtest.f 3 | C 4 | C Copyright (C) 1996 Harold Youngren, Mark Drela 5 | C 6 | C This program is free software; you can redistribute it and/or modify 7 | C it under the terms of the GNU General Public License as published by 8 | C the Free Software Foundation; either version 2 of the License, or 9 | C (at your option) any later version. 10 | C 11 | C This program is distributed in the hope that it will be useful, 12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | C GNU General Public License for more details. 15 | C 16 | C You should have received a copy of the GNU General Public License 17 | C along with this program; if not, write to the Free Software 18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | C 20 | C Report problems to: guppy@maine.com 21 | C or drela@mit.edu 22 | C*********************************************************************** 23 | 24 | 25 | PROGRAM ZOOMTEST 26 | C 27 | C---- dot-pattern masks for use with PLGRID, NEWPAT, etc. 28 | C 29 | C mask0: _________________________ (solid) 30 | C 1: ......................... 31 | C 2: . . . . . . . . . . . . . 32 | C 3: . . . . . . . 33 | C 4: . . . . 34 | C 35 | CHARACTER LINE*80 36 | LOGICAL LXYSAME, LCURSOR 37 | data mask0, mask1, mask2, mask3, mask4 38 | & / -1 , -21846, -30584, -32640, -32768 / 39 | 40 | 41 | C 42 | IDEV = 1 43 | IPSLU = 0 44 | SIZE = 0.8 45 | C 46 | CH = 0.020 47 | C 48 | CALL PLINITIALIZE 49 | CALL PLOPEN(0.78,IPSLU,IDEV) 50 | CALL DRAWTOBUFFER 51 | CALL NEWFACTOR(SIZE) 52 | C 53 | CALL PLOTABS(1.00,1.00,-3) 54 | C 55 | call PLGRID(0.0,0.0,22,0.5,17,0.5,MASK2) 56 | call PLGRID(0.0,0.0,11,1.0, 9,1.0,MASK1) 57 | call PLGRID(0.0,0.0, 3,5.0, 2,5.0,MASK0) 58 | call PLSLAN(0.1,0.1,0.2,'abcDEF123',0.0,9) 59 | CALL NEWCOLORNAME('green') 60 | call PLCHAR(1.1,1.1,0.2,'321GHIjkl',0.0,9) 61 | CALL NEWCOLORNAME('red') 62 | call PLSLAN(2.1,2.1,0.2,'mnoPQR123',0.0,9) 63 | CALL NEWCOLORNAME('blue') 64 | call PLCHAR(3.1,3.1,0.2,'321STUvwx',0.0,9) 65 | CALL NEWCOLORNAME('black') 66 | c 67 | CALL PLFLUSH 68 | c 69 | write(*,*) ' ' 70 | write(*,*) 'The zoom can be done with same X,Y scales' 71 | write(*,*) 'Either mouse or keyboard can set the zoom rectangle' 72 | write(*,*) 'Enter XYsame, MouseInput flags (T/F):' 73 | LXYSAME = .TRUE. 74 | LCURSOR = .TRUE. 75 | read(*,1000) LINE 76 | if(LINE.NE.' ') THEN 77 | read(LINE,*,err=10) LXYSAME,LCURSOR 78 | endif 79 | 10 write(*,*) ' ' 80 | C 81 | do k=1, 3 82 | call USETZOOM( LXYSAME , LCURSOR ) 83 | call REPLOT(1) 84 | enddo 85 | pause 86 | call CLRZOOM 87 | call REPLOT(1) 88 | pause 89 | c 90 | CALL PLOT(0.0,0.0,+999) 91 | 1000 FORMAT(A) 92 | C 93 | END 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /avl/plotlib/lines: -------------------------------------------------------------------------------- 1 | 600 gw_subs.f 2 | 300 plt_3D.f 3 | 1000 plt_base.f 4 | 600 plt_color.f 5 | 730 plt_font.f 6 | 1420 plt_old.f 7 | 900 plt_util.f 8 | 600 ps_subs.f 9 | 720 set_subs.f 10 | 20 util-ops.f 11 | 6890 TOTAL 12 | -------------------------------------------------------------------------------- /avl/plotlib/masks.inc: -------------------------------------------------------------------------------- 1 | C*********************************************************************** 2 | C Module: masks.inc 3 | C 4 | C Copyright (C) 1996 Harold Youngren, Mark Drela 5 | C 6 | C This library is free software; you can redistribute it and/or 7 | C modify it under the terms of the GNU Library General Public 8 | C License as published by the Free Software Foundation; either 9 | C version 2 of the License, or (at your option) any later version. 10 | C 11 | C This library is distributed in the hope that it will be useful, 12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | C Library General Public License for more details. 15 | C 16 | C You should have received a copy of the GNU Library General Public 17 | C License along with this library; if not, write to the Free 18 | C Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | C 20 | C Report problems to: guppy@maine.com 21 | C or drela@mit.edu 22 | C*********************************************************************** 23 | C 24 | C Version 4.46 11/28/01 25 | C 26 | C---- dot-pattern masks for use with PLGRID, NEWPAT, etc. 27 | C 28 | C mask0: _________________________ (solid) 29 | C 1: ......................... 30 | C 2: . . . . . . . . . . . . . 31 | C 3: . . . . . . . 32 | C 4: . . . . 33 | C 34 | data mask0, mask1, mask2, mask3, mask4 35 | & / -1 , -21846, -30584, -32640, -32768 / 36 | C 37 | C data mask0, mask1, mask2, mask3, mask4 38 | C & /Z'FFFFFFFF',Z'AAAAAAAA',Z'CCCCCCCC',Z'88888888',Z'21084210'/ 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /avl/plotlib/misc/README: -------------------------------------------------------------------------------- 1 | This directory contains random, outdated but potentially useful info or 2 | Makefiles. 3 | 4 | You may need to read through these and change things substantially to get them working on your machine. They may be of some help. 5 | 6 | makesplitlib Script for making a libPlt.a with each routine in a separate 7 | object file. This may be necessary if you want to change 8 | particular subroutines within the plotlib with your own 9 | versions and get them to link. The current library archives 10 | all the routines within a source file into one linkable entity. 11 | 12 | Makefile.linux.shared This makefile was used to make a shared object (ELF) 13 | library for Linux. If you know what this means I don't 14 | really need to tell you more. 15 | 16 | Readme.absoft Discusses the quirks of the Absoft Fortran compiler(s). The 17 | Linux versions were the ones specifically addressed here. 18 | -------------------------------------------------------------------------------- /avl/plotlib/misc/Readme.absoft: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Module: Readme.absoft 3 | 4 | Copyright (C) 1996 Harold Youngren, Mark Drela 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public 17 | License along with this library; if not, write to the Free 18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | 20 | Report problems to: guppy@maine.com 21 | or drela@mit.edu 22 | ***********************************************************************/ 23 | 24 | Xplot11 25 | C Version 4.46 11/28/01 26 | 27 | 28 | This Readme file pertains to the Absoft Linux f77 compiler, version 5.x, this 29 | stuff has not been checked for later versions... 30 | 31 | Various compilers support intrinsics for RSHIFT, LSHIFT and AND(). Absoft 32 | is among those that do not have these supported (also HPUX f77 at last check). 33 | 34 | I added a file (util-ops.f) that needs to be included for the Absoft f77 environment. This file contains functions for bit shifts RSHIFT,LSHIFT and 35 | arithmetic AND(I1,I2) for fortrans that lack these intrinsics. 36 | 37 | See the Makefile where this is one of the commented out options. 38 | 39 | Note that a number of compile switches need to be set when using the Absoft 40 | f77 compiler. See the Makefile for these. 41 | 42 | 43 | Absoft Linux f77 flags that I use... 44 | 45 | DP = -N113 (only for making a double precision version of the library) 46 | FFLAGS = -s -f -O -B100 -B108 -N3 -N90 $(DP) 47 | 48 | -s static 49 | -f force to lower case 50 | -O optimize 51 | -B100 Pentium Pro flag (use -B101 for general Pentium compatibility) 52 | -B108 append single underscore to names 53 | -N3 explicitly opened unformatted files contain record information 54 | -N90 pass character args same as g77 and f2c 55 | -N113 lame version of -r8 flag to promote singles into doubles 56 | 57 | Note that you will need to link with the libU77 library if you use some 58 | of the UNIX fortran-isms like GETARG. This is supplied by Absoft but is not 59 | in their default link libs. You need to add this library to a link statement 60 | something like this: 61 | 62 | f77 -o foobar foobar.o -lU77 63 | 64 | HY 65 | 66 | -------------------------------------------------------------------------------- /avl/plotlib/misc/makesplitlib: -------------------------------------------------------------------------------- 1 | #!/bin/csh 2 | # Shell script for making split version of the Xplot11 library 3 | # The split version allows one to link to routines of the same name without 4 | # fatal link errors as each module can be extracted as needed. 5 | # 6 | # This makes a subdirectory ../merge in the Xplot11 source directory 7 | # that contains an fsplit version of the source files. It then compiles 8 | # these to make objects, then a library in a crude hack (no makefile). 9 | # The resulting library is placed in this directory as libPlt-split.a for 10 | # the user to do what he wishes. 11 | # HHY 8/30/96 12 | 13 | # Optionally get f77 flags from #1 argument to makesplitlib 14 | # i.e. makesplitlib "-I../foobar -O4 -r8" 15 | # 16 | set f77flags = "-O2" 17 | set f77 = "g77" 18 | set fsplit = "fsplit-gup" 19 | 20 | 21 | if ($1 != "") set f77flags = $1 22 | echo "Using fortran compile flags ($f77flags) (option set by arg 1)" 23 | 24 | echo "Creating ../merge subdirectory" 25 | if !(-e ./merge) mkdir merge 26 | 27 | cd merge 28 | 29 | echo "Starting fsplit of all files in Xplot11 directory" 30 | foreach file (../*.f) 31 | echo "Splitting $file" 32 | $fsplit $file 33 | end 34 | 35 | echo "Compiling all split fortran files..." 36 | foreach file (*.f) 37 | $f77 -c $f77flags -I../ $file 38 | end 39 | 40 | echo "Compiling the C interface file" 41 | cc -c -O -I../ ../Xwin.c 42 | 43 | echo "Making library from objects" 44 | ar -r libPlt-split.a *.o 45 | 46 | echo "Moving library to main Xplot11 directory" 47 | mv libPlt-split.a .. 48 | 49 | exit 50 | 51 | -------------------------------------------------------------------------------- /avl/plotlib/plt.ftnchek: -------------------------------------------------------------------------------- 1 | # Command file for running ftnchek to "lint" the XPLOT11 fortran source 2 | # 3 | ftnchek -common=2 -novice=5 \ 4 | plt_base.f plt_font.f plt_util.f plt_color.f \ 5 | plt_old.f plt_3D.f\ 6 | set_subs.f gw_subs.f ps_subs.f 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /avl/plotlib/sym/Makefile: -------------------------------------------------------------------------------- 1 | #*********************************************************************** 2 | # Module: Makefile (Xplot/sym directory) 3 | # 4 | # Copyright (C) 1996 Harold Youngren, Mark Drela 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Library General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Library General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Library General Public 17 | # License along with this library; if not, write to the Free 18 | # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | # 20 | # Report problems to: guppy@maine.com 21 | # or drela@mit.edu 22 | #*********************************************************************** 23 | 24 | #Makefile for stroke font creation and editing programs 25 | 26 | FC = f77 27 | #FC = g77 28 | FFLAGS = -O1 29 | LIBS = ../libPlt.a -lX11 30 | 31 | PROGS = symgen test 32 | 33 | all: $(PROGS) 34 | 35 | clean: 36 | -/bin/rm *.o 37 | -/bin/rm *.a 38 | -/bin/rm $(PROGS) 39 | 40 | 41 | symgen: symgen.o 42 | $(FC) -o symgen symgen.o $(LIBS) 43 | 44 | symgen.o: symgen.f 45 | $(FC) -c $(FFLAGS) symgen.f 46 | 47 | ../plt_font.o: ../plt_font.f ../CHAR.INC ../SLAN.INC ../MATH.INC ../SYMB.INC 48 | $(FC) -c $(FFLAGS) ../plt_font.f 49 | mv ./plt_font.o ../ 50 | 51 | 52 | 53 | test: test.o ../plt_font.o 54 | $(FC) -o test test.o ../plt_font.o $(LIBS) 55 | 56 | test.o: test.f 57 | $(FC) -c $(FFLAGS) test.f 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /avl/plotlib/sym/Readme: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | Module: Readme 3 | 4 | Copyright (C) 1996 Harold Youngren, Mark Drela 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public 17 | License along with this library; if not, write to the Free 18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | 20 | Report problems to: guppy@maine.com 21 | or drela@mit.edu 22 | ***********************************************************************/ 23 | 24 | 25 | This directory contains programs and routines for creating, 26 | modifying, and using vector fonts. 27 | 28 | 29 | PROGRAM SYMGEN is an interactive program for creating or modifying 30 | font description files XXXX.FNT, and is invoked with 31 | 32 | % make symgen (requires ../libPlt.a) 33 | % symgen XXXX 34 | 35 | The header of symgen.f has a description of the format of 36 | a XXXX.FNT file, although this is of no concern to the user. 37 | SYMGEN can create an include file XXXX.INC which has the 38 | font encoding placed into Fortran DATA statements. XXXX.INC 39 | is then compiled with a Versaplot SYMBOL-type routine which 40 | is used in applications. 41 | 42 | Four sample databases, include files, and application routines 43 | already exist. The application routines are in ../plt_font.f: 44 | 45 | CHAR.FNT CHAR.INC SUBR. PLCHAR (Upper,lower case letters, WYSIWYG) 46 | SLAN.FNT SLAN.INC SUBR. PLSLAN (Upper,lower case slanted letters) 47 | MATH.FNT MATH.INC SUBR. PLMATH (Latex-like Greek symbols, exponents) 48 | SYMB.FNT SYMB.INC SUBR. PLSYMB (Versaplot plotting symbols) 49 | 50 | also available: SUBR. PLNUMB (Whole floating-point numbers) 51 | 52 | One can generate analogous files and plot routines for any 53 | custom font, e.g. 54 | 55 | USER.FNT USER.INC SUBR. PLUSER 56 | 57 | 58 | PROGRAM TEST plots the complete CHAR, SLAN, MATH, and SYMB fonts, 59 | and also plots sample character strings for examination. 60 | 61 | % make test 62 | % test 63 | 64 | Mark Drela 65 | 10 March 96 66 | 67 | 68 | -------------------------------------------------------------------------------- /avl/plotlib/sym/symb.fnt: -------------------------------------------------------------------------------- 1 | 0123456789ABCD 2 | 24848 14880 18080 18016 11616 11680 14880 0 0 0 0 0 0 0 0 0 0 0 0 0 3 | 24848 14880 16480 18064 18032 16416 13216 11632 11664 13280 14880 0 0 0 0 0 0 0 0 0 4 | 24848 14886 18128 11528 14886 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 | 24885 14811 21148 18548 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 | 22175 17521 22121 17575 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 | 24848 14882 18248 14814 11448 14882 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 | 24848 14868 18168 14810 11568 14868 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 | 21669 14848 14810 24848 18069 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 | 24886 14848 11627 24848 18027 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 | 23078 16618 23018 16678 21448 18248 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 | 21866 17830 21830 17866 24882 14814 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 | 21680 18016 11616 18080 11680 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 | 21616 18080 18016 11680 11616 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 | 24848 14859 11559 16917 14884 12717 18159 14859 0 0 0 0 0 0 0 0 0 0 0 0 16 | -------------------------------------------------------------------------------- /avl/plotlib/util-ops.f: -------------------------------------------------------------------------------- 1 | C--- Replacement functions for Fortran's that lack RSHIFT,LSHIFT,AND 2 | C Version 4.46 11/28/01 3 | 4 | INTEGER FUNCTION RSHIFT(I1,N) 5 | RSHIFT = ISHFT(I1,-N) 6 | RETURN 7 | END 8 | 9 | INTEGER FUNCTION LSHIFT(I1,N) 10 | LSHIFT = ISHFT(I1,N) 11 | RETURN 12 | END 13 | 14 | INTEGER FUNCTION AND(I1,I2) 15 | AND = IAND(I1,I2) 16 | RETURN 17 | END 18 | -------------------------------------------------------------------------------- /avl/plotlib/version.inc: -------------------------------------------------------------------------------- 1 | C Version 4.47 12 Nov 07 2 | 3 | -------------------------------------------------------------------------------- /avl/plotlib/win32/Readme-win32: -------------------------------------------------------------------------------- 1 | 2 | Make the plotlib under Windoze: 3 | 4 | You need Visual C and either the Compaq Visual Fortran compiler or the Intel 5 | Fortran compiler. You should check the options in Makefile.NT to ensure that 6 | they match your system. The supplied files match the Intel Fortran compiler. 7 | 8 | Compile and link with command in DOS window: 9 | C:\Xfoil\plotlib: cd win32 10 | C:\Xfoil\plotlib\win32: nmake /f Makefile.NT 11 | 12 | This places all the .obj files in the win32 directory and copies libPltxx.lib 13 | to the parent plotlib directory. 14 | 15 | Alternatively you could load all the files into a Visual Studio project and 16 | create the library that way. 17 | -------------------------------------------------------------------------------- /avl/plotlib/win32/Xdefs.h: -------------------------------------------------------------------------------- 1 | 2 | /* Event definitions from Xwindows */ 3 | #define XKeyPress 2 4 | #define XKeyRelease 3 5 | #define XButtonPress 4 6 | #define XButtonRelease 5 7 | #define XMotionNotify 6 8 | #define XEnterNotify 7 9 | #define XLeaveNotify 8 10 | #define XFocusIn 9 11 | #define XFocusOut 10 12 | #define XKeymapNotify 11 13 | #define XExpose 12 14 | #define XGraphicsExpose 13 15 | #define XNoExpose 14 16 | #define XCreateNotify 16 17 | #define XDestroyNotify 17 18 | #define XUnmapNotify 18 19 | #define XMapNotify 19 20 | #define XMapRequest 20 21 | #define XReparentNotify 21 22 | #define XConfigureNotify 22 23 | #define XConfigureRequest 23 24 | #define XGravityNotify 24 25 | #define XResizeRequest 25 26 | #define XCirculateNotify 26 27 | #define XCirculateRequest 27 28 | #define XPropertyNotify 28 29 | #define XSelectionClear 29 30 | #define XSelectionRequest 30 31 | #define XSelectionNotify 31 32 | #define XColormapNotify 32 33 | #define XClientMessage 33 34 | #define XMappingNotify 34 35 | #define XLASTEvent 35 36 | 37 | /* Graphics functions (src to dest) from Xwindows */ 38 | #define GXclear 0 39 | #define GXand 1 40 | #define GXandReverse 2 41 | #define GXcopy 3 42 | #define GXandInverted 4 43 | #define GXnoop 5 44 | #define GXxor 6 45 | #define GXor 7 46 | #define GXnor 8 47 | #define GXequiv 9 48 | #define GXinvert 10 49 | #define GXorReverse 11 50 | #define GXcopyInverted 12 51 | #define GXorInverted 13 52 | #define GXnand 14 53 | #define GXset 15 54 | 55 | /* Synchronization functions from Xwindows */ 56 | #define XFDIOff 0 57 | #define XFDIOn 1 58 | #define XFDINotThere 2 59 | 60 | 61 | -------------------------------------------------------------------------------- /avl/runs/al.avl: -------------------------------------------------------------------------------- 1 | Allegro-lite 2M 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | 530.0 6.6 78.6 Sref Cref Bref reference area, chord, span 5 | 3.250 0.0 0.5 Xref Yref Zref moment reference location (arb.) 6 | 0.020 CDoref 7 | # 8 | #============================================================== 9 | # 10 | SURFACE 11 | WING 12 | 7 1.0 20 -2.0 ! Nchord Cspace Nspan Sspace 13 | # 14 | # reflect image wing about y=0 plane 15 | YDUPLICATE 16 | 0.00000 17 | # 18 | # twist angle bias for whole surface 19 | ANGLE 20 | 0.00000 21 | # 22 | # x,y,z bias for whole surface 23 | TRANSLATE 24 | 0.00000 0.00000 0.00000 25 | #-------------------------------------------------------------- 26 | # Xle Yle Zle chord angle Nspan Sspace 27 | SECTION 28 | 0.00000 0.00000 0.00000 8.0 1.490 5 0.25 29 | AFIL 30 | ag35.dat 31 | #----------------------- 32 | SECTION 33 | 0.500 15.0 0.0 7.5 1.380 7 -2.60 34 | AFIL 35 | ag36.dat 36 | #----------------------- 37 | SECTION 38 | 1.875 31.0 3.30 6.0 1.220 8 -2.25 39 | AFIL 40 | ag37.dat 41 | #----------------------- 42 | SECTION 43 | 3.625 39.3 7.00 4.0 0.940 1 0 44 | AFIL 45 | ag38.dat 46 | # 47 | #============================================================== 48 | # 49 | SURFACE 50 | Horizontal tail 51 | 5 1.0 7 -1.5 ! Nchord Cspace 52 | # 53 | YDUPLICATE 54 | 0.00000 55 | ANGLE 56 | 0.0000 57 | TRANSLATE 58 | 27.50000 0.00000 1.25000 59 | #-------------------------------------------------------------- 60 | SECTION 61 | 0.00000 0.00000 0.00000 3.5 0.000 7 -1.5 62 | 63 | CONTROL 64 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 65 | #----------------------- 66 | SECTION 67 | 1.15 9.0 0.00000 1.8 0.000 1 0 68 | 69 | CONTROL 70 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 71 | # 72 | #============================================================== 73 | # 74 | SURFACE 75 | Vertical tail 76 | 6 1.0 10 0.5 ! Nchord Cspace 77 | TRANSLATE 78 | 33.00000 0.00000 0.00000 79 | #-------------------------------------------------------------- 80 | SECTION 81 | -1.28 0.00000 -2.00000 3.20000 0.000 3 1.5 82 | 83 | CONTROL 84 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 85 | #----------------------- 86 | SECTION 87 | -1.68 0.00000 0.00000 4.20000 0.000 2 0.5 88 | 89 | CONTROL 90 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 91 | #----------------------- 92 | SECTION 93 | -1.5388 0.00000 1.25000 3.847 0.000 8 -1.5 94 | 95 | CONTROL 96 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 97 | #----------------------- 98 | SECTION 99 | -0.72 0.00000 8.50 1.80000 0.000 1 0 100 | 101 | CONTROL 102 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 103 | 104 | #============================================================== 105 | -------------------------------------------------------------------------------- /avl/runs/allegro.avl: -------------------------------------------------------------------------------- 1 | Allegro-lite 2M 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | 530.0 6.6 78.6 Sref Cref Bref reference area, chord, span 5 | 3.250 0.0 0.5 Xref Yref Zref moment reference location (arb.) 6 | 0.020 CDoref 7 | # 8 | #============================================================== 9 | # 10 | SURFACE 11 | WING 12 | 7 1.0 20 -2.0 ! Nchord Cspace Nspan Sspace 13 | # 14 | # reflect image wing about y=0 plane 15 | YDUPLICATE 16 | 0.00000 17 | # 18 | # twist angle bias for whole surface 19 | ANGLE 20 | 0.00000 21 | # 22 | # x,y,z bias for whole surface 23 | TRANSLATE 24 | 0.00000 0.00000 0.00000 25 | #-------------------------------------------------------------- 26 | # Xle Yle Zle chord angle Nspan Sspace 27 | SECTION 28 | 0.00000 0.00000 0.00000 8.0 1.490 5 0.25 29 | AFIL 30 | ag35.dat 31 | #----------------------- 32 | SECTION 33 | 0.500 15.0 0.0 7.5 1.380 7 -2.60 34 | AFIL 35 | ag36.dat 36 | #----------------------- 37 | SECTION 38 | 1.875 31.0 3.30 6.0 1.220 8 -2.25 39 | AFIL 40 | ag37.dat 41 | #----------------------- 42 | SECTION 43 | 3.625 39.3 7.00 4.0 0.940 1 0 44 | AFIL 45 | ag38.dat 46 | # 47 | #============================================================== 48 | # 49 | SURFACE 50 | Horizontal tail 51 | 5 1.0 7 -1.5 ! Nchord Cspace 52 | # 53 | YDUPLICATE 54 | 0.00000 55 | ANGLE 56 | 0.0000 57 | TRANSLATE 58 | 27.50000 0.00000 1.25000 59 | #-------------------------------------------------------------- 60 | SECTION 61 | 0.00000 0.00000 0.00000 3.5 0.000 7 -1.5 62 | 63 | CONTROL 64 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 65 | #----------------------- 66 | SECTION 67 | 1.15 9.0 0.00000 1.8 0.000 1 0 68 | 69 | CONTROL 70 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 71 | # 72 | #============================================================== 73 | # 74 | SURFACE 75 | Vertical tail 76 | 6 1.0 10 0.5 ! Nchord Cspace 77 | TRANSLATE 78 | 33.00000 0.00000 0.00000 79 | #-------------------------------------------------------------- 80 | SECTION 81 | -1.28 0.00000 -2.00000 3.20000 0.000 3 1.5 82 | 83 | CONTROL 84 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 85 | #----------------------- 86 | SECTION 87 | -1.68 0.00000 0.00000 4.20000 0.000 2 0.5 88 | 89 | CONTROL 90 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 91 | #----------------------- 92 | SECTION 93 | -1.5388 0.00000 1.25000 3.847 0.000 8 -1.5 94 | 95 | CONTROL 96 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 97 | #----------------------- 98 | SECTION 99 | -0.72 0.00000 8.50 1.80000 0.000 1 0 100 | 101 | CONTROL 102 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 103 | 104 | #============================================================== 105 | -------------------------------------------------------------------------------- /avl/runs/allegro.mass: -------------------------------------------------------------------------------- 1 | # 2 | # Allegro-Lite 2-meter RES glider 3 | # Mass & Inertia breakdown 4 | # 5 | # xyz is location of item's own CG 6 | # Ixx.. are item's inertias about item's own CG 7 | # 8 | # x back 9 | # y right 10 | # z up 11 | # 12 | # x,y,z system here must have origin 13 | # at same location as AVL input file 14 | # 15 | Lunit = 0.0254 m 16 | Munit = 0.001 kg 17 | Tunit = 1.0 s 18 | 19 | g = 9.81 20 | rho = 1.225 21 | 22 | # 23 | # mass x y z Ixx Iyy Izz [ Ixy Ixz Iyz ] 24 | # 25 | 156.0 4.0 0.0 0.0 11700 832 12532 ! wing center panel 26 | 55.5 4.2 22.0 1.0 1180 210 1390 ! wing R mid panel 27 | 55.5 4.2 -22.0 1.0 1180 210 1390 ! wing L mid panel 28 | 12.0 4.5 35.5 4.5 81 25 106 ! wing R tip panel 29 | 12.0 4.5 -35.5 4.5 81 25 106 ! wing R tip panel 30 | 70.0 0.0 0.0 0.0 0 0 0 ! fuselage pod 31 | 15.0 19.0 0.0 0.0 0 911 911 ! boom+rods 32 | 57.0 -4.0 0.0 0.0 0 0 0 ! battery 33 | 23.0 -1.0 0.0 0.0 0 0 0 ! RX 34 | 18.0 -2.5 0.0 0.0 0 0 0 ! servos 35 | 12.0 29.0 0.0 1.0 270 12 282 ! stab 36 | 10.0 34.0 0.0 2.0 81 90 9 ! rudder 37 | 18.0 -6.0 0.0 0.0 0 0 0 ! nose wt. 38 | -------------------------------------------------------------------------------- /avl/runs/asond.avl: -------------------------------------------------------------------------------- 1 | #*************************************** 2 | #AVL dataset for Aerosond wing/tail 3 | #*************************************** 4 | AEROSONDE 5 | #Mach 6 | 0.0 7 | #IYsym IZsym Zsym 8 | 0 0 0.0 9 | #Sref Cref Bref 10 | 0.6204 0.2113 2.938 11 | #Xref Yref Zref 12 | 0.07 0.0 0.0 13 | # 14 | #=================================== 15 | SURFACE 16 | Wing 17 | #Nchordwise Ccpace Nspanwise Sspace 18 | 8 1.0 14 -2.0 19 | YDUPLICATE 20 | 0.0 21 | 22 | SECTION 23 | #Xle Yle Zle Chord Ainc 24 | 0. 0. 0. 0.254 3. 25 | AFILE 26 | sd7037.dat 27 | 28 | SECTION 29 | #Xle Yle Zle Chord Ainc 30 | 0.0172 0.6226 0. 0.2287 3. 31 | CONTROL 32 | aileron -1.0 0.77 0. 0. 0. -1. 33 | AFILE 34 | sd7037.dat 35 | 36 | SECTION 37 | #Xle Yle Zle Chord Ainc 38 | 0.0407 1.469 0.1193 0.150 3. 39 | CONTROL 40 | aileron -1.0 0.77 0. 0. 0. -1. 41 | AFILE 42 | sd7037.dat 43 | 44 | # 45 | #=================================== 46 | SURFACE 47 | Tail 48 | #Nchordwise Cspace Nspanwise Sspace 49 | 8 1.0 8 1.0 50 | YDUPLICATE 51 | 0.0 52 | 53 | SECTION 54 | #Xle Yle Zle Chord Ainc 55 | 1.069 0. 0.45 0.1143 0. 56 | CONTROL 57 | elevator 1.0 0.70 0. 0. 0. 1. 58 | CONTROL 59 | rudder -1.0 0.70 0. 0. 0. -1. 60 | 61 | SECTION 62 | #Xle Yle Zle Chord Ainc 63 | 1.069 0.45 0.10 0.1143 0. 64 | CONTROL 65 | elevator 1.0 0.70 0. 0. 0. 1. 66 | CONTROL 67 | rudder -1.0 0.70 0. 0. 0. -1. 68 | 69 | -------------------------------------------------------------------------------- /avl/runs/bd.avl: -------------------------------------------------------------------------------- 1 | Bubble Dancer RES 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | 1000.0 10.0 116.6 Sref Cref Bref 5 | !3.4125 0.0 0.5 Xref Yref Zref 6 | 3.40 0.0 0.5 Xref Yref Zref 7 | 0.017 CDo 8 | # 9 | #============================================= 10 | BODY 11 | Fuse pod 12 | 12 1.0 13 | # 14 | TRANSLATE 15 | -12.5 0.0 -1.4 16 | # 17 | BFIL 18 | fuseBD.dat 19 | 20 | #============================================= 21 | SURFACE 22 | WING 23 | 6 1.0 30 -2.0 24 | YDUPLICATE 25 | 0.00000 26 | ANGLE 27 | 1.40000 28 | SCALE 29 | 1.0 1.0 1.0 30 | TRANSLATE 31 | 3.41 0.0 0.0 32 | #---------------------------------- 33 | # Xle Yle Zle chord angle Nspan Sspace 34 | SECTION 35 | -3.41 0.0 0.0 10.5 0.0 7 0.25 36 | AFIL 37 | ag35.dat 38 | #--------------------------- 39 | SECTION 40 | -3.25 18.0 0.0 10.0 0.0 11 -2.70 41 | AFIL 42 | ag35.dat 43 | #--------------------------- 44 | SECTION 45 | -2.500 41.66 4.25 8.0 -1.0 11 -2.25 46 | AFIL 47 | ag36.dat 48 | #--------------------------- 49 | SECTION 50 | -1.788 55.75 9.38 5.50 -1.0 1 0 51 | AFIL 52 | ag37.dat 53 | #--------------------------- 54 | SECTION 55 | -0.95 57.64 10.064 4.4 -1.0 1 0 56 | AFIL 57 | ag37.dat 58 | #--------------------------- 59 | SECTION 60 | 0.000 58.3 10.40 3.375 -1.0 1 0 61 | AFIL 62 | ag37.dat 63 | # 64 | #============================================= 65 | SURFACE 66 | Horizontal tail 67 | 5 1.0 68 | YDUPLICATE 69 | 0.00000 70 | ANGLE 71 | 0.000 72 | TRANSLATE 73 | 38.00000 0.00000 1.37500 74 | #--------------------------- 75 | SECTION 76 | 0.00000 0.00000 0.00000 5.5 0.000 7 -1.5 77 | 78 | #Cname Cgain Xhinge HingeVec SgnDup 79 | CONTROL 80 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 81 | #--------------------------- 82 | SECTION 83 | 1.85 12.0 0.00000 3.0 0.000 1 0 84 | 85 | CONTROL 86 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 87 | # 88 | #============================================= 89 | SURFACE 90 | Vertical tail 91 | 6 1.0 92 | SCALE 93 | 1.0 1.0 1.0 94 | !0.7 0.7 0.7 95 | !2.0 2.0 2.0 96 | TRANSLATE 97 | 46.5000 0.00000 0.00000 98 | #--------------------------- 99 | SECTION 100 | -2.00 0.00000 -3.50000 5.00000 0.000 3 1.5 101 | 102 | CONTROL 103 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 104 | #--------------------------- 105 | SECTION 106 | -2.80 0.00000 0.00000 7.00000 0.000 6 0.5 107 | 108 | CONTROL 109 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 110 | #--------------------------- 111 | SECTION 112 | -1.20 0.00000 10.5 3.00000 0.000 1 0 113 | 114 | CONTROL 115 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 116 | # 117 | #============================================= 118 | 119 | -------------------------------------------------------------------------------- /avl/runs/bd.eig: -------------------------------------------------------------------------------- 1 | # Bubble Dancer RES 2 | # 3 | # Run case Eigenvalue 4 | 1 -22.137093 0.0000000 5 | 1 -1.5019288 3.3018854 6 | 1 -1.5019288 -3.3018854 7 | 1 -10.907368 4.1658268 8 | 1 -10.907368 -4.1658268 9 | 1 -0.25159666 0.0000000 10 | 1 -0.12790082 1.0636228 11 | 1 -0.12790082 -1.0636228 12 | 2 -22.273901 0.0000000 13 | 2 -10.961069 4.1898804 14 | 2 -10.961069 -4.1898804 15 | 2 -1.5114830 3.2859044 16 | 2 -1.5114830 -3.2859044 17 | 2 -0.15387236 1.1461971 18 | 2 -0.15387236 -1.1461971 19 | 2 -0.20615157 0.0000000 20 | 3 -22.711000 0.0000000 21 | 3 -11.143432 4.2659073 22 | 3 -11.143432 -4.2659073 23 | 3 -1.5448612 3.2474315 24 | 3 -1.5448612 -3.2474315 25 | 3 -0.18219222 1.3630240 26 | 3 -0.18219222 -1.3630240 27 | 3 -0.15757890 0.0000000 28 | 4 -23.535202 0.0000000 29 | 4 -11.518213 4.4070210 30 | 4 -11.518213 -4.4070210 31 | 4 -1.6153479 3.2195501 32 | 4 -1.6153479 -3.2195501 33 | 4 -0.15860198 1.6437513 34 | 4 -0.15860198 -1.6437513 35 | 4 -0.18426865 0.0000000 36 | 5 -24.911774 0.0000000 37 | 5 -12.192216 4.6404610 38 | 5 -12.192216 -4.6404610 39 | 5 -1.7360643 3.2623601 40 | 5 -1.7360643 -3.2623601 41 | 5 -0.83267592E-01 1.9347451 42 | 5 -0.83267592E-01 -1.9347451 43 | 5 -0.26387343 0.0000000 44 | 6 -27.126568 0.0000000 45 | 6 -13.326963 5.0185990 46 | 6 -13.326963 -5.0185990 47 | 6 -1.9125749 3.4416065 48 | 6 -1.9125749 -3.4416065 49 | 6 0.34603870E-02 2.2228549 50 | 6 0.34603870E-02 -2.2228549 51 | 6 -0.33585122 0.0000000 52 | 7 -30.734692 0.0000000 53 | 7 -15.207093 5.6479106 54 | 7 -15.207093 -5.6479106 55 | 7 -2.1696866 3.8234141 56 | 7 -2.1696866 -3.8234141 57 | 7 0.58162514E-01 2.5508182 58 | 7 0.58162514E-01 -2.5508182 59 | 7 -0.35256502 0.0000000 60 | -------------------------------------------------------------------------------- /avl/runs/bd.mass: -------------------------------------------------------------------------------- 1 | # 2 | # Bubble Dancer 3 | # Mass & Inertia breakdown 4 | # 5 | # xyz is location of item's own CG 6 | # Ixx.. are item's inertias about item's own CG 7 | # 8 | # x back 9 | # y right 10 | # z up 11 | # 12 | # x,y,z system here must have origin 13 | # at same location as AVL input file 14 | # 15 | Lunit = 0.0254 m 16 | Munit = 0.001 kg 17 | Tunit = 1.0 s 18 | 19 | g = 9.81 20 | rho = 1.225 21 | 22 | # 23 | # mass x y z Ixx Iyy Izz [ Ixy Ixz Iyz ] 24 | + 0. 3.4 0. 0. 25 | 112.0 -5.0 0.0 0.0 0 4100 4100 ! pod 26 | 16.0 -8.0 0.0 0.0 0 80 80 ! hatch 27 | 28 | 34.0 -8.0 0.0 0.0 0 0 0 ! servos 29 | 91.0 -12.0 0.0 0.0 0 0 0 ! battery 30 | 28.0 -10.0 0.0 0.0 0 0 0 ! RX + wrap 31 | 20.0 -14.0 0.0 0.0 0 0 0 ! nose wt. 32 | 33 | 34.0 22.0 0. 0. 0 3800 3800 ! boom 34 | 35 | 9.0 15.0 0. 0. 0 1450 1450 ! pushrods 36 | 37 | 16.0 42.5 0.0 2.0 170 190 20 ! vert. tail 38 | 21.0 37.0 0.0 1.2 1055 105 1155 ! hori. tail 39 | 2.5 36.5 0.0 0.5 0 0 0 ! V-mount 40 | 41 | 18.0 2.0 0.0 0.0 1944 0 1944 ! spoiler 42 | 13.0 1.5 0. 0. 0 0 0 ! bolt beam 43 | 17.0 2.2 0. 0. 0 0 0 ! spoiler servo 44 | 2.0 0.0 18.0 0.0 0 0 0 ! R glass 45 | 2.0 0.0 -18.0 0.0 0 0 0 ! L glass 46 | 85.0 0.0 0.0 0.0 9180 0 9180 ! C spar 47 | 16.0 6.0 0.0 0.0 1728 0 1728 ! C TE 48 | 57.0 -1.3 0.0 0.0 6156 0 6275 ! C LE 49 | 32.0 0.5 0.0 0.0 3460 300 3760 ! C ribs 50 | 24.0 1.7 0. 0.0 2590 200 2790 ! C Oracover 51 | 52 | 15.0 0.0 18.0 0.0 0 0 0 ! R rod 53 | 15.0 0.0 -18.0 0.0 0 0 0 ! L rod 54 | 7.0 0.0 -19.5 0.0 0 0 0 ! ML joiner 55 | 7.0 0.0 19.5 0.0 0 0 0 ! MR joiner 56 | 11.0 0.0 18.0 0.0 0 0 0 ! CR joiner 57 | 11.0 0.0 -18.0 0.0 0 0 0 ! CL joiner 58 | 59 | 26.0 0.0 28.5 2.0 1248 0 1248 ! MR spar 60 | 5.0 5.5 28.5 2.0 240 0 240 ! MR TE 61 | 17.0 -1.1 28.5 2.0 864 0 864 ! MR LE 62 | 14.0 0.5 28.5 2.0 670 95 765 ! MR ribs 63 | 13.0 1.6 28.5 2.0 620 90 710 ! MR Oracover 64 | 65 | 7.0 0.0 50.0 7.0 190 20 210 ! TR spar 66 | 2.0 5.5 50.0 7.0 55 0 55 ! TR TE 67 | 7.0 -1.1 50.0 7.0 160 0 160 ! TR LE 68 | 4.0 0.5 50.0 7.0 110 10 120 ! TR ribs 69 | 7.0 1.6 50.0 7.0 170 20 190 ! MR Oracover 70 | 71 | 26.0 0.0 -28.5 2.0 1248 0 1248 ! ML spar 72 | 5.0 5.5 -28.5 2.0 240 0 240 ! ML TE 73 | 17.0 -1.1 -28.5 2.0 864 0 864 ! ML LE 74 | 14.0 0.5 -28.5 2.0 670 95 765 ! ML ribs 75 | 13.0 1.6 -28.5 2.0 620 90 710 ! ML Oracover 76 | 77 | 7.0 0.0 -50.0 7.0 190 20 210 ! TL spar 78 | 2.0 5.5 -50.0 7.0 55 0 55 ! TL TE 79 | 7.0 -1.1 -50.0 7.0 160 0 160 ! TL LE 80 | 4.0 0.5 -50.0 7.0 110 10 120 ! TL ribs 81 | 7.0 1.6 -50.0 7.0 170 20 190 ! ML Oracover 82 | 83 | ! 10.0 3.2 -60.0 9.0 0 0 0 ! tip weight 84 | ! 10.0 3.2 60.0 9.0 0 0 0 ! tip weight 85 | 86 | -------------------------------------------------------------------------------- /avl/runs/bd2.avl: -------------------------------------------------------------------------------- 1 | Bubble Dancer RES 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | 1000.0 10.0 116.6 Sref Cref Bref 5 | !3.4125 0.0 0.5 Xref Yref Zref 6 | 3.40 0.0 0.5 Xref Yref Zref 7 | 0.017 CDo 8 | # 9 | #============================================= 10 | BODY 11 | Fuse pod 12 | 12 1.0 13 | # 14 | TRANSLATE 15 | -12.5 0.0 -1.4 16 | # 17 | BFIL 18 | fuseBD.dat 19 | 20 | #============================================= 21 | SURFACE 22 | WING 23 | 6 1.0 30 -2.0 24 | YDUPLICATE 25 | 0.00000 26 | ANGLE 27 | 4.10000 28 | SCALE 29 | 1.0 1.0 1.0 30 | TRANSLATE 31 | 3.41 0.0 0.0 32 | #---------------------------------- 33 | # Xle Yle Zle chord angle Nspan Sspace 34 | SECTION 35 | -3.41 0.0 0.0 10.5 0.0 7 0.25 36 | AFIL 37 | ag35.dat 38 | #--------------------------- 39 | SECTION 40 | -3.25 18.0 0.0 10.0 0.0 11 -2.70 41 | AFIL 42 | ag35.dat 43 | #--------------------------- 44 | SECTION 45 | -2.500 41.66 4.25 8.0 -1.0 11 -2.25 46 | AFIL 47 | ag36.dat 48 | #--------------------------- 49 | SECTION 50 | -1.788 55.75 9.38 5.50 -1.0 1 0 51 | AFIL 52 | ag37.dat 53 | #--------------------------- 54 | SECTION 55 | -0.95 57.64 10.064 4.4 -1.0 1 0 56 | AFIL 57 | ag37.dat 58 | #--------------------------- 59 | SECTION 60 | 0.000 58.3 10.40 3.375 -1.0 1 0 61 | AFIL 62 | ag37.dat 63 | # 64 | #============================================= 65 | SURFACE 66 | Horizontal tail 67 | 5 1.0 16 0.0 68 | YDUPLICATE 69 | 0.00000 70 | ANGLE 71 | 2.70000 72 | TRANSLATE 73 | 38.00000 0.00000 1.37500 74 | #--------------------------- 75 | SECTION 76 | 0.00000 0.00000 0.00000 5.5 0.000 7 -1.5 77 | 78 | #Cname Cgain Xhinge HingeVec SgnDup 79 | CONTROL 80 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 81 | #--------------------------- 82 | SECTION 83 | 1.85 12.0 0.00000 3.0 0.000 1 0 84 | 85 | CONTROL 86 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 87 | # 88 | #============================================= 89 | SURFACE 90 | Vertical tail 91 | 6 1.0 92 | SCALE 93 | 1.0 1.0 1.0 94 | !0.7 0.7 0.7 95 | !2.0 2.0 2.0 96 | TRANSLATE 97 | 46.5000 0.00000 0.00000 98 | #--------------------------- 99 | SECTION 100 | -2.00 0.00000 -3.50000 5.00000 0.000 3 1.5 101 | 102 | CONTROL 103 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 104 | #--------------------------- 105 | SECTION 106 | -2.80 0.00000 0.00000 7.00000 0.000 6 0.5 107 | 108 | CONTROL 109 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 110 | #--------------------------- 111 | SECTION 112 | -1.20 0.00000 10.5 3.00000 0.000 1 0 113 | 114 | CONTROL 115 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 116 | # 117 | #============================================= 118 | 119 | -------------------------------------------------------------------------------- /avl/runs/bd2.eig: -------------------------------------------------------------------------------- 1 | # Bubble Dancer RES 2 | # 3 | # Run case Eigenvalue 4 | 1 -22.329228 0.0000000 5 | 1 -1.4990584 3.2649678 6 | 1 -1.4990584 -3.2649678 7 | 1 -0.18826769 0.0000000 8 | 1 -10.915095 3.9677569 9 | 1 -10.915095 -3.9677569 10 | 1 -0.11937207 1.0385245 11 | 1 -0.11937207 -1.0385245 12 | 2 -22.333274 0.0000000 13 | 2 -1.4628572 3.2628161 14 | 2 -1.4628572 -3.2628161 15 | 2 -0.18781041 0.0000000 16 | 2 -10.732829 3.1750434 17 | 2 -10.732829 -3.1750434 18 | 2 -0.13378002 0.97131038 19 | 2 -0.13378002 -0.97131038 20 | 3 -22.337523 0.0000000 21 | 3 -1.4270587 3.2600344 22 | 3 -1.4270587 -3.2600344 23 | 3 -0.18735992 0.0000000 24 | 3 -10.569537 1.9473949 25 | 3 -10.569537 -1.9473949 26 | 3 -0.15279521 0.88649515 27 | 3 -0.15279521 -0.88649515 28 | 4 -22.341973 0.0000000 29 | 4 -1.3916639 3.2566353 30 | 4 -1.3916639 -3.2566353 31 | 4 -0.18691609 0.0000000 32 | 4 -12.193705 0.0000000 33 | 4 -8.6525562 0.0000000 34 | 4 -0.17849707 0.77367936 35 | 4 -0.17849707 -0.77367936 36 | 5 -22.346624 0.0000000 37 | 5 -1.3566740 3.2526311 38 | 5 -1.3566740 -3.2526311 39 | 5 -0.18647878 0.0000000 40 | 5 -13.567298 0.0000000 41 | 5 -0.21444405 0.60816854 42 | 5 -0.21444405 -0.60816854 43 | 5 -7.0127918 0.0000000 44 | 6 -22.351473 0.0000000 45 | 6 -1.3220901 3.2480335 46 | 6 -1.3220901 -3.2480335 47 | 6 -0.18604788 0.0000000 48 | 6 -14.535917 0.0000000 49 | 6 -5.7909874 0.0000000 50 | 6 -0.26745486 0.28005250 51 | 6 -0.26745486 -0.28005250 52 | 7 -22.356519 0.0000000 53 | 7 -1.2879132 3.2428539 54 | 7 -1.2879132 -3.2428539 55 | 7 -0.18562328 0.0000000 56 | 7 -15.366722 0.0000000 57 | 7 -4.6881474 0.0000000 58 | 7 -0.92228968 0.0000000 59 | 7 0.21541401 0.0000000 60 | -------------------------------------------------------------------------------- /avl/runs/bd2.mass: -------------------------------------------------------------------------------- 1 | # 2 | # Bubble Dancer 3 | # Mass & Inertia breakdown 4 | # 5 | # xyz is location of item's own CG 6 | # Ixx.. are item's inertias about item's own CG 7 | # 8 | # x back 9 | # y right 10 | # z up 11 | # 12 | # x,y,z system here must have origin 13 | # at same location as AVL input file 14 | # 15 | Lunit = 0.0254 m 16 | Munit = 0.001 kg 17 | Tunit = 1.0 s 18 | 19 | g = 9.81 20 | rho = 1.225 21 | 22 | # 23 | # mass x y z Ixx Iyy Izz [ Ixy Ixz Iyz ] 24 | + 0. 3.4 0. 0. 25 | 112.0 -5.0 0.0 0.0 0 4100 4100 ! pod 26 | 16.0 -8.0 0.0 0.0 0 80 80 ! hatch 27 | 28 | 34.0 -8.0 0.0 0.0 0 0 0 ! servos 29 | 91.0 -12.0 0.0 0.0 0 0 0 ! battery 30 | 28.0 -10.0 0.0 0.0 0 0 0 ! RX + wrap 31 | 20.0 -14.0 0.0 0.0 0 0 0 ! nose wt. 32 | 33 | 34.0 22.0 0. 0. 0 3800 3800 ! boom 34 | 35 | 9.0 15.0 0. 0. 0 1450 1450 ! pushrods 36 | 37 | 16.0 42.5 0.0 2.0 170 190 20 ! vert. tail 38 | 21.0 37.0 0.0 1.2 1055 105 1155 ! hori. tail 39 | 2.5 36.5 0.0 0.5 0 0 0 ! V-mount 40 | 41 | 18.0 2.0 0.0 0.0 1944 0 1944 ! spoiler 42 | 13.0 1.5 0. 0. 0 0 0 ! bolt beam 43 | 17.0 2.2 0. 0. 0 0 0 ! spoiler servo 44 | 2.0 0.0 18.0 0.0 0 0 0 ! R glass 45 | 2.0 0.0 -18.0 0.0 0 0 0 ! L glass 46 | 85.0 0.0 0.0 0.0 9180 0 9180 ! C spar 47 | 16.0 6.0 0.0 0.0 1728 0 1728 ! C TE 48 | 57.0 -1.3 0.0 0.0 6156 0 6275 ! C LE 49 | 32.0 0.5 0.0 0.0 3460 300 3760 ! C ribs 50 | 24.0 1.7 0. 0.0 2590 200 2790 ! C Oracover 51 | 52 | 15.0 0.0 18.0 0.0 0 0 0 ! R rod 53 | 15.0 0.0 -18.0 0.0 0 0 0 ! L rod 54 | 7.0 0.0 -19.5 0.0 0 0 0 ! ML joiner 55 | 7.0 0.0 19.5 0.0 0 0 0 ! MR joiner 56 | 11.0 0.0 18.0 0.0 0 0 0 ! CR joiner 57 | 11.0 0.0 -18.0 0.0 0 0 0 ! CL joiner 58 | 59 | 26.0 0.0 28.5 2.0 1248 0 1248 ! MR spar 60 | 5.0 5.5 28.5 2.0 240 0 240 ! MR TE 61 | 17.0 -1.1 28.5 2.0 864 0 864 ! MR LE 62 | 14.0 0.5 28.5 2.0 670 95 765 ! MR ribs 63 | 13.0 1.6 28.5 2.0 620 90 710 ! MR Oracover 64 | 65 | 7.0 0.0 50.0 7.0 190 20 210 ! TR spar 66 | 2.0 5.5 50.0 7.0 55 0 55 ! TR TE 67 | 7.0 -1.1 50.0 7.0 160 0 160 ! TR LE 68 | 4.0 0.5 50.0 7.0 110 10 120 ! TR ribs 69 | 7.0 1.6 50.0 7.0 170 20 190 ! MR Oracover 70 | 71 | 26.0 0.0 -28.5 2.0 1248 0 1248 ! ML spar 72 | 5.0 5.5 -28.5 2.0 240 0 240 ! ML TE 73 | 17.0 -1.1 -28.5 2.0 864 0 864 ! ML LE 74 | 14.0 0.5 -28.5 2.0 670 95 765 ! ML ribs 75 | 13.0 1.6 -28.5 2.0 620 90 710 ! ML Oracover 76 | 77 | 7.0 0.0 -50.0 7.0 190 20 210 ! TL spar 78 | 2.0 5.5 -50.0 7.0 55 0 55 ! TL TE 79 | 7.0 -1.1 -50.0 7.0 160 0 160 ! TL LE 80 | 4.0 0.5 -50.0 7.0 110 10 120 ! TL ribs 81 | 7.0 1.6 -50.0 7.0 170 20 190 ! ML Oracover 82 | 83 | ! 10.0 3.2 -60.0 9.0 0 0 0 ! tip weight 84 | ! 10.0 3.2 60.0 9.0 0 0 0 ! tip weight 85 | 86 | -------------------------------------------------------------------------------- /avl/runs/ellip.avl: -------------------------------------------------------------------------------- 1 | !*************************************** 2 | !AVL dataset for Elliptical chord wing 3 | !Straight LE, elliptical chord distrib. 4 | !*************************************** 5 | ELLIPTICAL WING 6 | !Mach 7 | 0.0 8 | !IYsym IZsym Zsym 9 | 1 0 0.0 10 | !Sref Cref Bref 11 | 0.15708 0.07854 2.0 12 | !Xref Yref Zref 13 | 0.025 0.0 0.0 14 | ! 15 | ! 16 | SURFACE 17 | WING 18 | !Nchordwise Space 19 | 1 1.0 96 0 20 | SECTION 21 | !Xle Yle Zle Chord Ainc Nspanwise Space 22 | 0.000 0.000 0.000 0.1000 0. 2 0.0 23 | NACA 24 | 0000 25 | CONTROL 26 | flap1 1.000 0.000 0. 1. 0. +1 27 | SECTION 28 | !Xle Yle Zle Chord Ainc Nspanwise Space 29 | 0.000 0.131 0.000 0.0991 0. 2 0.0 30 | NACA 31 | 0000 32 | CONTROL 33 | flap1 1.000 0.000 0. 1. 0. +1 34 | SECTION 35 | !Xle Yle Zle Chord Ainc Nspanwise Space 36 | 0.000 0.259 0.000 0.0966 0. 2 0.0 37 | NACA 38 | 0000 39 | CONTROL 40 | flap1 1.000 0.000 0. 1. 0. +1 41 | CONTROL 42 | flap2 1.000 0.000 0. 1. 0. +1 43 | SECTION 44 | !Xle Yle Zle Chord Ainc Nspanwise Space 45 | 0.000 0.383 0.000 0.0924 0. 2 0.0 46 | NACA 47 | 0000 48 | CONTROL 49 | flap2 1.000 0.000 0. 1. 0. +1 50 | SECTION 51 | !Xle Yle Zle Chord Ainc Nspanwise Space 52 | 0.000 0.500 0.000 0.0866 0. 2 0.0 53 | NACA 54 | 0000 55 | CONTROL 56 | flap2 1.000 0.000 0. 1. 0. +1 57 | SECTION 58 | !Xle Yle Zle Chord Ainc Nspanwise Space 59 | 0.000 0.609 0.000 0.0793 0. 2 0.0 60 | NACA 61 | 0000 62 | CONTROL 63 | flap2 1.000 0.000 0. 1. 0. +1 64 | SECTION 65 | !Xle Yle Zle Chord Ainc Nspanwise Space 66 | 0.000 0.707 0.000 0.0707 0. 2 0.0 67 | NACA 68 | 0000 69 | CONTROL 70 | flap2 1.000 0.000 0. 1. 0. +1 71 | CONTROL 72 | flap3 1.000 0.000 0. 1. 0. +1 73 | SECTION 74 | !Xle Yle Zle Chord Ainc Nspanwise Space 75 | 0.000 0.793 0.000 0.0609 0. 2 0.0 76 | NACA 77 | 0000 78 | CONTROL 79 | flap3 1.000 0.000 0. 1. 0. +1 80 | SECTION 81 | !Xle Yle Zle Chord Ainc Nspanwise Space 82 | 0.000 0.866 0.000 0.0500 0. 2 0.0 83 | NACA 84 | 0000 85 | CONTROL 86 | flap3 1.000 0.000 0. 1. 0. +1 87 | SECTION 88 | !Xle Yle Zle Chord Ainc Nspanwise Space 89 | 0.000 0.924 0.000 0.0383 0. 2 0.0 90 | NACA 91 | 0000 92 | CONTROL 93 | flap3 1.000 0.000 0. 1. 0. +1 94 | SECTION 95 | !Xle Yle Zle Chord Ainc Nspanwise Space 96 | 0.000 0.966 0.000 0.0259 0. 2 0.0 97 | NACA 98 | 0000 99 | CONTROL 100 | flap3 1.000 0.000 0. 1. 0. +1 101 | SECTION 102 | !Xle Yle Zle Chord Ainc Nspanwise Space 103 | 0.000 0.991 0.000 0.0131 0. 2 0.0 104 | NACA 105 | 0000 106 | CONTROL 107 | flap3 1.000 0.000 0. 1. 0. +1 108 | SECTION 109 | !Xle Yle Zle Chord Ainc Nspanwise Space 110 | 0.000 1.000 0.000 0.0044 0. 2 0.0 111 | NACA 112 | 0000 113 | CONTROL 114 | flap3 1.000 0.000 0. 1. 0. +1 115 | -------------------------------------------------------------------------------- /avl/runs/fort.6: -------------------------------------------------------------------------------- 1 | 2 | Operation of run case 1/1: -unnamed- 3 | ========================================================== 4 | -------------------------------------------------------------------------------- /avl/runs/fuseBD.dat: -------------------------------------------------------------------------------- 1 | BubbleDancer fuselage 2 | 24.168690 0.388517 3 | 23.900873 0.423880 4 | 23.262695 0.504717 5 | 22.538902 0.585219 6 | 21.802526 0.659829 7 | 21.067442 0.726035 8 | 20.328125 0.784973 9 | 19.585644 0.837796 10 | 18.841869 0.884984 11 | 18.097689 0.926542 12 | 17.352444 0.962610 13 | 16.605238 0.993698 14 | 15.856183 1.020447 15 | 15.105848 1.043349 16 | 14.354470 1.062763 17 | 13.602428 1.078936 18 | 12.850190 1.092018 19 | 12.098064 1.101981 20 | 11.346459 1.108676 21 | 10.595548 1.111896 22 | 9.845401 1.111343 23 | 9.096186 1.106721 24 | 8.347555 1.097767 25 | 7.599729 1.084287 26 | 6.853420 1.065948 27 | 6.109801 1.042138 28 | 5.370431 1.011763 29 | 4.636745 0.973315 30 | 3.910655 0.924908 31 | 3.195118 0.864179 32 | 2.495191 0.788121 33 | 1.820710 0.693214 34 | 1.200497 0.577529 35 | 0.708032 0.451513 36 | 0.403890 0.344465 37 | 0.231594 0.263610 38 | 0.126103 0.198154 39 | 0.057608 0.139453 40 | 0.017276 0.080239 41 | 0.001598 0.024989 42 | 0.001604 -0.024975 43 | 0.017295 -0.080221 44 | 0.057642 -0.139426 45 | 0.126151 -0.198108 46 | 0.231657 -0.263537 47 | 0.403972 -0.344347 48 | 0.708134 -0.451315 49 | 1.200625 -0.577203 50 | 1.820862 -0.692728 51 | 2.495368 -0.787463 52 | 3.195314 -0.863341 53 | 3.910865 -0.923885 54 | 4.636969 -0.972106 55 | 5.370667 -1.010364 56 | 6.110044 -1.040549 57 | 6.853670 -1.064167 58 | 7.599985 -1.082314 59 | 8.347817 -1.095602 60 | 9.096450 -1.104362 61 | 9.845663 -1.108790 62 | 10.595808 -1.109149 63 | 11.346716 -1.105736 64 | 12.098319 -1.098847 65 | 12.850442 -1.088690 66 | 13.602676 -1.075413 67 | 14.354710 -1.059046 68 | 15.106083 -1.039438 69 | 15.856415 -1.016341 70 | 16.605465 -0.989399 71 | 17.352665 -0.958118 72 | 18.097900 -0.921857 73 | 18.842075 -0.880107 74 | 19.585842 -0.832726 75 | 20.328306 -0.779710 76 | 21.067608 -0.720581 77 | 21.802673 -0.654185 78 | 22.539026 -0.579385 79 | 23.262798 -0.498696 80 | 23.900959 -0.417693 81 | 24.168774 -0.382260 82 | -------------------------------------------------------------------------------- /avl/runs/geominp: -------------------------------------------------------------------------------- 1 | plop 2 | g 3 | c 4 | 5 | oper 6 | g 7 | h 8 | 9 | 10 | quit 11 | 12 | -------------------------------------------------------------------------------- /avl/runs/h.avl: -------------------------------------------------------------------------------- 1 | Hershey wing 2 | 0.0 ! Mach 3 | 0 0 0.0 ! iYsym iZsym Zsym 4 | 1.333 1.0 2.0 ! Sref Cref Bref reference area, chord, span 5 | 0.25 0.0 0.0 ! Xref Yref Zref moment reference location (arb.) 6 | 0.0 ! CDp 7 | # 8 | #============================================================== 9 | # 10 | SURFACE 11 | Wing 12 | 16 1.0 24 -2.0 ! Nchord Cspace Nspan Sspace 13 | # 14 | YDUPLICATE 15 | 0.0 16 | # 17 | # twist angle bias for whole surface 18 | ANGLE 19 | 0.00000 20 | # 21 | SCALE 22 | 0.66667 1.0 0.0 23 | # 24 | # x,y,z bias for whole surface 25 | TRANSLATE 26 | 0. 0. 0. 27 | # 28 | #----------------------------- 29 | SECTION 30 | 0.0 0.0 0.0 1.0 0.000 31 | CONTROL 32 | LEflap 1.0 -0.3 0. 0. 0. 1 33 | !#----------------------------- 34 | !SECTION 35 | ! 0.0 0.65 1.0 1.0 0.000 36 | !CONTROL 37 | !LEflap 1.0 -0.3 0. 0. 0. 1 38 | #----------------------------- 39 | SECTION 40 | 0.0 1.0 1.0 1.0 0.000 41 | CONTROL 42 | LEflap 1.0 -0.3 0. 0. 0. 1 43 | #----------------------------- 44 | -------------------------------------------------------------------------------- /avl/runs/h6.avl: -------------------------------------------------------------------------------- 1 | Hershey wing 2 | 0.0 ! Mach 3 | 0 0 0.0 ! iYsym iZsym Zsym 4 | 6.0 1.0 6.0 ! Sref Cref Bref reference area, chord, span 5 | 0.25 0.0 0.0 ! Xref Yref Zref moment reference location (arb.) 6 | 0.0 ! CDp 7 | # 8 | #============================================================== 9 | # 10 | SURFACE 11 | Wing 12 | 16 1.0 24 -2.0 ! Nchord Cspace Nspan Sspace 13 | # 14 | YDUPLICATE 15 | 0.0 16 | # 17 | # twist angle bias for whole surface 18 | ANGLE 19 | 0.00000 20 | # 21 | SCALE 22 | 1.0 1.0 1.0 23 | # 24 | # x,y,z bias for whole surface 25 | TRANSLATE 26 | 0. 0. 0. 27 | # 28 | #----------------------------- 29 | SECTION 30 | 0.0 0.0 0.0 1.00 0.000 31 | NACA 32 | 4412 33 | #----------------------------- 34 | SECTION 35 | 0.0 3.0 0. 1.00 0.000 36 | NACA 37 | 4412 38 | #----------------------------- 39 | -------------------------------------------------------------------------------- /avl/runs/hershey.avl: -------------------------------------------------------------------------------- 1 | Hershey wing 2 | 0.0 ! Mach 3 | 0 0 0.0 ! iYsym iZsym Zsym 4 | 0.004 0.2 2.0 ! Sref Cref Bref reference area, chord, span 5 | 0.05 0.0 0.0 ! Xref Yref Zref moment reference location (arb.) 6 | 0.0 ! CDp 7 | # 8 | #============================================================== 9 | # 10 | SURFACE 11 | Wing 12 | 4 1.0 24 -2.0 ! Nchord Cspace Nspan Sspace 13 | # 14 | YDUPLICATE 15 | 0.0 16 | # 17 | # twist angle bias for whole surface 18 | ANGLE 19 | 0.00000 20 | # 21 | SCALE 22 | 1.0 1.0 0.0 23 | # 24 | # x,y,z bias for whole surface 25 | TRANSLATE 26 | 0. 0. 0. 27 | # 28 | #----------------------------- 29 | SECTION 30 | 0.0 0.0 0.0 0.2 0.000 31 | CONTROL 32 | LEflap 1.0 -0.3 0. 0. 0. 1 33 | !#----------------------------- 34 | !SECTION 35 | ! 0.0 0.65 1.0 0.2 0.000 36 | !CONTROL 37 | !LEflap 1.0 -0.3 0. 0. 0. 1 38 | #----------------------------- 39 | SECTION 40 | 0.0 1.0 3.0 0.2 0.000 41 | CONTROL 42 | LEflap 1.0 -0.3 0. 0. 0. 1 43 | #----------------------------- 44 | -------------------------------------------------------------------------------- /avl/runs/hershey.eig: -------------------------------------------------------------------------------- 1 | # Hershey wing 2 | # 3 | # Run case Eigenvalue 4 | 1 -5.9738565 0.0000000 5 | 1 -0.20261433 1.6864837 6 | 1 -0.20261433 -1.6864837 7 | 1 -13.311413 0.0000000 8 | 1 -0.44854518 1.1525856 9 | 1 -0.44854518 -1.1525856 10 | 1 -0.15992201E-02 0.0000000 11 | 2 -6.8545225 0.0000000 12 | 2 -0.13584334 1.4731561 13 | 2 -0.13584334 -1.4731561 14 | 2 -15.712455 0.0000000 15 | 2 -0.42857352 0.97507479 16 | 2 -0.42857352 -0.97507479 17 | 2 -0.10181265E-02 0.0000000 18 | 3 -7.0874574 0.0000000 19 | 3 -0.12402350 1.4252053 20 | 3 -0.12402350 -1.4252053 21 | 3 -16.321373 0.0000000 22 | 3 -0.42870217 0.93564154 23 | 3 -0.42870217 -0.93564154 24 | 3 -0.91307142E-03 0.0000000 25 | 4 -8.3555489 0.0000000 26 | 4 -0.82362471E-01 1.2100655 27 | 4 -0.82362471E-01 -1.2100655 28 | 4 -19.533924 0.0000000 29 | 4 -0.44977611 0.75376801 30 | 4 -0.44977611 -0.75376801 31 | 4 -0.53244304E-03 0.0000000 32 | 5 -9.9670631 0.0000000 33 | 5 -0.58002743E-01 1.0147965 34 | 5 -0.58002743E-01 -1.0147965 35 | 5 -23.486554 0.0000000 36 | 5 -0.50177493 0.56421643 37 | 5 -0.50177493 -0.56421643 38 | 5 -0.29246789E-03 0.0000000 39 | 6 -11.782155 0.0000000 40 | 6 -0.46240346E-01 0.85849512 41 | 6 -0.46240346E-01 -0.85849512 42 | 6 -27.866683 0.0000000 43 | 6 -0.57395894 0.34998419 44 | 6 -0.57395894 -0.34998419 45 | 6 -0.15846275E-03 0.0000000 46 | -------------------------------------------------------------------------------- /avl/runs/longwing.avl: -------------------------------------------------------------------------------- 1 | Very high aspect ratio wing 2 | #Mach 3 | 0.0 4 | #IYsym IZsym Zsym 5 | 0 0 0.0 6 | #Sref Cref Bref 7 | 100.0 1.0 100.0 8 | #Xref Yref Zref 9 | 0.25 0.0 0.0 10 | # 11 | # 12 | #==================================================================== 13 | SURFACE 14 | Wing 15 | #Nchordwise Cspace Nspanwise Sspace 16 | 8 1.0 40 -2.0 17 | # 18 | YDUPLICATE 19 | 0.0 20 | # 21 | ANGLE 22 | 0.0 23 | #------------------------------------------------------------- 24 | SECTION 25 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 26 | 0. 0. 0. 1.0 0.0 0 0 27 | 28 | NACA 29 | 4520 30 | 31 | #Cname Cgain Xhinge HingeVec SgnDup 32 | CONTROL 33 | flap 1.0 0.75 0.0 0.0 0.0 1.0 34 | 35 | CONTROL 36 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 37 | 38 | CLAF 39 | 1.15 40 | 41 | #------------------------------------------------------------- 42 | SECTION 43 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 44 | 0.0 50.0 0.0 1.0 0.0 0 0 45 | 46 | NACA 47 | 4500 48 | 49 | #Cname Cgain Xhinge HingeVec SgnDup 50 | CONTROL 51 | flap 1.0 0.75 0.0 0.0 0.0 1.0 52 | 53 | CONTROL 54 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 55 | 56 | CLAF 57 | 1.15 58 | # 59 | -------------------------------------------------------------------------------- /avl/runs/plane.avl: -------------------------------------------------------------------------------- 1 | !*************************************** 2 | !Sample AVL input dataset 3 | !*************************************** 4 | Plane Vanilla 5 | !Mach 6 | 0.0 7 | !IYsym IZsym Zsym 8 | 0 0 0.0 9 | !Sref Cref Bref 10 | 12.0 1.0 15.0 11 | !Xref Yref Zref 12 | 0.0 0.0 0.0 13 | 14 | #-------------------------------------------------- 15 | SURFACE 16 | WING 17 | !Nchordwise Cspace Nspanwise Sspace 18 | 1 1.0 16 -2.0 19 | YDUPLICATE 20 | 0.0 21 | ANGLE 22 | 4.0 23 | 24 | SECTION 25 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 26 | -0.25 0. 0. 1.000 0. 8 1.0 27 | CONTROL 28 | aileron 1.0 0.0 0. 0. 0. -1 29 | 30 | SECTION 31 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 32 | -0.175 7.5 0.5 0.700 0. 0 0 33 | CONTROL 34 | aileron 1.0 0.0 0. 0. 0. -1 35 | 36 | #-------------------------------------------------- 37 | SURFACE 38 | STAB 39 | !Nchordwise Cspace Nspanwise Sspace 40 | 1 1.0 7 -2.0 41 | YDUPLICATE 42 | 0.0 43 | TRANSLATE 44 | 6.0 0.0 0.5 45 | SECTION 46 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 47 | -0.1 0. 0.0 0.4 0. 7 -1.25 48 | CONTROL 49 | elevator 1.0 0.0 0. 0. 0. 1 50 | 51 | SECTION 52 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 53 | -0.075 2.00 0.0 0.3 0. 0 0 54 | CONTROL 55 | elevator 1.0 0.0 0. 0. 0. 1 56 | 57 | #-------------------------------------------------- 58 | SURFACE 59 | FIN 60 | !Nchordwise Cspace Nspanewise Sspace 61 | 1 1.0 10 1.0 62 | TRANSLATE 63 | 6.0 0.0 0.5 64 | SECTION 65 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 66 | -0.1 0. 0.0 0.4 0. 7 -1.25 67 | CONTROL 68 | rudder 1.0 0.0 0. 0. 0. 1 69 | 70 | SECTION 71 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 72 | -0.075 0. 1.0 0.3 0. 0 0 73 | CONTROL 74 | rudder 1.0 0.0 0. 0. 0. 1 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /avl/runs/plane.eig: -------------------------------------------------------------------------------- 1 | # Plane Vanilla 2 | # 3 | # Run case Eigenvalue 4 | 1 -12.907391 0.0000000 5 | 1 -0.24627495 2.0653901 6 | 1 -0.24627495 -2.0653901 7 | 1 0.92339096E-02 0.0000000 8 | 1 -7.0458219 6.6507334 9 | 1 -7.0458219 -6.6507334 10 | 1 -0.40459605E-02 0.56021121 11 | 1 -0.40459605E-02 -0.56021121 12 | -------------------------------------------------------------------------------- /avl/runs/plane.mass: -------------------------------------------------------------------------------- 1 | # 2 | # Plane Vanilla 3 | # Mass & Inertia breakdown 4 | # 5 | # xyz is location of item's own CG 6 | # Ixx.. are item's inertias about item's own CG 7 | # 8 | # x back 9 | # y right 10 | # z up 11 | # 12 | # x,y,z system here must have origin 13 | # at same location as AVL input file 14 | # 15 | Lunit = 1.0 ft 16 | Munit = 1.0 slug 17 | Tunit = 1.0 s 18 | 19 | g = 32.18 20 | rho = 0.002378 21 | 22 | # 23 | # mass x y z Ixx Iyy Izz [ Ixy Ixz Iyz ] 24 | 0.1773 0.02463 0. 0.2239 1.350 0.7509 2.095 25 | -------------------------------------------------------------------------------- /avl/runs/plane.run: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------- 3 | Run case 1: -unnamed- 4 | 5 | alpha -> CL = 0.390510 6 | beta -> beta = 0.00000 7 | pb/2V -> pb/2V = 0.00000 8 | qc/2V -> qc/2V = 0.00000 9 | rb/2V -> rb/2V = 0.00000 10 | aileron -> Cl roll mom = 0.00000 11 | elevator -> Cm pitchmom = 0.00000 12 | rudder -> Cn yaw mom = 0.00000 13 | 14 | alpha = -0.145500 deg 15 | beta = 0.00000 deg 16 | pb/2V = 0.00000 17 | qc/2V = 0.00000 18 | rb/2V = -0.282696E-35 19 | CL = 0.390510 20 | CDo = 0.835000E-02 21 | bank = 0.00000 deg 22 | elevation = 0.00000 deg 23 | heading = 0.00000 deg 24 | Mach = 0.00000 25 | velocity = 64.5396 ft/s 26 | density = 0.584600E-03 slug/ft^3 27 | grav.acc. = 32.1800 ft/s^2 28 | turn_rad. = 0.00000 ft 29 | load_fac. = 1.00000 30 | X_cg = 0.246300E-01 31 | Y_cg = 0.00000 32 | Z_cg = 0.223900 33 | mass = 0.177300 slug 34 | Ixx = 1.35000 slug-ft^2 35 | Iyy = 0.750900 slug-ft^2 36 | Izz = 2.09500 slug-ft^2 37 | Ixy = 0.00000 slug-ft^2 38 | Iyz = 0.00000 slug-ft^2 39 | Izx = 0.00000 slug-ft^2 40 | visc CL_a = 0.00000 41 | visc CL_u = 0.00000 42 | visc CM_a = 0.00000 43 | visc CM_u = 0.00000 44 | -------------------------------------------------------------------------------- /avl/runs/plotgeom.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | echo $1 3 | avl $1 < geominp 4 | mv plot.ps $1.ps 5 | 6 | -------------------------------------------------------------------------------- /avl/runs/sample.avl: -------------------------------------------------------------------------------- 1 | !*************************************** 2 | !Sample AVL input dataset 3 | !*************************************** 4 | Sample Airplane 5 | !Mach 6 | 0.0 7 | !IYsym IZsym Zsym 8 | 0 0 0.0 9 | !Sref Cref Bref 10 | 7.80 0.78 10.0 11 | !Xref Yref Zref 12 | 0.5 0.0 0.0 13 | ! 14 | SURFACE 15 | WING 16 | !Nchordwise Cspace 17 | 6 1.0 18 | YDUPLICATE 19 | 0.0 20 | SECTION 21 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 22 | 0. 0. 0. 1.000 0. 8 1.0 23 | SECTION 24 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 25 | 0.2 3.0 0.2 0.800 0. 7 1.0 26 | SECTION 27 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 28 | 0.6 5.0 0.5 0.400 0. 0 0 29 | ! 30 | SURFACE 31 | STAB 32 | !Nchordwise Space 33 | 5 1.0 34 | YDUPLICATE 35 | 0.0 36 | SECTION 37 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 38 | 2.0 0. -0.2 0.8 0. 7 -1.25 39 | SECTION 40 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 41 | 2.8 1.80 -0.6 0.3 0. 0 0 42 | SURFACE 43 | FIN 44 | !Nchordwise Space 45 | 5 1.0 46 | SECTION 47 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 48 | 1.80 0. -0.2 0.8 0. 7 -1.25 49 | SECTION 50 | !Xle Yle Zle Chord Ainc Nspanwise Sspace 51 | 2.6 0. 1.0 0.3 0. 0 0 52 | END 53 | 54 | -------------------------------------------------------------------------------- /avl/runs/square.avl: -------------------------------------------------------------------------------- 1 | Square wing 2 | 0.0 ! Mach 3 | 0 0 0.0 ! iYsym iZsym Zsym 4 | 1.0 1.0 1.0 ! Sref Cref Bref reference area, chord, span 5 | 0.25 0.0 0.0 ! Xref Yref Zref moment reference location (arb.) 6 | 0.0 ! CDp 7 | # 8 | #============================================================== 9 | # 10 | SURFACE 11 | Wing 12 | 24 1.0 24 -2.0 ! Nchord Cspace Nspan Sspace 13 | # 14 | YDUPLICATE 15 | 0.0 16 | # 17 | # twist angle bias for whole surface 18 | ANGLE 19 | 0.00000 20 | # 21 | SCALE 22 | 1.0 1.0 0.0 23 | # 24 | # x,y,z bias for whole surface 25 | TRANSLATE 26 | 0. 0. 0. 27 | # 28 | #----------------------------- 29 | SECTION 30 | 0.0 0.0 0.0 1.0 0.000 31 | #----------------------------- 32 | SECTION 33 | 0.0 0.5 0.0 1.0 0.000 34 | #----------------------------- 35 | -------------------------------------------------------------------------------- /avl/runs/sub.avl: -------------------------------------------------------------------------------- 1 | Submarine 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | 0.25 5.0 5.0 Sref Cref Bref 5 | 2.5 0.0 0.0 Xref Yref Zref 6 | 0.15 CDo 7 | # 8 | #============================================= 9 | BODY 10 | Hull 11 | 24 1.0 12 | # 13 | TRANSLATE 14 | 0. 0. 0. 15 | SCALE 16 | 5.0 5.0 5.0 17 | # 18 | BFIL 19 | sub.dat 20 | 21 | #============================================= 22 | SURFACE 23 | Horizontal tail 24 | 5 1.0 5 -2.0 25 | YDUPLICATE 26 | 0.0 27 | ANGLE 28 | 0.0 29 | SCALE 30 | 1.0 1.0 1.0 31 | TRANSLATE 32 | 4.8 0.0 0.0 33 | #--------------------------- 34 | SECTION 35 | # Xle Yle Zle Chord Angle Nspan 36 | 0.0 0.0 0.0 0.2 0.000 7 -1.5 37 | 38 | #Cname Cgain Xhinge HingeVec SgnDup 39 | CONTROL 40 | elevator 1.0 0.5 0.0 1.0 0.0 1.0 41 | #--------------------------- 42 | SECTION 43 | 0.05 0.3 0.0 0.15 0.000 1 0 44 | 45 | CONTROL 46 | elevator 1.0 0.5 0.0 1.0 0.0 1.0 47 | # 48 | #============================================= 49 | SURFACE 50 | Vertical tail 51 | 5 1.0 10 1.0 52 | ANGLE 53 | 0.0 54 | SCALE 55 | 1.0 1.0 1.0 56 | TRANSLATE 57 | 4.8 0.0 0.0 58 | #--------------------------- 59 | SECTION 60 | 0.05 0.0 -0.3 0.15 0.000 1 0 61 | 62 | CONTROL 63 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 64 | # 65 | #--------------------------- 66 | SECTION 67 | 0.0 0.0 0.0 0.2 0.000 7 -1.5 68 | 69 | CONTROL 70 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 71 | #--------------------------- 72 | SECTION 73 | 0.05 0.0 0.3 0.15 0.000 1 0 74 | 75 | CONTROL 76 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 77 | # 78 | -------------------------------------------------------------------------------- /avl/runs/sub.dat: -------------------------------------------------------------------------------- 1 | Sub Hull 2 | 1.000000 0.1767239E-03 3 | 0.9830321 0.3940950E-02 4 | 0.9577779 0.9251490E-02 5 | 0.9284978 0.1476974E-01 6 | 0.8975738 0.2013976E-01 7 | 0.8661778 0.2503170E-01 8 | 0.8343692 0.2947930E-01 9 | 0.8022825 0.3352477E-01 10 | 0.7700714 0.3717130E-01 11 | 0.7378024 0.4040158E-01 12 | 0.7054448 0.4322955E-01 13 | 0.6731666 0.4569171E-01 14 | 0.6419443 0.4767324E-01 15 | 0.6114667 0.4864257E-01 16 | 0.5791181 0.4888581E-01 17 | 0.5454979 0.4912121E-01 18 | 0.5115690 0.4939262E-01 19 | 0.4775012 0.4958127E-01 20 | 0.4433082 0.4972457E-01 21 | 0.4090648 0.4984251E-01 22 | 0.3748051 0.4993601E-01 23 | 0.3405606 0.5000521E-01 24 | 0.3063558 0.5004857E-01 25 | 0.2722417 0.5004657E-01 26 | 0.2383079 0.5000111E-01 27 | 0.2053768 0.4996737E-01 28 | 0.1752783 0.4959292E-01 29 | 0.1472798 0.4801437E-01 30 | 0.1199589 0.4522685E-01 31 | 0.9397722E-01 0.4149309E-01 32 | 0.7099569E-01 0.3716324E-01 33 | 0.5235921E-01 0.3266801E-01 34 | 0.3814110E-01 0.2835142E-01 35 | 0.2748057E-01 0.2433554E-01 36 | 0.1940213E-01 0.2061831E-01 37 | 0.1317359E-01 0.1713160E-01 38 | 0.8330874E-02 0.1377339E-01 39 | 0.4593027E-02 0.1045966E-01 40 | 0.1913394E-02 0.7063403E-02 41 | 0.4296861E-03 0.3510900E-02 42 | 0.1734237E-06 -0.9263596E-06 43 | 0.4310795E-03 -0.3512600E-02 44 | 0.1916197E-02 -0.7064576E-02 45 | 0.4597177E-02 -0.1045988E-01 46 | 0.8336338E-02 -0.1377229E-01 47 | 0.1318038E-01 -0.1712877E-01 48 | 0.1941031E-01 -0.2061327E-01 49 | 0.2749023E-01 -0.2432763E-01 50 | 0.3815234E-01 -0.2833972E-01 51 | 0.5237217E-01 -0.3265126E-01 52 | 0.7101043E-01 -0.3713987E-01 53 | 0.9399368E-01 -0.4146155E-01 54 | 0.1199768 -0.4518607E-01 55 | 0.1472989 -0.4796388E-01 56 | 0.1752980 -0.4953249E-01 57 | 0.2053966 -0.4989626E-01 58 | 0.2383278 -0.4991829E-01 59 | 0.2722616 -0.4995169E-01 60 | 0.3063756 -0.4994158E-01 61 | 0.3405804 -0.4988606E-01 62 | 0.3748249 -0.4980470E-01 63 | 0.4090845 -0.4969902E-01 64 | 0.4433279 -0.4956891E-01 65 | 0.4775208 -0.4941347E-01 66 | 0.5115885 -0.4921271E-01 67 | 0.5455174 -0.4892924E-01 68 | 0.5791375 -0.4868189E-01 69 | 0.6114859 -0.4842716E-01 70 | 0.6419632 -0.4744701E-01 71 | 0.6731847 -0.4545438E-01 72 | 0.7054619 -0.4298076E-01 73 | 0.7378184 -0.4014129E-01 74 | 0.7700861 -0.3689953E-01 75 | 0.8022957 -0.3324156E-01 76 | 0.8343809 -0.2918470E-01 77 | 0.8661877 -0.2472580E-01 78 | 0.8975818 -0.1982271E-01 79 | 0.9285036 -0.1444171E-01 80 | 0.9577815 -0.8913044E-02 81 | 0.9830336 -0.3593532E-02 82 | 1.000000 0.1767239E-03 83 | -------------------------------------------------------------------------------- /avl/runs/supergee.eig: -------------------------------------------------------------------------------- 1 | # SuperGee 2 | # 3 | # Run case Eigenvalue 4 | 1 -21.678671 0.0000000 5 | 1 -2.6472728 4.9168804 6 | 1 -2.6472728 -4.9168804 7 | 1 -12.596931 4.5626142 8 | 1 -12.596931 -4.5626142 9 | 1 -0.38677835E-02 0.0000000 10 | 1 -0.15067405 1.0564068 11 | 1 -0.15067405 -1.0564068 12 | 2 -21.683111 0.0000000 13 | 2 -2.6163411 4.9128823 14 | 2 -2.6163411 -4.9128823 15 | 2 -12.495307 3.9479071 16 | 2 -12.495307 -3.9479071 17 | 2 -0.43928718E-02 0.0000000 18 | 2 -0.15824314 1.0071504 19 | 2 -0.15824314 -1.0071504 20 | 3 -21.687511 0.0000000 21 | 3 -2.5856192 4.9085850 22 | 3 -2.5856192 -4.9085850 23 | 3 -12.400194 3.1796561 24 | 3 -12.400194 -3.1796561 25 | 3 -0.49189149E-02 0.0000000 26 | 3 -0.16731723 0.95029865 27 | 3 -0.16731723 -0.95029865 28 | 4 -21.691872 0.0000000 29 | 4 -2.5551069 4.9039917 30 | 4 -2.5551069 -4.9039917 31 | 4 -12.311228 2.0946547 32 | 4 -12.311228 -2.0946547 33 | 4 -0.54459146E-02 0.0000000 34 | 4 -0.17826200 0.88346941 35 | 4 -0.17826200 -0.88346941 36 | 5 -21.696195 0.0000000 37 | 5 -2.5248038 4.8991054 38 | 5 -2.5248038 -4.8991054 39 | 5 -13.487781 0.0000000 40 | 5 -10.968057 0.0000000 41 | 5 -0.59738728E-02 0.0000000 42 | 5 -0.19156595 0.80288579 43 | 5 -0.19156595 -0.80288579 44 | 6 -21.700481 0.0000000 45 | 6 -2.4947096 4.8939292 46 | 6 -2.4947096 -4.8939292 47 | 6 -0.65027911E-02 0.0000000 48 | 6 -14.946638 0.0000000 49 | 6 -9.3525597 0.0000000 50 | 6 -0.20789857 0.70189447 51 | 6 -0.20789857 -0.70189447 52 | 7 -21.704730 0.0000000 53 | 7 -2.4648240 4.8884659 54 | 7 -2.4648240 -4.8884659 55 | 7 -15.861578 0.0000000 56 | 7 -8.2890628 0.0000000 57 | 7 -0.70326710E-02 0.0000000 58 | 7 -0.22820729 0.56646796 59 | 7 -0.22820729 -0.56646796 60 | 8 -21.708943 0.0000000 61 | 8 -2.4351468 4.8827183 62 | 8 -2.4351468 -4.8827183 63 | 8 -16.602366 0.0000000 64 | 8 -7.4050045 0.0000000 65 | 8 -0.75635136E-02 0.0000000 66 | 8 -0.25389010 0.35215328 67 | 8 -0.25389010 -0.35215328 68 | -------------------------------------------------------------------------------- /avl/runs/supergee.mass: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # SuperGee 3 | # 4 | # Dimensional unit and parameter data. 5 | # Mass & Inertia breakdown. 6 | #------------------------------------------------- 7 | 8 | # Names and scalings for units to be used for trim and eigenmode calculations. 9 | # The Lunit and Munit values scale the mass, xyz, and inertia table data below. 10 | # Lunit value will also scale all lengths and areas in the AVL input file. 11 | Lunit = 0.0254 m 12 | Munit = 0.001 kg 13 | Tunit = 1.0 s 14 | 15 | #------------------------- 16 | # Gravity and density to be used as default values in trim setup (saves runtime typing). 17 | # Must be in the unit names given above (m,kg,s). 18 | g = 9.81 19 | rho = 1.225 20 | 21 | #------------------------- 22 | # Mass & Inertia breakdown. 23 | # x y z is location of item's own CG. 24 | # Ixx... are item's inertias about item's own CG. 25 | # 26 | # x,y,z system here must be exactly the same one used in the .avl input file 27 | # (same orientation, same origin location, same length units) 28 | # 29 | # mass x y z Ixx Iyy Izz Ixy Ixz Iyz 30 | # 31 | 58.0 3.34 12.0 1.05 4400 180 4580 ! right wing 32 | 58.0 3.34 -12.0 1.05 4400 180 4580 ! left wing 33 | 16.0 -5.2 0.0 0.0 0 80 80 ! fuselage pod 34 | 18.0 13.25 0.0 0.0 0 700 700 ! boom+rods 35 | 22.0 -7.4 0.0 0.0 0 0 0 ! battery 36 | 2.0 -2.5 0.0 0.0 0 0 0 ! jack 37 | 9.0 -3.8 0.0 0.0 0 0 0 ! RX 38 | 9.0 -5.1 0.0 0.0 0 0 0 ! rud servo 39 | 6.0 -5.9 0.0 0.0 0 0 0 ! ele servo 40 | 9.0 2.6 1.0 0.0 0 0 0 ! R wing servo 41 | 9.0 2.6 -1.0 0.0 0 0 0 ! L wing servo 42 | 2.0 1.0 0.0 0.5 0 0 0 ! wing connector 43 | 1.0 3.0 0.0 0.0 0 0 0 ! wing pins 44 | 6.0 29.0 0.0 1.0 70 2 72 ! stab 45 | 6.0 33.0 0.0 2.0 35 39 4 ! rudder 46 | 0.0 -8.3 0.0 0.0 0 0 0 ! nose wt. 47 | 48 | -------------------------------------------------------------------------------- /avl/runs/supergee.run: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------- 3 | Run case 1: level flight, Xcg=3.0 4 | 5 | alpha -> CL = 0.600000 6 | beta -> beta = 0.00000 7 | pb/2V -> pb/2V = 0.00000 8 | qc/2V -> qc/2V = 0.00000 9 | rb/2V -> rb/2V = 0.00000 10 | camber -> camber = 0.00000 11 | aileron -> Cl roll mom = 0.00000 12 | elevator -> Cm pitchmom = 0.00000 13 | rudder -> Cn yaw mom = 0.00000 14 | 15 | alpha = 2.13442 deg 16 | beta = 0.00000 deg 17 | pb/2V = 0.338044E-18 18 | qc/2V = 0.00000 19 | rb/2V = 0.730949E-19 20 | CL = 0.600000 21 | CDo = 0.200000E-01 22 | bank = 0.00000 deg 23 | elevation = 0.00000 deg 24 | heading = 0.00000 deg 25 | Mach = 0.00000 26 | velocity = 5.42671 m/s 27 | density = 1.22500 kg/m^3 28 | grav.acc. = 9.81000 m/s^2 29 | turn_rad. = 0.00000 m 30 | load_fac. = 1.00000 31 | X_cg = 3.00000 m 32 | Y_cg = 0.00000 m 33 | Z_cg = 0.609524 m 34 | mass = 0.231000 kg 35 | Ixx = 0.165803E-01 kg-m^2 36 | Iyy = 0.113692E-01 kg-m^2 37 | Izz = 0.278108E-01 kg-m^2 38 | Ixy = 0.304560E-10 kg-m^2 39 | Iyz = -0.135360E-10 kg-m^2 40 | Izx = -0.362168E-03 kg-m^2 41 | visc CL_a = 0.00000 42 | visc CL_u = 0.00000 43 | visc CM_a = 0.00000 44 | visc CM_u = 0.00000 45 | -------------------------------------------------------------------------------- /avl/runs/supra0.eig: -------------------------------------------------------------------------------- 1 | # Supra 3.4m F3J 2 | # 3 | # Run case Eigenvalue 4 | 1 -17.689846 0.0000000 5 | 1 -0.98866206 2.6887562 6 | 1 -0.98866206 -2.6887562 7 | 1 0.30638028E-02 0.0000000 8 | 1 -9.7200125 3.7544942 9 | 1 -9.7200125 -3.7544942 10 | 1 -0.11886391 0.83494015 11 | 1 -0.11886391 -0.83494015 12 | 2 -21.282545 0.0000000 13 | 2 -1.0109086 3.0340605 14 | 2 -1.0109086 -3.0340605 15 | 2 -11.561676 4.0096033 16 | 2 -11.561676 -4.0096033 17 | 2 -0.15890040E-02 0.0000000 18 | 2 -0.88004742E-01 0.71268877 19 | 2 -0.88004742E-01 -0.71268877 20 | 3 -25.644853 0.0000000 21 | 3 -1.1070586 3.5035952 22 | 3 -1.1070586 -3.5035952 23 | 3 -13.849070 4.3945535 24 | 3 -13.849070 -4.3945535 25 | 3 -0.95434058E-02 0.0000000 26 | 3 -0.71401876E-01 0.62545495 27 | 3 -0.71401876E-01 -0.62545495 28 | 4 -34.083230 0.0000000 29 | 4 -1.3785605 4.4867110 30 | 4 -1.3785605 -4.4867110 31 | 4 -18.331455 5.2689674 32 | 4 -18.331455 -5.2689674 33 | 4 -0.17720912E-01 0.0000000 34 | 4 -0.66694441E-01 0.54430672 35 | 4 -0.66694441E-01 -0.54430672 36 | 5 -48.261883 0.0000000 37 | 5 -1.9084329 6.2188988 38 | 5 -1.9084329 -6.2188988 39 | 5 -25.910933 6.9171845 40 | 5 -25.910933 -6.9171845 41 | 5 -0.19341510E-01 0.0000000 42 | 5 -0.82796738E-01 0.49362509 43 | 5 -0.82796738E-01 -0.49362509 44 | -------------------------------------------------------------------------------- /avl/runs/supraf.avl: -------------------------------------------------------------------------------- 1 | Supra 3.4m F3J 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | # 5 | 1034.0 7.60 133.86 Sref Cref Bref reference area, chord, span 6 | 3.750 0.0 1.5 Xref Yref Zref moment reference location 7 | 0.015 CDo 8 | # 9 | # 10 | # 11 | #============================================= 12 | BODY 13 | Fuse pod 14 | 28 2.0 15 | # 16 | TRANSLATE 17 | 0.0 0.0 -1.75 18 | # 19 | BFIL 20 | fuseSupra.dat 21 | 22 | -------------------------------------------------------------------------------- /avl/runs/test.avl: -------------------------------------------------------------------------------- 1 | Plane Vanilla 2 | #Mach 3 | 0.0 4 | #IYsym IZsym Zsym 5 | 0 0 0.0 6 | #Sref Cref Bref 7 | 1.0 2.0 10.0 8 | #Xref Yref Zref 9 | 0.50 0.0 0.0 10 | # 11 | # 12 | #==================================================================== 13 | SURFACE 14 | Wing 15 | #Nchordwise Cspace Nspanwise Sspace 16 | 8 1.0 12 1.0 17 | # 18 | YDUPLICATE 19 | 0.0 20 | # 21 | ANGLE 22 | 2.0 23 | #------------------------------------------------------------- 24 | SECTION 25 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 26 | 0. 0. 0. 1.0 0.0 0 0 27 | 28 | AFILE 29 | sd7037.dat 30 | 31 | #Cname Cgain Xhinge HingeVec SgnDup 32 | CONTROL 33 | flap 1.0 0.75 0.0 0.0 0.0 1.0 34 | 35 | CONTROL 36 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 37 | 38 | CLAF 39 | 1.0 40 | #------------------------------------------------------------- 41 | SECTION 42 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 43 | 0.2 5.0 1.0 0.6 0.0 0 0 44 | 45 | AFILE 46 | sd7037.dat 47 | 48 | #Cname Cgain Xhinge HingeVec SgnDup 49 | CONTROL 50 | flap 1.0 0.75 0.0 0.0 0.0 1.0 51 | 52 | CONTROL 53 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 54 | # 55 | CLAF 56 | 1.0 57 | #==================================================================== 58 | SURFACE 59 | H-stab 60 | #Nchordwise Cspace Nspanwise Sspace 61 | 6 1.0 6 1.0 62 | # 63 | YDUPLICATE 64 | 0.0 65 | # 66 | TRANSLATE 67 | 4.0 0.0 0.0 68 | # 69 | #------------------------------------------------------------- 70 | SECTION 71 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 72 | 0.0 0.0 0.0 0.7 0. 0 0 73 | 74 | #Cname Cgain Xhinge HingeVec SgnDup 75 | CONTROL 76 | elevator 1.0 0.7 0.0 1.0 0.0 1.0 77 | #------------------------------------------------------------- 78 | SECTION 79 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 80 | 0.14 1.25 0.0 0.42 0. 0 0 81 | 82 | #Cname Cgain Xhinge HingeVec SgnDup 83 | CONTROL 84 | elevator 1.0 0.7 0.0 1.0 0.0 1.0 85 | # 86 | #==================================================================== 87 | SURFACE 88 | V-stab 89 | #Nchordwise Cspace Nspanwise Sspace 90 | 6 1.0 5 1.0 91 | TRANSLATE 92 | 4.0 0.0 0.0 93 | #------------------------------------------------------------- 94 | SECTION 95 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 96 | 0.0 0. 0.0 0.7 0. 0 0 97 | 98 | #Cname Cgain Xhinge HingeVec SgnDup 99 | CONTROL 100 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 101 | #------------------------------------------------------------- 102 | SECTION 103 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 104 | 0.14 0. 1.0 0.42 0. 0 0 105 | 106 | #Cname Cgain Xhinge HingeVec SgnDup 107 | CONTROL 108 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 109 | #------------------------------------------------------------- 110 | -------------------------------------------------------------------------------- /avl/runs/test.run: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------- 3 | Run case 1: -unnamed- 4 | 5 | alpha -> alpha = 10.0000 6 | beta -> beta = 15.0000 7 | pb/2V -> pb/2V = 0.300000E-01 8 | qc/2V -> qc/2V = -0.100000E-01 9 | rb/2V -> rb/2V = 0.00000 10 | flap -> flap = 0.00000 11 | aileron -> aileron = 0.00000 12 | elevator -> elevator = 0.00000 13 | rudder -> rudder = 0.00000 14 | 15 | alpha = 10.0000 16 | beta = 15.0000 17 | pb/2V = -0.295442E-01 18 | qc/2V = -0.100000E-01 19 | rb/2V = -0.520945E-02 20 | CL = 10.5034 21 | CDo = 0.00000 22 | bank = 0.00000 23 | elevation = 0.00000 24 | heading = 0.00000 25 | Mach = 0.00000 26 | velocity = 0.00000 27 | density = 1.00000 28 | grav.acc. = 1.00000 29 | turn_rad. = 0.00000 30 | load_fac. = 0.00000 31 | X_cg = 0.500000 32 | Y_cg = 0.00000 33 | Z_cg = 0.00000 34 | mass = 1.00000 35 | Ixx = 1.00000 36 | Iyy = 1.00000 37 | Izz = 1.00000 38 | Ixy = 0.00000 39 | Iyz = 0.00000 40 | Izx = 0.00000 41 | visc CL_a = 0.00000 42 | visc CL_u = 0.00000 43 | visc CM_a = 0.00000 44 | visc CM_u = 0.00000 45 | -------------------------------------------------------------------------------- /avl/runs/testcd.avl: -------------------------------------------------------------------------------- 1 | !************************************ 2 | !Sample "HERSEY BAR" wing AVL dataset 3 | !Section drag polars specified 4 | !************************************ 5 | SWEPT HERSEY BAR WING WITH CDVISC 6 | !Mach 7 | 0.0 8 | !IYsym IZsym Zsym 9 | 1 0 0.0 10 | !Sref Cref Bref 11 | 3.894 0.708 5.5 12 | !Xref Yref Zref 13 | 0.177 0.0 0.0 14 | ! 15 | SURFACE 16 | WING 17 | !Nchordwise Space 18 | 8 1.0 19 | ! 20 | SECTION 21 | !Xle Yle Zle Chord Ainc Nspanwise Space 22 | 0.000 0.000 0.000 0.708 0. 10 1.0 23 | CDCL 24 | -0.5 1.200 0.3 1.00 1.5 1.200 25 | SECTION 26 | !Xle Yle Zle Chord Ainc Nspanwise Space 27 | 1.000 2.75 0.000 0.708 0. 0 0.0 28 | CDCL 29 | -0.5 1.200 0.3 1.00 1.5 1.200 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /avl/runs/testdes.avl: -------------------------------------------------------------------------------- 1 | #************************************ 2 | #Sample "HERSEY BAR" wing AVL dataset 3 | #Design variables specified 4 | #************************************ 5 | SWEPT HERSEY BAR Wing with Design Variables 6 | #Mach 7 | 0.0 8 | #IYsym IZsym Zsym 9 | 1 0 0.0 10 | #Sref Cref Bref 11 | 3.894 0.708 5.5 12 | #Xref Yref Zref 13 | 0.177 0.0 0.0 14 | # 15 | SURFACE 16 | WING 17 | #Nchordwise Space 18 | 8 1.0 19 | # 20 | SECTION 21 | #Xle Yle Zle Chord Ainc Nspanwise Space 22 | 0.000 0.000 0.000 0.708 0. 7 2.0 23 | DESIGN 24 | Des1 1.0 25 | # 26 | SECTION 27 | #Xle Yle Zle Chord Ainc Nspanwise Space 28 | 0.500 1.375 0.000 0.708 0. 3 -2.8 29 | DESIGN 30 | Des2 1.0 31 | # 32 | SECTION 33 | #Xle Yle Zle Chord Ainc Nspanwise Space 34 | 0.800 2.20 0.000 0.708 0. 3 -2.5 35 | DESIGN 36 | Des3 1.0 37 | # 38 | SECTION 39 | #Xle Yle Zle Chord Ainc Nspanwise Space 40 | 0.950 2.6125 0.000 0.708 0. 3 -2.0 41 | DESIGN 42 | Des4 1.0 43 | # 44 | SECTION 45 | #Xle Yle Zle Chord Ainc Nspanwise Space 46 | 1.000 2.75 0.000 0.708 0. 0 0.0 47 | DESIGN 48 | Des5 1.0 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /avl/runs/vanilla.avl: -------------------------------------------------------------------------------- 1 | Plane Vanilla 2 | #Mach 3 | 0.0 4 | #IYsym IZsym Zsym 5 | 0 0 0.0 6 | #Sref Cref Bref 7 | 9.0 0.9 10.0 8 | #Xref Yref Zref 9 | 0.50 0.0 0.0 10 | # 11 | # 12 | #==================================================================== 13 | SURFACE 14 | Wing 15 | #Nchordwise Cspace Nspanwise Sspace 16 | 8 1.0 12 1.0 17 | # 18 | YDUPLICATE 19 | 0.0 20 | # 21 | ANGLE 22 | 2.0 23 | #------------------------------------------------------------- 24 | SECTION 25 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 26 | 0. 0. 0. 1.0 0.0 0 0 27 | 28 | AFILE 29 | sd7037.dat 30 | 31 | #Cname Cgain Xhinge HingeVec SgnDup 32 | CONTROL 33 | flap 1.0 0.75 0.0 0.0 0.0 1.0 34 | 35 | CONTROL 36 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 37 | 38 | CLAF 39 | 1.0 40 | #------------------------------------------------------------- 41 | SECTION 42 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 43 | 0.2 5.0 1.0 0.6 0.0 0 0 44 | 45 | AFILE 46 | sd7037.dat 47 | 48 | #Cname Cgain Xhinge HingeVec SgnDup 49 | CONTROL 50 | flap 1.0 0.75 0.0 0.0 0.0 1.0 51 | 52 | CONTROL 53 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 54 | # 55 | CLAF 56 | 1.0 57 | #==================================================================== 58 | SURFACE 59 | H-stab 60 | #Nchordwise Cspace Nspanwise Sspace 61 | 6 1.0 6 1.0 62 | # 63 | YDUPLICATE 64 | 0.0 65 | # 66 | TRANSLATE 67 | 4.0 0.0 0.0 68 | # 69 | #------------------------------------------------------------- 70 | SECTION 71 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 72 | 0.0 0.0 0.0 0.7 0. 0 0 73 | 74 | #Cname Cgain Xhinge HingeVec SgnDup 75 | CONTROL 76 | elevator 1.0 0.7 0.0 1.0 0.0 1.0 77 | #------------------------------------------------------------- 78 | SECTION 79 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 80 | 0.14 1.25 0.0 0.42 0. 0 0 81 | 82 | #Cname Cgain Xhinge HingeVec SgnDup 83 | CONTROL 84 | elevator 1.0 0.7 0.0 1.0 0.0 1.0 85 | # 86 | #==================================================================== 87 | SURFACE 88 | V-stab 89 | #Nchordwise Cspace Nspanwise Sspace 90 | 6 1.0 5 1.0 91 | TRANSLATE 92 | 4.0 0.0 0.0 93 | #------------------------------------------------------------- 94 | SECTION 95 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 96 | 0.0 0. 0.0 0.7 0. 0 0 97 | 98 | #Cname Cgain Xhinge HingeVec SgnDup 99 | CONTROL 100 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 101 | #------------------------------------------------------------- 102 | SECTION 103 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 104 | 0.14 0. 1.0 0.42 0. 0 0 105 | 106 | #Cname Cgain Xhinge HingeVec SgnDup 107 | CONTROL 108 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 109 | #------------------------------------------------------------- 110 | -------------------------------------------------------------------------------- /avl/runs/vanilla2.avl: -------------------------------------------------------------------------------- 1 | Plane Vanilla 2 | #Mach 3 | 0.0 4 | #IYsym IZsym Zsym 5 | 0 0 0.0 6 | #Sref Cref Bref 7 | 9.0 0.9 10.0 8 | #Xref Yref Zref 9 | 0.50 0.0 0.0 10 | # 11 | # 12 | #==================================================================== 13 | SURFACE 14 | Wing 15 | #Nchordwise Cspace Nspanwise Sspace 16 | 8 1.0 12 1.0 17 | # 18 | ANGLE 19 | 2.0 20 | #------------------------------------------------------------- 21 | SECTION 22 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 23 | 0.2 -5.0 1.0 0.6 0.0 0 0 24 | 25 | AFILE 26 | sd7037.dat 27 | 28 | #Cname Cgain Xhinge HingeVec SgnDup 29 | CONTROL 30 | flap 1.0 0.75 0.0 0.0 0.0 1.0 31 | 32 | CONTROL 33 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 34 | # 35 | CLAF 36 | 1.0 37 | #------------------------------------------------------------- 38 | SECTION 39 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 40 | 0. 0. 0. 1.0 0.0 0 0 41 | 42 | AFILE 43 | sd7037.dat 44 | 45 | #Cname Cgain Xhinge HingeVec SgnDup 46 | CONTROL 47 | flap 1.0 0.75 0.0 0.0 0.0 1.0 48 | 49 | CONTROL 50 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 51 | 52 | CLAF 53 | 1.0 54 | #------------------------------------------------------------- 55 | SECTION 56 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 57 | 0.2 5.0 1.0 0.6 0.0 0 0 58 | 59 | AFILE 60 | sd7037.dat 61 | 62 | #Cname Cgain Xhinge HingeVec SgnDup 63 | CONTROL 64 | flap 1.0 0.75 0.0 0.0 0.0 1.0 65 | 66 | CONTROL 67 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 68 | # 69 | CLAF 70 | 1.0 71 | #==================================================================== 72 | SURFACE 73 | H-stab 74 | #Nchordwise Cspace Nspanwise Sspace 75 | 6 1.0 6 1.0 76 | # 77 | YDUPLICATE 78 | 0.0 79 | # 80 | TRANSLATE 81 | 4.0 0.0 0.0 82 | # 83 | #------------------------------------------------------------- 84 | SECTION 85 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 86 | 0.0 0.0 0.0 0.7 0. 0 0 87 | 88 | #Cname Cgain Xhinge HingeVec SgnDup 89 | CONTROL 90 | elevator 1.0 0.7 0.0 1.0 0.0 1.0 91 | #------------------------------------------------------------- 92 | SECTION 93 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 94 | 0.14 1.25 0.0 0.42 0. 0 0 95 | 96 | #Cname Cgain Xhinge HingeVec SgnDup 97 | CONTROL 98 | elevator 1.0 0.7 0.0 1.0 0.0 1.0 99 | # 100 | #==================================================================== 101 | SURFACE 102 | V-stab 103 | #Nchordwise Cspace Nspanwise Sspace 104 | 6 1.0 5 1.0 105 | TRANSLATE 106 | 4.0 0.0 0.0 107 | #------------------------------------------------------------- 108 | SECTION 109 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 110 | 0.0 0. 0.0 0.7 0. 0 0 111 | 112 | #Cname Cgain Xhinge HingeVec SgnDup 113 | CONTROL 114 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 115 | #------------------------------------------------------------- 116 | SECTION 117 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 118 | 0.14 0. 1.0 0.42 0. 0 0 119 | 120 | #Cname Cgain Xhinge HingeVec SgnDup 121 | CONTROL 122 | rudder 1.0 0.5 0.0 0.0 1.0 1.0 123 | #------------------------------------------------------------- 124 | -------------------------------------------------------------------------------- /avl/runs/whitcomb.dat: -------------------------------------------------------------------------------- 1 | WHITCOMB 2 | 1.000000 -0.000800 3 | 0.975000 0.007400 4 | 0.950000 0.014400 5 | 0.925000 0.020400 6 | 0.900000 0.025500 7 | 0.875000 0.030000 8 | 0.850000 0.033700 9 | 0.825000 0.037000 10 | 0.800000 0.039800 11 | 0.775000 0.042200 12 | 0.750000 0.044200 13 | 0.725000 0.046000 14 | 0.700000 0.047600 15 | 0.675000 0.048900 16 | 0.650000 0.050100 17 | 0.625000 0.051100 18 | 0.600000 0.051900 19 | 0.575000 0.052700 20 | 0.550000 0.053300 21 | 0.500000 0.054300 22 | 0.450000 0.054800 23 | 0.400000 0.055000 24 | 0.350000 0.054700 25 | 0.300000 0.054000 26 | 0.250000 0.052800 27 | 0.200000 0.050700 28 | 0.175000 0.049300 29 | 0.150000 0.047600 30 | 0.125000 0.045500 31 | 0.100000 0.042800 32 | 0.075000 0.039400 33 | 0.050000 0.034700 34 | 0.037500 0.031600 35 | 0.025000 0.027600 36 | 0.012500 0.021500 37 | 0.007500 0.017600 38 | 0.0 0.0 39 | .0075 -.0176 40 | .0125 -.0216 41 | .0250 -.0281 42 | .0375 -.0324 43 | .0500 -.0358 44 | .0750 -.0408 45 | .1000 -.0444 46 | .1250 -.0472 47 | .1500 -.0493 48 | .1750 -.0510 49 | .2000 -.0522 50 | .2500 -.0540 51 | .3000 -.0548 52 | .3500 -.0549 53 | .4000 -.0541 54 | .4500 -.0524 55 | .5000 -.0497 56 | .5500 -.0455 57 | .5750 -.0426 58 | .6000 -.0389 59 | .6250 -.0342 60 | .6500 -.0282 61 | .6750 -.0215 62 | .7000 -.0149 63 | .7250 -.0090 64 | .7500 -.0036 65 | .7750 .0012 66 | .8000 .0053 67 | .8250 .0088 68 | .8500 .0114 69 | .8750 .0132 70 | .9000 .0138 71 | .9250 .0131 72 | .9500 .0106 73 | .9750 .0060 74 | 1.0000 -.0013 75 | -------------------------------------------------------------------------------- /avl/runs/wing.avl: -------------------------------------------------------------------------------- 1 | Simple Wing 2 | #Mach 3 | 0.0 4 | #IYsym IZsym Zsym 5 | 0 0 0.0 6 | #Sref Cref Bref 7 | 30.0 2.0 15.0 8 | #Xref Yref Zref 9 | 0.50 0.0 0.0 10 | # 11 | # 12 | #==================================================================== 13 | SURFACE 14 | Wing 15 | #Nchordwise Cspace Nspanwise Sspace 16 | 8 1.0 12 1.0 17 | # 18 | YDUPLICATE 19 | 0.0 20 | # 21 | ANGLE 22 | 2.0 23 | #------------------------------------------------------------- 24 | SECTION 25 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 26 | 0. 0. 0. 2.2 0.0 0 0 27 | 28 | #Cname Cgain Xhinge HingeVec SgnDup 29 | CONTROL 30 | flap 1.0 0.75 0.0 0.0 0.0 1.0 31 | 32 | CONTROL 33 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 34 | #------------------------------------------------------------- 35 | SECTION 36 | #Xle Yle Zle Chord Ainc Nspanwise Sspace 37 | 0.4 7.5 0.75 1.8 0.0 0 0 38 | 39 | #Cname Cgain Xhinge HingeVec SgnDup 40 | CONTROL 41 | flap 1.0 0.75 0.0 0.0 0.0 1.0 42 | 43 | CONTROL 44 | aileron -1.0 0.75 0.0 0.0 0.0 -1.0 45 | # 46 | -------------------------------------------------------------------------------- /avl/session1.txt: -------------------------------------------------------------------------------- 1 | 2 | Typical AVL session keyboard inputs. 3 | 4 | All commands can be in lowercase. 5 | 6 | Blank lines below are for clarity. They are NOT Returns! 7 | 8 | Indentation in the command listing below indicates 9 | the menu level to help navigation. 10 | 11 | A command in quotes, e.g "L", means that the letter 12 | is typed when the cursor is in the plot window rather 13 | than the text window. 14 | 15 | 16 | Start AVL with an input-file argument, such as the Plane Vanilla case: 17 | 18 | % cd runs 19 | % ../bin/avl vanilla (giving the .avl extension is optional) 20 | 21 | 22 | OPER enter operating menu 23 | G plot geometry and enter geometry-plot menu 24 | K enter keystroke menu 25 | "L" move viewpoint to left 26 | "L" move viewpoint to left 27 | "L" move viewpoint to left (can be held down for continuous motion) 28 | "R" move viewpoint to right 29 | "D" move viewpoint down 30 | "D" move viewpoint down (can be held down for continuous motion) 31 | "U" move viewpoint up 32 | "I" ingress (increase perspective distortion) 33 | "I" ingress (repeat as necessary) 34 | "I" . 35 | "I" . 36 | "O" outgress (decrease perspective distortion) 37 | "O" . 38 | "" exit keystroke menu 39 | TR show trailing wake vortices 40 | TR hide 41 | return to OPER menu 42 | 43 | A A 1 set angle of attack to 1 degree 44 | X execute calculation 45 | T show Trefftz Plane loading,CL plot, enter T.P.-plot menu 46 | return to OPER menu 47 | 48 | A C 0.6 set alpha to get CL = 0.6 49 | X execute calculation 50 | 51 | C1 enter horizontal-flight trim setup menu 52 | G 9.8 set gravitational acceleration 53 | D 1.2 set air density 54 | M 100.0 set mass 55 | B 30.0 set 30 deg bank angle 56 | return to OPER menu 57 | 58 | X execute calculation 59 | T show Trefftz Plane plot 60 | note nonzero moments Cl,Cm,Cn (not trimmed) 61 | Return to OPER menu 62 | 63 | D2 RM 0 drive aileron to get zero rolling moment (trim in roll ) 64 | D3 PM 0 drive elevator to get zero pitching moment (trim in pitch) 65 | B YM 0 drive sideslip to get zero yawing moment (trim in yaw ) 66 | X execute calculation 67 | T show Trefftz Plane plot -- note zero moments (trimmed) 68 | Note that there is a nonzero sideslip beta, 69 | since rudder is not deflected into the turn. 70 | Return to OPER menu 71 | 72 | 73 | D4 YM 0 set rudder to get zero yawing moment 74 | (note error markers on redundant constraints) 75 | B B 0 set zero sideslip in lieu of yaw moment constraint 76 | X execute 77 | T show Trefftz Plane plot 78 | Solution has aileron slightly outside of turn, 79 | some rudder deflection into the turn, and zero sideslip. 80 | This is a coordinated turn. Considerable up-elevator 81 | is also required to trim in the turning airflow. 82 | H Hardcopy current plot (optional) 83 | Return to OPER menu 84 | 85 | G plot geometry and enter geometry-plot menu 86 | LO add surface loading distribution 87 | O enter options submenu 88 | L 0.3 set surface loading scale factor to 0.3 (or whatever's necessary) 89 | return to geometry-plot menu and replot 90 | return to OPER menu 91 | 92 | ST calculate and display stability derivative matrix 93 | write to screen rather than to file 94 | Return to AVL menu 95 | 96 | QUIT Quit command is necessary to properly terminate plot.ps file. 97 | -------------------------------------------------------------------------------- /avl/session2.txt: -------------------------------------------------------------------------------- 1 | 2 | Typical AVL session keyboard inputs. 3 | 4 | All commands can be in lowercase. 5 | 6 | Blank lines below are for clarity. They are NOT Returns! 7 | 8 | Indentation in the command listing below indicates 9 | the menu level to help navigation. 10 | 11 | A command in quotes, e.g "L", means that the letter 12 | is typed when the cursor is in the plot window rather 13 | than the text window. 14 | 15 | 16 | Start AVL with an input-file argument, such as the Bubble Dancer RC glider. 17 | This command will read the bd.avl, bd.mass, bd.run files. The bd.run file 18 | defines trimmed flight over a range of bank angles. 19 | 20 | % cd runs 21 | % ../bin/avl bd 22 | 23 | 24 | OPER enter operating menu 25 | 5 select run case 5 as the target (40 deg right bank trimmed turn) 26 | X execute calculation 27 | T Trefftz-Plane plot (note assymetric loading from yaw rate and sideslip) 28 | return to OPER menu 29 | back to AVL main menu 30 | 31 | MODE enter eigenmode menu 32 | N new eigenvalue calculation (for range of bank angles) 33 | B blowup on roots clustered close to origin (click on blowup window corners) 34 | X examine a mode (click on a phugoid root 7, above x axis, close to y axis) 35 | ">" advance mode in time 36 | ">" advance mode in time 37 | ">" advance mode in time 38 | ">" advance mode in time 39 | "P" toggle camera panning off 40 | ">" hold down key to play real-time movie of mode 41 | . 42 | . 43 | . 44 | . 45 | "-" decrease mode scaling 46 | "-" decrease mode scaling 47 | "-" decrease mode scaling 48 | "+" increase mode scaling 49 | "1" set mode scaling to estimated "nice" value 50 | "<" play mode backwards in time 51 | . 52 | . 53 | 54 | "0" set time back to zero 55 | "" exit keystroke menu 56 | 57 | P plot root map again 58 | W write roots to file 59 | accept default filename 60 | overwrite old filename (Y is default response) 61 | 62 | M enter parameter-modification menu 63 | IXIX 0.4 double roll inertia for all run cases to simulate tip weights 64 | IZIZ 0.6 double yaw inertia for all run cases to simulate tip weights 65 | 66 | 67 | N new eigenvalue calculation 68 | D toggle data overlay 69 | overlay data from default filename written earlier 70 | (the added inertias mainly affected the Dutch roll roots, 71 | which now have lower frequency and much less damping) 72 | 73 | Return to AVL menu 74 | 75 | QUIT Quit AVL 76 | 77 | -------------------------------------------------------------------------------- /avl/src/AINDEX.INC: -------------------------------------------------------------------------------- 1 | 2 | C---- variable indices 3 | PARAMETER ( 4 | & IVALFA = 1, 5 | & IVBETA = 2, 6 | & IVROTX = 3, 7 | & IVROTY = 4, 8 | & IVROTZ = 5, 9 | & IVTOT = 5 ) 10 | 11 | C---- constraint indices 12 | PARAMETER ( 13 | & ICALFA = 1, 14 | & ICBETA = 2, 15 | & ICROTX = 3, 16 | & ICROTY = 4, 17 | & ICROTZ = 5, 18 | & ICCL = 6, 19 | & ICCY = 7, 20 | & ICMOMX = 8, 21 | & ICMOMY = 9, 22 | & ICMOMZ = 10, 23 | & ICTOT = 10 ) 24 | C 25 | C---- run-case dimensional parameter indices 26 | PARAMETER ( 27 | & IPALFA = 1, 28 | & IPBETA = 2, 29 | & IPROTX = 3, 30 | & IPROTY = 4, 31 | & IPROTZ = 5, 32 | & IPCL = 6, 33 | & IPCD0 = 7, 34 | & IPPHI = 8, 35 | & IPTHE = 9, 36 | & IPPSI = 10, 37 | & IPMACH = 11, 38 | & IPVEE = 12, 39 | & IPRHO = 13, 40 | & IPGEE = 14, 41 | & IPRAD = 15, 42 | & IPFAC = 16, 43 | & IPXCG = 17, 44 | & IPYCG = 18, 45 | & IPZCG = 19, 46 | & IPMASS = 20, 47 | & IPIXX = 21, 48 | & IPIYY = 22, 49 | & IPIZZ = 23, 50 | & IPIXY = 24, 51 | & IPIYZ = 25, 52 | & IPIZX = 26, 53 | & IPCLA = 27, 54 | & IPCLU = 28, 55 | & IPCMA = 29, 56 | & IPCMU = 30, 57 | & IPTOT = 30) 58 | 59 | C---- eigenmode variable indices 60 | PARAMETER( 61 | & JEU = 1, 62 | & JEW = 2, 63 | & JEQ = 3, 64 | & JETH = 4, 65 | & JEV = 5, 66 | & JEP = 6, 67 | & JER = 7, 68 | & JEPH = 8, 69 | & JEX = 9, 70 | & JEY = 10, 71 | & JEZ = 11, 72 | & JEPS = 12, 73 | & JETOT = 12 ) 74 | 75 | C---- time-trace parameter indices 76 | PARAMETER (KPBANK = 1, 77 | & KPELEV = 2, 78 | & KPHEAD = 3, 79 | & KPVINF = 4, 80 | & KPALFA = 5, 81 | & KPBETA = 6, 82 | & KPCLIF = 7, 83 | & KPCDRG = 8, 84 | & KPCDIN = 9, 85 | & KPCMOM = 10, 86 | & KPLIFT = 11, 87 | & KPDRAG = 12, 88 | & KPMACH = 13, 89 | & KPALTK = 14, 90 | & KPDENS = 15, 91 | & KPVSOU = 16, 92 | & KPLOAD = 17 ) 93 | PARAMETER (KPTOT = 17 ) 94 | PARAMETER (KPVAC = 1, 95 | & KPRAC = 2, 96 | & KPVEL = 3, 97 | & KPROT = 4, 98 | & KPPOS = 5, 99 | & KPFOR = 6, 100 | & KPMOM = 7 ) 101 | PARAMETER (KPVTOT = 7 ) 102 | -------------------------------------------------------------------------------- /avl/src/AVLPLT.INC: -------------------------------------------------------------------------------- 1 | C---- Global variables for AVL plotting routines 2 | C 3 | C 4 | LOGICAL LPLOT, LCURS, LHID, LCREV 5 | COMMON /PLT_I/ LPLOT, LCURS, LHID, LCREV, 6 | & IDEV, IDEVH, IPSLU, 7 | & NCOLORS 8 | C 9 | COMMON /PLT_R/ SCRNFRAC, SIZE, PLOTAR, 10 | & XMIN, XMAX, YMIN, YMAX, 11 | & XOFF, YOFF, SF, CH, 12 | & XMARG,YMARG, 13 | & XPAGE,YPAGE, 14 | & XWIND,YWIND, 15 | & PMARG,CPFAC, HNFAC, ENFAC, 16 | & AZIMOB,ELEVOB,TILTOB,ROBINV 17 | C 18 | PARAMETER (NHAXIS = 12) ! number of segments forming x,y,z arrowheads 19 | PARAMETER (NHX = 2*NHAXIS+1) 20 | COMMON /AXES_I/ 21 | & NHEAD , 22 | & NLINAX 23 | 24 | COMMON /AXES_R/ 25 | & ARWLEN, 26 | & RHEAD, 27 | & RHEADP, 28 | & UAXDIR(3,3), 29 | & UAXDIRP(3,3), 30 | & UAXARW(3,2,NHX,3), 31 | & UAXARWP(3,2,NHX,3) 32 | -------------------------------------------------------------------------------- /avl/src/MASKS.INC: -------------------------------------------------------------------------------- 1 | C 2 | C---- dot-pattern masks for use with PLGRID, NEWPAT, etc. 3 | C 4 | C LMASK0: _________________________ (solid) 5 | C 1: ......................... 6 | C 2: . . . . . . . . . . . . . 7 | C 3: . . . . . . . 8 | C 4: . . . . 9 | C 10 | DATA LMASK0, LMASK1, LMASK2, LMASK3, LMASK4 11 | & / -1 , -21846, -30584, -32640, -32768 / 12 | C 13 | C DATA LMASK0, LMASK1, LMASK2, LMASK3, LMASK4 14 | C & /Z'FFFFFFFF',Z'AAAAAAAA',Z'CCCCCCCC',Z'88888888',Z'21084210'/ 15 | 16 | -------------------------------------------------------------------------------- /avl/src/avl.ftnchek: -------------------------------------------------------------------------------- 1 | ftnchek -common=1 -novice=no -arguments=2 -array=2 -notruncation \ 2 | -include=/var/local/codes/Xplot \ 3 | avl.f aoper.f amode.f amass.f asetup.f \ 4 | amake.f ainput.f aoutput.f aero.f atrim.f atpforc.f \ 5 | aic.f cdcl.f airutil.f autil.f \ 6 | aplotvl.f aplottp.f aplotmd.f limits.f \ 7 | pltops.f hidden.f \ 8 | plsubs.f \ 9 | userio.f plutil.f arrow3d.f getvm.f \ 10 | matrix.f spline.f sgutil.f \ 11 | ../eispack/eispack.f \ 12 | /var/local/codes/Xplot/plt_base.f \ 13 | /var/local/codes/Xplot/plt_font.f \ 14 | /var/local/codes/Xplot/plt_color.f \ 15 | /var/local/codes/Xplot/plt_util.f 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /avl/src/gpl.txt: -------------------------------------------------------------------------------- 1 | C*********************************************************************** 2 | C Module: avl.f 3 | C 4 | C Copyright (C) 2002 Mark Drela, Harold Youngren 5 | C 6 | C This program is free software; you can redistribute it and/or modify 7 | C it under the terms of the GNU General Public License as published by 8 | C the Free Software Foundation; either version 2 of the License, or 9 | C (at your option) any later version. 10 | C 11 | C This program is distributed in the hope that it will be useful, 12 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | C GNU General Public License for more details. 15 | C 16 | C You should have received a copy of the GNU General Public License 17 | C along with this program; if not, write to the Free Software 18 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | C*********************************************************************** 20 | -------------------------------------------------------------------------------- /avl/src/matrix-lapack.f: -------------------------------------------------------------------------------- 1 | 2 | SUBROUTINE LUDCMP(NSIZ,N,A,INDX,WORK) 3 | C ******************************************************* 4 | C * Factors a full NxN matrix into an LU form. * 5 | C * Uses LINPACK routines for linear algebra * 6 | C ******************************************************* 7 | C 8 | REAL A(NSIZ,NSIZ), WORK(NSIZ) 9 | INTEGER INDX(NSIZ) 10 | C 11 | CALL SGETRF(N,NSIZ,A,NSIZ,INDX,INFO) 12 | C 13 | RETURN 14 | END ! LUDCMP 15 | 16 | 17 | SUBROUTINE BAKSUB(NSIZ,N,A,INDX,B) 18 | DIMENSION A(NSIZ,NSIZ), B(NSIZ), INDX(NSIZ) 19 | C ******************************************************* 20 | C * BAKSUB does back-substitution with RHS using * 21 | C * stored LU decomposition. * 22 | C * Uses LINPACK routines for linear algebra * 23 | C ******************************************************* 24 | C 25 | MRHS = 1 26 | CALL SGETRS('N',N,MRHS,A,NSIZ,INDX,B,NSIZ,INFO) 27 | C 28 | RETURN 29 | END ! BAKSUB 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /avl/src/second.f: -------------------------------------------------------------------------------- 1 | 2 | SUBROUTINE SECONDS(TSEC) 3 | REAL*8 TSEC 4 | C 5 | C...SECNDS is a real*4 function that returns seconds. 6 | C The value is modified by subtracting the supplied argument. 7 | C It acts as in the VMS FORTRAN Manual. 8 | C 9 | REAL*4 SECNDS, TIME 10 | TIME = 0.0 11 | TSEC = SECNDS(TIME) 12 | END 13 | -------------------------------------------------------------------------------- /avl/src/second_g77.f: -------------------------------------------------------------------------------- 1 | 2 | SUBROUTINE SECONDS(TSEC) 3 | REAL*8 TSEC 4 | C 5 | C...SECNDS is a real*4 function that returns seconds. 6 | C The value is modified by subtracting the supplied argument. 7 | C It acts as in the VMS FORTRAN Manual. 8 | C 9 | REAL*4 SECNDS, TIME 10 | TIME = 0.0 11 | TSEC = SECNDS(TIME) 12 | END 13 | -------------------------------------------------------------------------------- /avl/src/second_ifc.f: -------------------------------------------------------------------------------- 1 | 2 | SUBROUTINE SECONDS(TSEC) 3 | REAL*8 TSEC 4 | C 5 | REAL*8 MICSEC 6 | C 7 | C---- get CPU time in microseconds 8 | CALL CLOCKX(MICSEC) 9 | C 10 | C---- return seconds 11 | TSEC = MICSEC/1.0D6 12 | C 13 | RETURN 14 | END 15 | 16 | 17 | -------------------------------------------------------------------------------- /pyavl/__init__.py: -------------------------------------------------------------------------------- 1 | from os.path import dirname, join 2 | 3 | src_dir = dirname(dirname(__file__)) 4 | runs_dir = join(src_dir, 'avl', 'runs') 5 | -------------------------------------------------------------------------------- /pyavl/case_plain.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 8, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | from geometry import Geometry 8 | 9 | def filter_lines(lines): 10 | ret = [] 11 | for line in lines: 12 | index1 = line.find('#') 13 | index2 = line.find('!') 14 | index = min(index1, index2) 15 | if index < 0: index = max(index1, index2) 16 | if index >= 0: 17 | line = line[:index] 18 | line = line.strip() 19 | if len(line) > 0: 20 | ret.append(line) 21 | return ret 22 | 23 | 24 | class Case(object): 25 | ''' 26 | A class representing an avl input file 27 | ''' 28 | 29 | def __init__(self, casename, mach_no, symmetry, ref_area, ref_chord, ref_span, ref_cg, CD_p=None, geometry=None): 30 | ''' 31 | Constructor 32 | ''' 33 | self.casename = casename 34 | self.mach_no = mach_no 35 | self.symmetry = symmetry 36 | self.ref_area = ref_area 37 | self.ref_chord = ref_chord 38 | self.ref_span = ref_span 39 | self.ref_cg = ref_cg 40 | self.CD_p = CD_p 41 | self.geometry = geometry 42 | 43 | def write_input_file(self, file): 44 | ''' 45 | Write all the data in the case in the appropriate format as in input .avl file for the AVL program 46 | ''' 47 | file.write(self.casename + '\n') 48 | file.write('#Mach no\n%f\n' % self.mach_no) 49 | file.write('#iYsym\tiZsym\tZsym\n%d\t%d\t%f\n' % tuple(self.symmetry)) 50 | file.write('#Sref\tCref\tBref\n%f\t%f\t%f\n' % (self.ref_area, self.ref_chord, self.ref_span)) 51 | file.write('#Xref\tYref\tZref\n%f\t%f\t%f\n' % tuple(self.ref_cg)) 52 | if self.CD_p is not None: 53 | file.write('#CD_p profile drag coefficient\n%f\n' % self.CD_p) 54 | file.write('\n') 55 | file.write('#'*70) 56 | file.write('\n') 57 | self.geometry.write_to_file(file) 58 | file.write('') 59 | 60 | @classmethod 61 | def case_from_input_file(cls, file): 62 | ''' 63 | return an instance of Case by reading its data from an input file 64 | ''' 65 | lines = file.readlines() 66 | lines = filter_lines(lines) 67 | lineno = 0 68 | casename = lines[0] 69 | mach_no = float(lines[1]) 70 | symmetry = lines[2].split() 71 | symmetry = [int(symmetry[0]), int(symmetry[1]), float(symmetry[2])] 72 | ref_area, ref_chord, ref_span = [float(value) for value in lines[3].split()] 73 | ref_cg = [float(value) for value in lines[4].split()] 74 | lineno = 5 75 | try: 76 | CD_p = float(lines[5]) 77 | lineno = 6 78 | except ValueError: 79 | CD_p = None 80 | geometry = Geometry.create_from_lines(lines, lineno) 81 | case = Case(casename, mach_no, symmetry, ref_area, ref_chord, ref_span, ref_cg, CD_p, geometry) 82 | return case -------------------------------------------------------------------------------- /pyavl/mass.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 26, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | import pexpect 8 | import os 9 | from enthought.traits.api import HasTraits, List, Float, Array, Tuple, Instance 10 | from enthought.traits.ui.api import EnumEditor 11 | import re 12 | import numpy 13 | from pyavl.case import filter_lines 14 | 15 | class MassObject(HasTraits): 16 | mass = Float 17 | cg = Array(numpy.float, (3,)) 18 | inertia_moment = Array(numpy.float, (3,)) 19 | # I_xy I_xz i_yz 20 | cross_inertia = Array(numpy.float, (3,)) 21 | 22 | class Mass(HasTraits): 23 | lunit = Tuple((1.0, 'm')) # meters 24 | munit = Tuple((1.0, 'kg')) # kg 25 | tunit = Tuple((1.0, 's')) # seconds 26 | g = Float(9.81) # lunit / tunit**2 27 | rho = Float(1.225) # munit / lunit**3 28 | objects = List(Instance(MassObject)) 29 | 30 | def write_mass_file(self, file): 31 | file.write('Lunit = %d %s\n' %(self.lunit[0], self.lunit[1])) 32 | file.write('Munit = %d %s\n' %(self.munit[0], self.munit[1])) 33 | file.write('Tunit = %d %s\n' %(self.tunit[0], self.tunit[1])) 34 | file.write('g = %d\n' %self.g) 35 | file.write('rho = %d\n' %self.rho) 36 | file.write('\n') 37 | file.write('# mass x y z Ixx Iyy Izz [ Ixy Ixz Iyz ]') 38 | for massobj in self.objects: 39 | file.write('%f\t' %(massobj.mass)) 40 | file.write('%f %f %f\t' %(tuple(massobj.cg))) 41 | file.write('%f %f %f\t' %(tuple(massobj.inertia_moment))) 42 | file.write('%f %f %f\n' %(tuple(massobj.cross_inertia))) 43 | 44 | 45 | @classmethod 46 | def mass_from_file(cls, filename): 47 | file = open(filename) 48 | lines = file.readlines() 49 | file.close() 50 | lines = filter_lines(lines) 51 | traits = {} 52 | for i,line in enumerate(lines): 53 | match = re.match(r'(?P\S+?)\s*?=\s*?(?P[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?)\s*?(?P\S+)?$', line) 54 | if match is not None: 55 | name = match.group('name').lower() 56 | if name[1:] == 'unit': 57 | unit = match.group('unit') 58 | unit = unit if unit is not None else '' 59 | value = float(match.group('value')) 60 | traits[name] = value, unit 61 | else: 62 | value = float(match.group('value')) 63 | traits[name] = value 64 | else: 65 | break 66 | multiplier = MassObject(mass=1.0, cg=numpy.ones(3), inertia_moment=numpy.ones(3), cross_inertia=numpy.ones(3)) 67 | adder = MassObject(mass=0.0, cg=numpy.zeros(3), inertia_moment=numpy.zeros(3), cross_inertia=numpy.zeros(3)) 68 | traits['objects'] = [] 69 | for line in lines[i:]: 70 | vals = [float(num) for num in line.split()] 71 | cross_inertia = numpy.zeros(3) 72 | if len(vals) > 7: 73 | cross_inertia[:] = vals[7:] 74 | mass=vals[0] 75 | cg=vals[1:4] 76 | inertia_moment=vals[4:7] 77 | massobj = MassObject(mass=multiplier.mass*mass+adder.mass, 78 | cg=multiplier.cg * cg + adder.cg, 79 | inertia_moment=multiplier.inertia_moment * inertia_moment + adder.inertia_moment, 80 | cross_inertia=multiplier.cross_inertia * cross_inertia + adder.cross_inertia, 81 | ) 82 | traits['objects'].append(massobj) 83 | return Mass(**traits) 84 | -------------------------------------------------------------------------------- /pyavl/outpututils.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jul 9, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | 8 | import numpy 9 | 10 | from enthought.traits.api import HasTraits, List, String, Array, Instance, Complex 11 | from enthought.traits.ui.api import TableEditor, View, Item, Group 12 | 13 | 14 | class EigenMode(HasTraits): 15 | eigenvalue = Complex() 16 | # the = theta 17 | order = ['u', 'w', 'q', 'the', 'v', 'p', 'r', 'phi', 'x', 'y', 'z', 'psi'] 18 | eigenvector = Array(numpy.complex, shape=(12,)) 19 | 20 | editor = Instance(TableEditor) 21 | def _editor_default(self): 22 | cols = [ObjectColumn(name='eigenvalue', label='EigenValue')] 23 | cols += [ObjectColumn(name='name', label=s) for s in self.order] 24 | ret = TableEditor( 25 | auto_size=False, 26 | editable=False, 27 | columns=None) 28 | 29 | class EigenMatrix(HasTraits): 30 | # include the control vector 31 | matrix = Array(numpy.float, shape=(12, (12, None))) 32 | order = List(String, ['u', 'w', 'q', 'the', 'v', 'p', 'r', 'phi', 'x', 'y', 'z', 'psi']) 33 | 34 | class RunOutput(HasTraits): 35 | '''class to store the output if a sequence of runcases''' 36 | # the names of the variables 37 | variable_names = List(String) 38 | # 2d array 39 | variable_values = Array(numpy.float, shape=(None, None)) 40 | eigenmodes = List(List(EigenMode)) 41 | eigenmatrix = List(EigenMatrix) 42 | #output_view = Instance(View) 43 | #eigenmode_view = Instance(View) 44 | def save_variables(self, file): 45 | file.write('"%s"\n' %('"\t"'.join(self.variable_names))) 46 | for row in self.variable_values: 47 | file.write('%s\n' %('\t'.join([str(var) for var in row]))) 48 | -------------------------------------------------------------------------------- /pyavl/testing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajp/pyavl/714c2273a87c6040b76e876a018093b4b570af5d/pyavl/testing/__init__.py -------------------------------------------------------------------------------- /pyavl/testing/allegro.avl: -------------------------------------------------------------------------------- 1 | Allegro-lite 2M 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | 530.0 6.6 78.6 Sref Cref Bref reference area, chord, span 5 | 3.250 0.0 0.5 Xref Yref Zref moment reference location (arb.) 6 | 0.020 CDoref 7 | # 8 | #============================================================== 9 | # 10 | SURFACE 11 | WING 12 | 7 1.0 20 -2.0 ! Nchord Cspace Nspan Sspace 13 | # 14 | # reflect image wing about y=0 plane 15 | YDUPLICATE 16 | 0.00000 17 | # 18 | # twist angle bias for whole surface 19 | ANGLE 20 | 0.00000 21 | # 22 | # x,y,z bias for whole surface 23 | TRANSLATE 24 | 0.00000 0.00000 0.00000 25 | #-------------------------------------------------------------- 26 | # Xle Yle Zle chord angle Nspan Sspace 27 | SECTION 28 | 0.00000 0.00000 0.00000 8.0 1.490 5 0.25 29 | AFIL 30 | ag35.dat 31 | #----------------------- 32 | SECTION 33 | 0.500 15.0 0.0 7.5 1.380 7 -2.60 34 | AFIL 35 | ag36.dat 36 | #----------------------- 37 | SECTION 38 | 1.875 31.0 3.30 6.0 1.220 8 -2.25 39 | AFIL 40 | ag37.dat 41 | #----------------------- 42 | SECTION 43 | 3.625 39.3 7.00 4.0 0.940 1 0 44 | AFIL 45 | ag38.dat 46 | # 47 | #============================================================== 48 | # 49 | SURFACE 50 | Horizontal tail 51 | 5 1.0 7 -1.5 ! Nchord Cspace 52 | # 53 | YDUPLICATE 54 | 0.00000 55 | ANGLE 56 | 0.0000 57 | TRANSLATE 58 | 27.50000 0.00000 1.25000 59 | #-------------------------------------------------------------- 60 | SECTION 61 | 0.00000 0.00000 0.00000 3.5 0.000 7 -1.5 62 | 63 | CONTROL 64 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 65 | #----------------------- 66 | SECTION 67 | 1.15 9.0 0.00000 1.8 0.000 1 0 68 | 69 | CONTROL 70 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 71 | # 72 | #============================================================== 73 | # 74 | SURFACE 75 | Vertical tail 76 | 6 1.0 10 0.5 ! Nchord Cspace 77 | TRANSLATE 78 | 33.00000 0.00000 0.00000 79 | #-------------------------------------------------------------- 80 | SECTION 81 | -1.28 0.00000 -2.00000 3.20000 0.000 3 1.5 82 | 83 | CONTROL 84 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 85 | #----------------------- 86 | SECTION 87 | -1.68 0.00000 0.00000 4.20000 0.000 2 0.5 88 | 89 | CONTROL 90 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 91 | #----------------------- 92 | SECTION 93 | -1.5388 0.00000 1.25000 3.847 0.000 8 -1.5 94 | 95 | CONTROL 96 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 97 | #----------------------- 98 | SECTION 99 | -0.72 0.00000 8.50 1.80000 0.000 1 0 100 | 101 | CONTROL 102 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 103 | 104 | #============================================================== 105 | -------------------------------------------------------------------------------- /pyavl/testing/allegro.mass: -------------------------------------------------------------------------------- 1 | # 2 | # Allegro-Lite 2-meter RES glider 3 | # Mass & Inertia breakdown 4 | # 5 | # xyz is location of item's own CG 6 | # Ixx.. are item's inertias about item's own CG 7 | # 8 | # x back 9 | # y right 10 | # z up 11 | # 12 | # x,y,z system here must have origin 13 | # at same location as AVL input file 14 | # 15 | Lunit = 0.0254 m 16 | Munit = 0.001 kg 17 | Tunit = 1.0 s 18 | 19 | g = 9.81 20 | rho = 1.225 21 | 22 | # 23 | # mass x y z Ixx Iyy Izz [ Ixy Ixz Iyz ] 24 | # 25 | 156.0 4.0 0.0 0.0 11700 832 12532 ! wing center panel 26 | 55.5 4.2 22.0 1.0 1180 210 1390 ! wing R mid panel 27 | 55.5 4.2 -22.0 1.0 1180 210 1390 ! wing L mid panel 28 | 12.0 4.5 35.5 4.5 81 25 106 ! wing R tip panel 29 | 12.0 4.5 -35.5 4.5 81 25 106 ! wing R tip panel 30 | 70.0 0.0 0.0 0.0 0 0 0 ! fuselage pod 31 | 15.0 19.0 0.0 0.0 0 911 911 ! boom+rods 32 | 57.0 -4.0 0.0 0.0 0 0 0 ! battery 33 | 23.0 -1.0 0.0 0.0 0 0 0 ! RX 34 | 18.0 -2.5 0.0 0.0 0 0 0 ! servos 35 | 12.0 29.0 0.0 1.0 270 12 282 ! stab 36 | 10.0 34.0 0.0 2.0 81 90 9 ! rudder 37 | 18.0 -6.0 0.0 0.0 0 0 0 ! nose wt. 38 | -------------------------------------------------------------------------------- /pyavl/testing/allegro.test.mass: -------------------------------------------------------------------------------- 1 | Lunit = 0 m 2 | Munit = 0 kg 3 | Tunit = 1 s 4 | g = 9 5 | rho = 1 6 | 7 | # mass x y z Ixx Iyy Izz [ Ixy Ixz Iyz ]156.000000 4.000000 0.000000 0.000000 11700.000000 832.000000 12532.000000 0.000000 0.000000 0.000000 8 | 55.500000 4.200000 22.000000 1.000000 1180.000000 210.000000 1390.000000 0.000000 0.000000 0.000000 9 | 55.500000 4.200000 -22.000000 1.000000 1180.000000 210.000000 1390.000000 0.000000 0.000000 0.000000 10 | 12.000000 4.500000 35.500000 4.500000 81.000000 25.000000 106.000000 0.000000 0.000000 0.000000 11 | 12.000000 4.500000 -35.500000 4.500000 81.000000 25.000000 106.000000 0.000000 0.000000 0.000000 12 | 70.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 13 | 15.000000 19.000000 0.000000 0.000000 0.000000 911.000000 911.000000 0.000000 0.000000 0.000000 14 | 57.000000 -4.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 15 | 23.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 16 | 18.000000 -2.500000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 17 | 12.000000 29.000000 0.000000 1.000000 270.000000 12.000000 282.000000 0.000000 0.000000 0.000000 18 | 10.000000 34.000000 0.000000 2.000000 81.000000 90.000000 9.000000 0.000000 0.000000 0.000000 19 | 18.000000 -6.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 20 | -------------------------------------------------------------------------------- /pyavl/testing/avl.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 8, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | import unittest 7 | from pyavl import avl, runs_dir, join 8 | 9 | class Test(unittest.TestCase): 10 | 11 | 12 | def setUp(self): 13 | self.avl = avl.AVL(cwd=runs_dir) 14 | self.filename = join(runs_dir, 'allegro.avl') 15 | 16 | def tearDown(self): 17 | self.avl.avl.close(True) 18 | 19 | 20 | def test_init(self): 21 | index = self.avl.avl.expect(self.avl.patterns['/']) 22 | if index == 0: 23 | #print self.avl.avl.before 24 | pass 25 | else: 26 | #print index 27 | pass 28 | 29 | def test_load_case(self): 30 | self.avl.load_case_from_file(self.filename) 31 | 32 | 33 | def test_runcase_init(self): 34 | self.avl.load_case_from_file(self.filename) 35 | runcase = avl.RunCase.get_case_from_avl(self.avl.avl, 1) 36 | assert runcase is not None 37 | 38 | def test_avl_ui(self): 39 | self.avl.load_case_from_file(self.filename) 40 | #self.avl.configure_traits() 41 | 42 | def test_param_modify(self): 43 | self.avl.load_case_from_file(self.filename) 44 | rc = self.avl.run_cases[0] 45 | p = rc.parameters['bank'] 46 | rc.parameters['bank'].value = 2.2 47 | assert 'bank' in rc.parameters 48 | assert rc.parameters['bank'].value == 2.2 49 | 50 | def test_constraint_modify(self): 51 | self.avl.load_case_from_file(self.filename) 52 | rc = self.avl.run_cases[0] 53 | c = rc.constraints 54 | print c 55 | c['alpha'] = avl.Constraint(name='alpha', constraint_name='alpha', cmd='A', pattern='alpha', value=1.1) 56 | assert c['alpha'].value == 1.1 57 | assert c['alpha'].name == 'alpha' 58 | assert c['alpha'].pattern == 'alpha' 59 | #p = rc.parameters_info['bank'] 60 | #rc.parameters['bank'] = 2.2 61 | #assert 'bank' in rc.parameters 62 | #assert rc.parameters['bank'] == 2.2 63 | 64 | 65 | def test_runcase_output(self): 66 | self.avl.load_case_from_file(self.filename) 67 | rc = self.avl.run_cases[0] 68 | out = rc.get_run_output() 69 | print out 70 | print len(out) 71 | 72 | def test_eigenmode_output(self): 73 | self.avl.load_case_from_file(self.filename) 74 | rc = self.avl.run_cases[0] 75 | print rc.parameters.keys() 76 | rc.parameters['velocity'].value = 100.0 77 | print rc.parameters['velocity'].value 78 | out = rc.get_modes() 79 | print [o.eigenvalue for o in out] 80 | print 'num modes:', len(out) 81 | #assert len(out) == 8 82 | 83 | def test_system_matrix(self): 84 | self.avl.load_case_from_file(self.filename) 85 | rc = self.avl.run_cases[0] 86 | print rc.parameters.keys() 87 | rc.parameters['velocity'].value = 100.0 88 | print rc.parameters['velocity'].value 89 | out = rc.get_system_matrix() 90 | print out 91 | print out.matrix 92 | print 'matrix shape', out.matrix.shape 93 | 94 | 95 | 96 | if __name__ == "__main__": 97 | #import sys;sys.argv = ['', 'Test.test_init'] 98 | unittest.main() 99 | -------------------------------------------------------------------------------- /pyavl/testing/case.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 10, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | import unittest 7 | from pyavl.case import Case, filter_lines 8 | from pyavl.geometry import Geometry, Surface, Section, SectionAFILEData 9 | from pyavl import runs_dir, join 10 | 11 | class Test(unittest.TestCase): 12 | 13 | def setUp(self): 14 | geometry = Geometry() 15 | surface1 = Surface(name='surface 1', cvortices=[20,1.0], scale=[1.0,1.0,1.0], index=1, yduplicate=1.0) 16 | section1data = SectionAFILEData(filename=join(runs_dir, 'ag42d.dat')) 17 | section1 = Section(type='airfoil data file', data=section1data) 18 | geometry.surfaces.append(surface1) 19 | self.case = Case(name='testCase', mach_no=0.0, symmetry=[0,0,0.0], ref_area=9.0, ref_chord=0.9, ref_span=10.0, ref_cg=[0.5,0.0,0.0], geometry=geometry) 20 | self.test_avl_case = 'allegro' 21 | 22 | def tearDown(self): 23 | pass 24 | 25 | def test_file_write(self): 26 | file = open(self.test_avl_case+'.avl', 'w') 27 | self.case.write_input_file(file) 28 | 29 | def test_file_read(self): 30 | file = open(join(runs_dir, self.test_avl_case+'.avl')) 31 | case = Case.case_from_input_file(file) 32 | file.close() 33 | file = open('read_test_write.avl', 'w') 34 | case.write_input_file(file) 35 | file.close() 36 | 37 | def test_filter_lines(self): 38 | file = open(join(runs_dir, self.test_avl_case+'.avl')) 39 | lines = filter_lines(file.readlines()) 40 | f2 = open('filter_lines.avl', 'w') 41 | f2.write('\n'.join(lines)) 42 | f2.close() 43 | file.close() 44 | file = open('filter_test.avl','w') 45 | file.write('\n'.join(lines)) 46 | file.close() 47 | 48 | def test_ui(self): 49 | file = open(join(runs_dir, self.test_avl_case+'.avl')) 50 | self.case = Case.case_from_input_file(file) 51 | import sys 52 | self.case.configure_traits() 53 | #self.case.geometry.surfaces[0].write_to_file(sys.stdout) 54 | 55 | #self.case.geometry.configure_traits() 56 | #self.case.geometry.surfaces[0].configure_traits() 57 | #self.case.geometry.write_to_file(sys.stdout) 58 | from pyavl.ui.geometry_viewer import GeometryViewer 59 | g = GeometryViewer(geometry=self.case.geometry) 60 | g.configure_traits(scrollable=True) 61 | 62 | if __name__ == "__main__": 63 | #import sys;sys.argv = ['', 'Test.test_file_write'] 64 | unittest.main() -------------------------------------------------------------------------------- /pyavl/testing/case_plain.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 10, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | import unittest 7 | from pyavl import runs_dir, join 8 | from pyavl.case import Case, filter_lines 9 | from pyavl.geometry import Geometry, Surface 10 | 11 | class Test(unittest.TestCase): 12 | 13 | def setUp(self): 14 | geometry = Geometry() 15 | surface1 = Surface('surface 1', (20,1.0), scale=2.0) 16 | geometry.surfaces[surface1.name] = surface1 17 | self.case = Case(casename='testCase', mach_no=0.0, symmetry=(0,0,0.0), ref_area=9.0, ref_chord=0.9, ref_span=10.0, ref_cg=(0.5,0.0,0.0), geometry=geometry) 18 | self.test_avl_case = 'ow' 19 | 20 | def tearDown(self): 21 | pass 22 | 23 | 24 | def test_file_write(self): 25 | file = open(self.test_avl_case+'.avl', 'w') 26 | self.case.write_input_file(file) 27 | 28 | def test_file_read(self): 29 | file = open(join(runs_dir, self.test_avl_case+'.avl')) 30 | case = Case.case_from_input_file(file) 31 | file.close() 32 | file = open('read_test_write.avl', 'w') 33 | case.write_input_file(file) 34 | file.close() 35 | 36 | def test_filter_lines(self): 37 | file = open(join(runs_dir, self.test_avl_case+'.avl')) 38 | lines = filter_lines(file.readlines()) 39 | f2 = open('filter_lines.avl', 'w') 40 | f2.write('\n'.join(lines)) 41 | f2.close() 42 | file.close() 43 | file = open('filter_test.avl','w') 44 | file.write('\n'.join(lines)) 45 | file.close() 46 | 47 | if __name__ == "__main__": 48 | #import sys;sys.argv = ['', 'Test.test_file_write'] 49 | unittest.main() -------------------------------------------------------------------------------- /pyavl/testing/filter_lines.avl: -------------------------------------------------------------------------------- 1 | Allegro-lite 2M 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | 530.0 6.6 78.6 Sref Cref Bref reference area, chord, span 5 | 3.250 0.0 0.5 Xref Yref Zref moment reference location (arb.) 6 | 0.020 CDoref 7 | SURFACE 8 | WING 9 | 7 1.0 20 -2.0 10 | YDUPLICATE 11 | 0.00000 12 | ANGLE 13 | 0.00000 14 | TRANSLATE 15 | 0.00000 0.00000 0.00000 16 | SECTION 17 | 0.00000 0.00000 0.00000 8.0 1.490 5 0.25 18 | AFIL 19 | ag35.dat 20 | SECTION 21 | 0.500 15.0 0.0 7.5 1.380 7 -2.60 22 | AFIL 23 | ag36.dat 24 | SECTION 25 | 1.875 31.0 3.30 6.0 1.220 8 -2.25 26 | AFIL 27 | ag37.dat 28 | SECTION 29 | 3.625 39.3 7.00 4.0 0.940 1 0 30 | AFIL 31 | ag38.dat 32 | SURFACE 33 | Horizontal tail 34 | 5 1.0 7 -1.5 35 | YDUPLICATE 36 | 0.00000 37 | ANGLE 38 | 0.0000 39 | TRANSLATE 40 | 27.50000 0.00000 1.25000 41 | SECTION 42 | 0.00000 0.00000 0.00000 3.5 0.000 7 -1.5 43 | CONTROL 44 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 45 | SECTION 46 | 1.15 9.0 0.00000 1.8 0.000 1 0 47 | CONTROL 48 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 49 | SURFACE 50 | Vertical tail 51 | 6 1.0 10 0.5 52 | TRANSLATE 53 | 33.00000 0.00000 0.00000 54 | SECTION 55 | -1.28 0.00000 -2.00000 3.20000 0.000 3 1.5 56 | CONTROL 57 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 58 | SECTION 59 | -1.68 0.00000 0.00000 4.20000 0.000 2 0.5 60 | CONTROL 61 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 62 | SECTION 63 | -1.5388 0.00000 1.25000 3.847 0.000 8 -1.5 64 | CONTROL 65 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 66 | SECTION 67 | -0.72 0.00000 8.50 1.80000 0.000 1 0 68 | CONTROL 69 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 -------------------------------------------------------------------------------- /pyavl/testing/filter_test.avl: -------------------------------------------------------------------------------- 1 | Allegro-lite 2M 2 | 0.0 Mach 3 | 0 0 0.0 iYsym iZsym Zsym 4 | 530.0 6.6 78.6 Sref Cref Bref reference area, chord, span 5 | 3.250 0.0 0.5 Xref Yref Zref moment reference location (arb.) 6 | 0.020 CDoref 7 | SURFACE 8 | WING 9 | 7 1.0 20 -2.0 10 | YDUPLICATE 11 | 0.00000 12 | ANGLE 13 | 0.00000 14 | TRANSLATE 15 | 0.00000 0.00000 0.00000 16 | SECTION 17 | 0.00000 0.00000 0.00000 8.0 1.490 5 0.25 18 | AFIL 19 | ag35.dat 20 | SECTION 21 | 0.500 15.0 0.0 7.5 1.380 7 -2.60 22 | AFIL 23 | ag36.dat 24 | SECTION 25 | 1.875 31.0 3.30 6.0 1.220 8 -2.25 26 | AFIL 27 | ag37.dat 28 | SECTION 29 | 3.625 39.3 7.00 4.0 0.940 1 0 30 | AFIL 31 | ag38.dat 32 | SURFACE 33 | Horizontal tail 34 | 5 1.0 7 -1.5 35 | YDUPLICATE 36 | 0.00000 37 | ANGLE 38 | 0.0000 39 | TRANSLATE 40 | 27.50000 0.00000 1.25000 41 | SECTION 42 | 0.00000 0.00000 0.00000 3.5 0.000 7 -1.5 43 | CONTROL 44 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 45 | SECTION 46 | 1.15 9.0 0.00000 1.8 0.000 1 0 47 | CONTROL 48 | elevator 1.0 0.0 0.0 1.0 0.0 1.0 49 | SURFACE 50 | Vertical tail 51 | 6 1.0 10 0.5 52 | TRANSLATE 53 | 33.00000 0.00000 0.00000 54 | SECTION 55 | -1.28 0.00000 -2.00000 3.20000 0.000 3 1.5 56 | CONTROL 57 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 58 | SECTION 59 | -1.68 0.00000 0.00000 4.20000 0.000 2 0.5 60 | CONTROL 61 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 62 | SECTION 63 | -1.5388 0.00000 1.25000 3.847 0.000 8 -1.5 64 | CONTROL 65 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 66 | SECTION 67 | -0.72 0.00000 8.50 1.80000 0.000 1 0 68 | CONTROL 69 | rudder 1.0 0.4 0.0 0.0 1.0 1.0 -------------------------------------------------------------------------------- /pyavl/testing/mass.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 26, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | import unittest 7 | from pyavl import mass 8 | 9 | 10 | class Test(unittest.TestCase): 11 | 12 | 13 | def setUp(self): 14 | pass 15 | 16 | 17 | def tearDown(self): 18 | pass 19 | 20 | 21 | def test_from_file(self): 22 | massobj = mass.Mass.mass_from_file('allegro.mass') 23 | print massobj.traits() 24 | 25 | def test_to_file(self): 26 | massobj = mass.Mass.mass_from_file('allegro.mass') 27 | file = open('allegro.test.mass','w') 28 | massobj.write_mass_file(file) 29 | 30 | 31 | 32 | if __name__ == "__main__": 33 | #import sys;sys.argv = ['', 'Test.test_from_file'] 34 | unittest.main() -------------------------------------------------------------------------------- /pyavl/testing/read_test_write.avl: -------------------------------------------------------------------------------- 1 | Allegro-lite 2M 2 | #Mach no 3 | 0.000000 4 | #iYsym iZsym Zsym 5 | 0 0 0.000000 6 | #Sref Cref Bref 7 | 530.000000 6.600000 78.600000 8 | #Xref Yref Zref 9 | 3.250000 0.000000 0.500000 10 | #CD_p profile drag coefficient 11 | 0.020000 12 | 13 | ###################################################################### 14 | # SURFACES 15 | SURFACE 16 | WING 17 | # Nchord Cspace [ Nspan Sspace ] 18 | 7 1.000000 20 -2.000000 19 | INDEX 20 | 0 21 | YDUPLICATE 22 | 0.0 23 | SCALE 24 | [ 0. 0. 0.] 25 | TRANSLATE 26 | [ 0. 0. 0.] 27 | ANGLE 28 | 0.0 29 | SECTION 30 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 31 | 0.000000 0.000000 0.000000 8.000000 1.490000 5 0.250000 32 | AFILE 33 | ag35.dat 34 | CLAF 35 | 1.000000 36 | 37 | SECTION 38 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 39 | 0.500000 15.000000 0.000000 7.500000 1.380000 7 -2.600000 40 | AFILE 41 | ag36.dat 42 | CLAF 43 | 1.000000 44 | 45 | SECTION 46 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 47 | 1.875000 31.000000 3.300000 6.000000 1.220000 8 -2.250000 48 | AFILE 49 | ag37.dat 50 | CLAF 51 | 1.000000 52 | 53 | SECTION 54 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 55 | 3.625000 39.300000 7.000000 4.000000 0.940000 1 0.000000 56 | AFILE 57 | ag38.dat 58 | CLAF 59 | 1.000000 60 | 61 | 62 | SURFACE 63 | Horizontal tail 64 | # Nchord Cspace [ Nspan Sspace ] 65 | 5 1.000000 7 -1.500000 66 | INDEX 67 | 0 68 | YDUPLICATE 69 | 0.0 70 | SCALE 71 | [ 0. 0. 0.] 72 | TRANSLATE 73 | [ 27.5 0. 1.25] 74 | ANGLE 75 | 0.0 76 | SECTION 77 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 78 | 0.000000 0.000000 0.000000 3.500000 0.000000 7 -1.500000 79 | CLAF 80 | 1.000000 81 | CONTROL 82 | #Cname Cgain Xhinge HingeVec SgnDup 83 | elevator 1.000000 0.000000 0.000000 1.000000 0.000000 1.000000 84 | 85 | SECTION 86 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 87 | 1.150000 9.000000 0.000000 1.800000 0.000000 1 0.000000 88 | CLAF 89 | 1.000000 90 | CONTROL 91 | #Cname Cgain Xhinge HingeVec SgnDup 92 | elevator 1.000000 0.000000 0.000000 1.000000 0.000000 1.000000 93 | 94 | 95 | SURFACE 96 | Vertical tail 97 | # Nchord Cspace [ Nspan Sspace ] 98 | 6 1.000000 10 0.500000 99 | INDEX 100 | 0 101 | YDUPLICATE 102 | nan 103 | SCALE 104 | [ 0. 0. 0.] 105 | TRANSLATE 106 | [ 33. 0. 0.] 107 | ANGLE 108 | 0.0 109 | SECTION 110 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 111 | -1.280000 0.000000 -2.000000 3.200000 0.000000 3 1.500000 112 | CLAF 113 | 1.000000 114 | CONTROL 115 | #Cname Cgain Xhinge HingeVec SgnDup 116 | rudder 1.000000 0.400000 0.000000 0.000000 1.000000 1.000000 117 | 118 | SECTION 119 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 120 | -1.680000 0.000000 0.000000 4.200000 0.000000 2 0.500000 121 | CLAF 122 | 1.000000 123 | CONTROL 124 | #Cname Cgain Xhinge HingeVec SgnDup 125 | rudder 1.000000 0.400000 0.000000 0.000000 1.000000 1.000000 126 | 127 | SECTION 128 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 129 | -1.538800 0.000000 1.250000 3.847000 0.000000 8 -1.500000 130 | CLAF 131 | 1.000000 132 | CONTROL 133 | #Cname Cgain Xhinge HingeVec SgnDup 134 | rudder 1.000000 0.400000 0.000000 0.000000 1.000000 1.000000 135 | 136 | SECTION 137 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 138 | -0.720000 0.000000 8.500000 1.800000 0.000000 1 0.000000 139 | CLAF 140 | 1.000000 141 | CONTROL 142 | #Cname Cgain Xhinge HingeVec SgnDup 143 | rudder 1.000000 0.400000 0.000000 0.000000 1.000000 1.000000 144 | 145 | 146 | # END SURFACES 147 | 148 | # BODIES 149 | # END BODIES 150 | 151 | -------------------------------------------------------------------------------- /pyavl/testing/test.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jul 3, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | from numpy import float 8 | from enthought.traits.api import HasTraits, Tuple, List, Float, String, on_trait_change 9 | from enthought.traits.ui.api import View, Item, ListEditor, TupleEditor, TextEditor 10 | 11 | # Copyright (c) 2007, Enthought, Inc. 12 | # License: BSD Style.# Imports: 13 | from enthought.traits.api import HasStrictTraits, Str, Int, Regex, List, Instance, cached_property, Property, Dict 14 | 15 | from enthought.traits.ui.api \ 16 | import TreeEditor, TreeNodeObject, ObjectTreeNode, View, Item, Tabbed, TableEditor, ListEditor, Handler, Group 17 | from enthought.traits.ui.menu import ToolBar, Action, Menu, Separator 18 | from enthought.traits.ui.table_column \ 19 | import ObjectColumn 20 | 21 | from enthought.traits.ui.table_filter \ 22 | import RuleTableFilter, RuleFilterTemplate, \ 23 | MenuFilterTemplate, EvalFilterTemplate 24 | 25 | class Parameter(HasTraits): 26 | name = String('name') 27 | value = Float 28 | def __str__(self): return '{%s:%f}' %(self.name,self.value) 29 | def __repr__(self): return '{%s:%f}' %(self.name,self.value) 30 | editor = TableEditor( 31 | auto_size=False, 32 | columns=[ObjectColumn(name='name', label='Name', editable=False), 33 | ObjectColumn(name='value', label='Value', 34 | editor=TextEditor(evaluate=float, enter_set=True, auto_set=False)), 35 | ]) 36 | class C(HasTraits): 37 | d = Dict(String, Instance(Parameter), {'p1':Parameter(name='p1',value=0.1), 38 | 'p2':Parameter(name='p2',value=0.2)}) 39 | d_view = List(Instance(Parameter)) 40 | def _d_view_default(self): 41 | return self.d.values() 42 | @on_trait_change('d.value') 43 | def update_view(self): 44 | print 'updating view' 45 | self.d_view = self.d.values() 46 | @on_trait_change('d_view.value') 47 | def update_d(self): 48 | print 'updating d' 49 | 50 | view = View(Item('d_view', editor=Parameter.editor)) 51 | 52 | c = C() 53 | c.configure_traits() 54 | print c.d, c.d_view 55 | c.d['p1'].value = 1.2 56 | print c.d, c.d_view 57 | c.d_view[0].value = 1.2 58 | print c.d, c.d_view 59 | -------------------------------------------------------------------------------- /pyavl/testing/testcase.avl: -------------------------------------------------------------------------------- 1 | testCase 2 | #Mach no 3 | 0.000000 4 | #iYsym iZsym Zsym 5 | 0 0 0.000000 6 | #Sref Cref Bref 7 | 9.000000 0.900000 10.000000 8 | #Xref Yref Zref 9 | 0.500000 0.000000 0.000000 10 | 11 | ###################################################################### 12 | # SURFACES 13 | SURFACE 14 | surface 1 15 | # Nchord Cspace [ Nspan Sspace ] 16 | 20 1.000000 17 | SCALE 18 | 2.0 19 | 20 | # END SURFACES 21 | 22 | # BODIES 23 | # END BODIES 24 | 25 | -------------------------------------------------------------------------------- /pyavl/testing/vanilla_test.avl: -------------------------------------------------------------------------------- 1 | Plane Vanilla 2 | #Mach no 3 | 0.000000 4 | #iYsym iZsym Zsym 5 | 0 0 0.000000 6 | #Sref Cref Bref 7 | 9.000000 0.900000 10.000000 8 | #Xref Yref Zref 9 | 0.500000 0.000000 0.000000 10 | 11 | ###################################################################### 12 | # SURFACES 13 | SURFACE 14 | V-stab 15 | # Nchord Cspace [ Nspan Sspace ] 16 | 6 1.000000 5 1.000000 17 | 4.0 0.0 0.0 18 | SECTION 19 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 20 | 0.000000 0.000000 0.000000 0.700000 0.000000 0 0.000000 21 | CONTROL 22 | #Cname Cgain Xhinge HingeVec SgnDup 23 | rudder 1.000000 0.500000 0.000000 0.000000 1.000000 1.000000 24 | 25 | SECTION 26 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 27 | 0.140000 0.000000 1.000000 0.420000 0.000000 0 0.000000 28 | CONTROL 29 | #Cname Cgain Xhinge HingeVec SgnDup 30 | rudder 1.000000 0.500000 0.000000 0.000000 1.000000 1.000000 31 | 32 | 33 | SURFACE 34 | Wing 35 | # Nchord Cspace [ Nspan Sspace ] 36 | 8 1.000000 12 1.000000 37 | YDUPLICATE 38 | 0.0 39 | ANGLE 40 | 2.0 41 | SECTION 42 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 43 | 0.000000 0.000000 0.000000 1.000000 0.000000 0 0.000000 44 | AFILE 45 | sd7037.dat 46 | CLAF 47 | 1.000000 48 | CONTROL 49 | #Cname Cgain Xhinge HingeVec SgnDup 50 | aileron -1.000000 0.750000 0.000000 0.000000 0.000000 -1.000000 51 | CONTROL 52 | #Cname Cgain Xhinge HingeVec SgnDup 53 | flap 1.000000 0.750000 0.000000 0.000000 0.000000 1.000000 54 | 55 | SECTION 56 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 57 | 0.200000 5.000000 1.000000 0.600000 0.000000 0 0.000000 58 | AFILE 59 | sd7037.dat 60 | CLAF 61 | 1.000000 62 | CONTROL 63 | #Cname Cgain Xhinge HingeVec SgnDup 64 | aileron -1.000000 0.750000 0.000000 0.000000 0.000000 -1.000000 65 | CONTROL 66 | #Cname Cgain Xhinge HingeVec SgnDup 67 | flap 1.000000 0.750000 0.000000 0.000000 0.000000 1.000000 68 | 69 | 70 | SURFACE 71 | H-stab 72 | # Nchord Cspace [ Nspan Sspace ] 73 | 6 1.000000 6 1.000000 74 | YDUPLICATE 75 | 0.0 76 | 4.0 0.0 0.0 77 | SECTION 78 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 79 | 0.000000 0.000000 0.000000 0.700000 0.000000 0 0.000000 80 | CONTROL 81 | #Cname Cgain Xhinge HingeVec SgnDup 82 | elevator 1.000000 0.700000 0.000000 1.000000 0.000000 1.000000 83 | 84 | SECTION 85 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 86 | 0.140000 1.250000 0.000000 0.420000 0.000000 0 0.000000 87 | CONTROL 88 | #Cname Cgain Xhinge HingeVec SgnDup 89 | elevator 1.000000 0.700000 0.000000 1.000000 0.000000 1.000000 90 | 91 | 92 | # END SURFACES 93 | 94 | # BODIES 95 | # END BODIES 96 | 97 | -------------------------------------------------------------------------------- /pyavl/ui/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajp/pyavl/714c2273a87c6040b76e876a018093b4b570af5d/pyavl/ui/__init__.py -------------------------------------------------------------------------------- /pyavl/ui/case.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 13, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | from enthought.traits.api import HasTraits 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /pyavl/ui/envisage/__init__.py: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # Copyright (c) 2007 by Enthought, Inc. 3 | # All rights reserved. 4 | #------------------------------------------------------------------------------ 5 | 6 | try: 7 | __import__('pkg_resources').declare_namespace(__name__) 8 | except: 9 | pass 10 | 11 | 12 | -------------------------------------------------------------------------------- /pyavl/ui/envisage/application.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jul 1, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | from logging import DEBUG 8 | 9 | # Enthought library imports. 10 | from enthought.envisage.ui.workbench.api import WorkbenchApplication 11 | from enthought.pyface.api import AboutDialog, ImageResource, SplashScreen 12 | 13 | class PyAVLApplication(WorkbenchApplication): 14 | id = 'pyavl.ui.envisage' 15 | icon = ImageResource('pyAVL.ico') 16 | name = 'pyAVL' 17 | 18 | ########################################################################### 19 | # 'WorkbenchApplication' interface. 20 | ########################################################################### 21 | 22 | def _about_dialog_default(self): 23 | """ Trait initializer. """ 24 | 25 | about_dialog = AboutDialog( 26 | parent = self.workbench.active_window.control, 27 | image = ImageResource('about') 28 | ) 29 | 30 | return about_dialog 31 | 32 | def _splash_screen_default(self): 33 | """ Trait initializer. """ 34 | 35 | splash_screen = SplashScreen( 36 | image = ImageResource('splash'), 37 | show_log_messages = True, 38 | log_level = DEBUG 39 | ) 40 | 41 | return splash_screen 42 | 43 | #### EOF ###################################################################### 44 | -------------------------------------------------------------------------------- /pyavl/ui/envisage/avl_plugin.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jul 2, 2009 3 | 4 | @author: pankaj 5 | 6 | The AVL plugin 7 | ''' 8 | 9 | # Enthought library imports. 10 | from enthought.envisage.api import Plugin, ServiceOffer 11 | from enthought.traits.api import List 12 | 13 | from pyavl import runs_dir, join 14 | 15 | class AVLPlugin(Plugin): 16 | """ The pyAVL plugin. 17 | 18 | This plugin is part of the 'pyAVL' application. 19 | 20 | """ 21 | 22 | # Extension points Ids. 23 | SERVICE_OFFERS = 'enthought.envisage.service_offers' 24 | 25 | #### 'IPlugin' interface ################################################## 26 | 27 | # The plugin's unique identifier. 28 | id = 'pyavl.ui.envisage' 29 | 30 | # The plugin's name (suitable for displaying to the user). 31 | name = 'pyAVL' 32 | 33 | #### Contributions to extension points made by this plugin ################ 34 | 35 | # Service offers. 36 | service_offers = List(contributes_to=SERVICE_OFFERS) 37 | 38 | def _service_offers_default(self): 39 | """ Trait initializer. """ 40 | avl_service_offer = ServiceOffer( 41 | protocol='pyavl.avl.AVL', 42 | factory='pyavl.avl.create_default_avl' 43 | ) 44 | 45 | def create_default_runoutput(*args, **kwargs): 46 | avl = AVL(cwd=runs_dir) 47 | avl.load_case_from_file(join(runs_dir, 'vanilla.avl')) 48 | return avl 49 | 50 | #avl_runoutput_service_offer = ServiceOffer( 51 | # protocol='pyavl.outpututils.RunOutput', 52 | # factory=self.create_default_runoutput, 53 | # ) 54 | 55 | return [avl_service_offer]#, avl_runoutput_service_offer] 56 | 57 | 58 | #### EOF ###################################################################### 59 | 60 | -------------------------------------------------------------------------------- /pyavl/ui/envisage/avl_traits_ui_view.py: -------------------------------------------------------------------------------- 1 | """ A view whose content is provided by a traits UI. """ 2 | 3 | 4 | # Standard library imports. 5 | import logging 6 | 7 | # Enthought library imports. 8 | from enthought.traits.api import Any, Instance, Str 9 | from enthought.traits.ui.api import UI 10 | 11 | # Local imports. 12 | from enthought.pyface.workbench.view import View 13 | 14 | 15 | # Logging. 16 | logger = logging.getLogger(__name__) 17 | 18 | 19 | class AVLTraitsUIView(View): 20 | """ A view whose content is provided by a traits UI. """ 21 | 22 | #### 'TraitsUIView' interface ############################################# 23 | 24 | # The object that we povide a traits UI of (this defaults to the view 25 | # iteself ie. 'self'). 26 | obj = Any 27 | 28 | # The traits UI that represents the view. 29 | # 30 | # The framework sets this to the value returned by 'create_ui'. 31 | ui = Instance(UI) 32 | 33 | # The name of the traits UI view used to create the UI (if not specified, 34 | # the default traits UI view is used). 35 | view = Any 36 | 37 | ########################################################################### 38 | # 'IWorkbenchPart' interface. 39 | ########################################################################### 40 | 41 | #### Trait initializers ################################################### 42 | 43 | def _name_default(self): 44 | """ Trait initializer. """ 45 | 46 | return str(self.obj) 47 | 48 | #### Methods ############################################################## 49 | 50 | def create_control(self, parent): 51 | """ Creates the toolkit-specific control that represents the editor. 52 | 53 | 'parent' is the toolkit-specific control that is the editor's parent. 54 | 55 | Overridden to call 'create_ui' to get the traits UI. 56 | 57 | """ 58 | 59 | self.ui = self.create_ui(parent) 60 | 61 | return self.ui.control 62 | 63 | def destroy_control(self): 64 | """ Destroys the toolkit-specific control that represents the editor. 65 | 66 | Overridden to call 'dispose' on the traits UI. 67 | 68 | """ 69 | 70 | # Give the traits UI a chance to clean itself up. 71 | if self.ui is not None: 72 | logger.debug('disposing traits UI for view [%s]', self) 73 | self.ui.dispose() 74 | self.ui = None 75 | # Break reference to the control, so the view is created afresh 76 | # next time. 77 | self.control = None 78 | 79 | return 80 | 81 | ########################################################################### 82 | # 'TraitsUIView' interface. 83 | ########################################################################### 84 | 85 | #### Trait initializers ################################################### 86 | 87 | def _obj_default(self): 88 | """ Trait initializer. """ 89 | 90 | return self 91 | 92 | #### Methods ############################################################## 93 | 94 | def create_ui(self, parent): 95 | """ Creates the traits UI that represents the editor. 96 | 97 | By default it calls 'edit_traits' on the view's 'model'. If you 98 | want more control over the creation of the traits UI then override! 99 | 100 | """ 101 | 102 | ui = self.obj.edit_traits( 103 | parent=parent, view=self.view, kind='subpanel' 104 | ) 105 | 106 | return ui 107 | 108 | #### EOF ###################################################################### 109 | -------------------------------------------------------------------------------- /pyavl/ui/envisage/handler.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jul 4, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | from pyavl.utils.traitstools import get_file_from_user 8 | from pyavl.runutils import RunConfig 9 | 10 | from enthought.traits.api import String, Int, List, Instance 11 | from enthought.traits.ui.api import View, Item, Tabbed, TableEditor, ListEditor, Handler 12 | from enthought.traits.ui.menu import ToolBar, Action, Menu 13 | 14 | import logging 15 | # Logging. 16 | logger = logging.getLogger(__name__) 17 | 18 | class AVLHandler(Handler): 19 | ''' 20 | Handler for all gui events 21 | ''' 22 | toolbar_actions = List(Action,[Action(name = "Load Case", 23 | action = "load_case", 24 | toolip = "Load an AVL case from file"), 25 | Action(name = "Save Case", 26 | action = "save_case", 27 | toolip = "Save AVL case to file"), 28 | Action(name = "Run...", 29 | action = "run_config", 30 | toolip = "Recalculate the results"), 31 | ]) 32 | #def object_runcases_changed(self, uiinfo): 33 | # print uiinfo.object, 'runcase name changed' 34 | def run_config(self, info): 35 | print 'running...' 36 | runcase = info.object.avl.run_cases[0] 37 | runcaseconfig = RunConfig(runcase=runcase) 38 | out = runcaseconfig.configure_traits(kind='livemodal') 39 | if not out: 40 | return 41 | output = runcaseconfig.run() 42 | runcase.runoutput.variable_names = output.variable_names 43 | runcase.runoutput.variable_values = output.variable_values 44 | runcase.runoutput.eigenmodes = output.eigenmodes 45 | runcase.runoutput.eigenmatrix = output.eigenmatrix 46 | 47 | 48 | def load_case(self, info): 49 | avl = info.object.avl 50 | filename = get_file_from_user(cwd=avl.case_filename, filter=['AVL case files (*.avl)|*.avl']) 51 | if filename: 52 | avl.load_case_from_file(filename) 53 | logger.info('loading case from file : %s' %str(filename)) 54 | avl.reload_case = True 55 | 56 | # NOTE: it also reloads the case into avl 57 | def save_case(self, info): 58 | case = info.object.avl.case 59 | filename = get_file_from_user(cwd=case.case_filename, filter=['AVL case files (*.avl)|*.avl']) 60 | if filename: 61 | f = open(filename, 'w') 62 | case.write_input_file(f) 63 | f.flush() 64 | f.close() 65 | logger.info('saving case to file : %s' %str(filename)) 66 | info.object.avl.load_case_from_file(filename) 67 | logger.info('reloading case into avl : %s' %str(filename)) 68 | 69 | 70 | def object_avl_case_changed(self, info): 71 | logger.info('handler : object_avl_case_changed') -------------------------------------------------------------------------------- /pyavl/ui/envisage/images/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajp/pyavl/714c2273a87c6040b76e876a018093b4b570af5d/pyavl/ui/envisage/images/splash.png -------------------------------------------------------------------------------- /pyavl/ui/envisage/run.py: -------------------------------------------------------------------------------- 1 | """ Run the Lorenz example application. """ 2 | 3 | 4 | # Standard library imports. 5 | import logging 6 | 7 | # pyavl imports 8 | from pyavl.ui.envisage.avl_plugin import AVLPlugin 9 | from pyavl.ui.envisage.avl_ui_plugin import AVLUIPlugin 10 | from pyavl.ui.envisage.output_plugin import AVLOutputPlugin 11 | from pyavl.ui.envisage.application import PyAVLApplication 12 | 13 | 14 | # Enthought plugins. 15 | from enthought.envisage.core_plugin import CorePlugin 16 | from enthought.envisage.ui.workbench.workbench_plugin import WorkbenchPlugin 17 | 18 | from enthought.envisage.developer.ui.developer_ui_plugin import DeveloperUIPlugin 19 | 20 | use_ipython_plugin = False 21 | 22 | if use_ipython_plugin: 23 | from enthought.plugins.ipython_shell.ipython_shell_plugin import IPythonShellPlugin 24 | PythonShellPlugin = IPythonShellPlugin 25 | else: 26 | from enthought.plugins.python_shell.python_shell_plugin import PythonShellPlugin 27 | 28 | from enthought.plugins.text_editor.text_editor_plugin import TextEditorPlugin 29 | from enthought.logger.plugin.logger_plugin import LoggerPlugin 30 | 31 | from enthought.chaco.plugin.chaco_plugin import ChacoPlugin 32 | 33 | 34 | # Do whatever you want to do with log messages! Here we create a log file. 35 | logger = logging.getLogger() 36 | #logger.addHandler(logging.StreamHandler(file('lorenz.log', 'w'))) 37 | logger.addHandler(logging.StreamHandler()) 38 | logger.setLevel(logging.DEBUG) 39 | 40 | 41 | def main(): 42 | """ Run the application. """ 43 | 44 | # Create an application with the specified plugins. 45 | application = PyAVLApplication( 46 | plugins=[ 47 | CorePlugin(), WorkbenchPlugin(), 48 | AVLPlugin(), 49 | AVLUIPlugin(), 50 | LoggerPlugin(), 51 | PythonShellPlugin(), 52 | TextEditorPlugin(), 53 | ChacoPlugin(), 54 | 55 | DeveloperUIPlugin(), 56 | 57 | AVLOutputPlugin(), 58 | ] 59 | ) 60 | 61 | # Run it! This starts the application, starts the GUI event loop, and when 62 | # that terminates, stops the application. 63 | application.run() 64 | 65 | return 66 | 67 | 68 | if __name__ == '__main__': 69 | main() 70 | 71 | #### EOF ###################################################################### 72 | -------------------------------------------------------------------------------- /pyavl/ui/treeview.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 30, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | from pyavl.avl import AVL, RunCase 8 | from pyavl.case import Case 9 | from pyavl.geometry import Geometry, Surface, Section, Body 10 | 11 | from enthought.traits.api import HasTraits, Instance, List 12 | from enthought.traits.trait_handlers import TraitListObject 13 | from enthought.traits.ui.api import TreeEditor, TreeNode, TreeNodeObject, Item, View, \ 14 | ListEditor, ObjectTreeNode, MultiTreeNode 15 | from enthought.traits.ui.value_tree import ObjectNode, TraitsNode 16 | no_view = View() 17 | 18 | def selection_changed(selection): 19 | print selection 20 | 21 | AVL_tree_editor = TreeEditor( 22 | nodes = [ 23 | TreeNode( node_for = [ AVL ], 24 | auto_open = True, 25 | children = '', 26 | label = '=pyAVL', 27 | view = no_view 28 | ), 29 | TreeNode( node_for = [ AVL ], 30 | auto_open = True, 31 | children = 'run_cases', 32 | label = '=runcases', 33 | view = View( [ 'selected_runcase'] ) 34 | ), 35 | TreeNode( node_for = [ AVL ], 36 | auto_open = True, 37 | children = '', 38 | label = '=cases', 39 | view = View( [ 'case'] ) 40 | ), 41 | TreeNode( node_for = [ RunCase ], 42 | auto_open = True, 43 | children = '', 44 | label = 'name', 45 | view = View( [ 'name','number','parameters','constraints'] ) 46 | ), 47 | TreeNode( node_for = [ Case ], 48 | auto_open = True, 49 | children = 'geometries', 50 | label = 'name', 51 | view = View( [ 'name','mach_no'] ) 52 | ), 53 | TreeNode( node_for = [ Geometry ], 54 | auto_open = True, 55 | children = 'things', 56 | label = '=Geometry', 57 | view = View(['geometry'])#Item('controls', editor=ListEditor(style='readonly')),style='readonly'), 58 | ), 59 | TreeNode( node_for = [ TraitListObject ], 60 | auto_open = True, 61 | children = 'sections', 62 | label = '=Surface', 63 | view = no_view 64 | ) 65 | ], 66 | orientation='vertical', 67 | on_select = selection_changed, 68 | selected = 'selected' 69 | ) 70 | 71 | class AVLTreeView(HasTraits): 72 | avl = Instance(AVL) 73 | 74 | traits_view = View( 75 | Item( name = 'avl', 76 | editor = AVL_tree_editor, 77 | show_label = False 78 | ), 79 | title = 'pyAVL', 80 | buttons = [ 'OK' ], 81 | resizable = True, 82 | style = 'custom', 83 | width = .3, 84 | height = .3 85 | ) 86 | 87 | 88 | if __name__ == '__main__': 89 | from pyavl import runs_dir, join 90 | file = open(join(runs_dir, 'vanilla.avl')) 91 | avl = AVL(cwd=runs_dir) 92 | avl.load_case_from_file(join(runs_dir, 'vanilla.avl')) 93 | tv = AVLTreeView(avl=avl) 94 | tv.configure_traits() 95 | 96 | -------------------------------------------------------------------------------- /pyavl/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajp/pyavl/714c2273a87c6040b76e876a018093b4b570af5d/pyavl/utils/__init__.py -------------------------------------------------------------------------------- /pyavl/utils/naca4_plotter.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jun 15, 2009 3 | 4 | @author: pankaj 5 | http://blenderartists.org/forum/showthread.php?t=9521 6 | ''' 7 | 8 | ###################################################################### 9 | # 10 | # NACA 4-digit airfoil plotter 11 | # 12 | # (C) march 2003 Wim Van Hoydonck 13 | # 14 | ####################################################################### 15 | 16 | import numpy 17 | 18 | def get_NACA4_data(number): 19 | p = (number // 1000) / 100.0 20 | m = (number // 100)%10 / 10.0 21 | xx = (number % 100) / 100.0 22 | return get_NACA_data(p, m, xx) 23 | 24 | def get_NACA_data(p=0.05, m=0.5, xx=0.1, nv=100, nvbl=10, le=0.01): 25 | ''' 26 | p = max camber (in percent of chord) 27 | xx = airfoil thickness in percent of chord 28 | nv = (half) number of (total) vertices 29 | nvbl = number of vertices before le 30 | le = point on chord 31 | m = chordwise location of max camber (0 <= m < 1) 32 | ''' 33 | 34 | # constants in thickness equation of NACA 4-series (from NASA TM 4741) 35 | a0 = 0.2969 36 | a1 = -0.1260 37 | a2 = -0.3516 38 | a3 = 0.2843 39 | a4 = -0.1015 40 | 41 | pointsx = [] 42 | pointsy = [] 43 | # calculate position of verts 44 | i = 0.0 45 | for i in range(2*nv): 46 | if i <= nv: # upper surface calculations 47 | if i < nvbl: # x distribution before le 48 | x = i*le/(nvbl-1.0) 49 | else: # x distribution after le 50 | x = le + (1.0-le)*(i-nvbl+1.0)/(nv-nvbl+1.0) 51 | if x <= m: # camber line equation before max camber 52 | # Edit: added condition - pankaj 53 | if m>0: 54 | yc = (p/m**2.0) * ((2.0*m*x)-(x*x)) 55 | else: 56 | yc = 0 57 | else: # after maxcamber 58 | yc = (p/((1-m)**2.0))*((1.0-2.0*m) + 2.0*m*x - x**2.0) 59 | yt = (xx/0.2)*(a0*x**(0.5) + a1*x + a2*x**2.0 + a3*x**3.0 + a4*x**4.0) # thickness equation 60 | y = yc + yt # add thickness to camber for upper surface 61 | z = 0 62 | else: # lower surface 63 | if i < 2.0*nv - nvbl+1.0: 64 | x = 1.0 - (i-nv)*(1.0-le)/(nv-nvbl+1.0) 65 | else: 66 | x = le*(1.0-(i-2.0*nv+nvbl)/(nvbl-1.0)) 67 | if x <= m: 68 | # Edit: added condition - pankaj 69 | if m>0: 70 | yc = (p/m**2.0) * ((2.0*m*x)-(x)**2.0) 71 | else: 72 | yc = 0 73 | else: 74 | yc = (p/((1-m)**2.0))*((1.0-2.0*m) + 2.0*m*x - x**2.0) 75 | yt = (xx/0.2)*(a0*x**(0.5) + a1*x + a2*x**2.0 + a3*x**3.0 + a4*x**4.0) 76 | y = yc - yt 77 | z = 0 78 | pointsx.append(x) 79 | pointsy.append(y) 80 | ret = numpy.array([pointsx,pointsy]) 81 | return ret.T 82 | 83 | 84 | if __name__ == '__main__': 85 | from pylab import plot, show 86 | points = get_NACA_data() 87 | plot(points[:,0], points[:,1], '.-') 88 | #plot(points[0][2:3], points[1][2:3], '.r') 89 | show() 90 | -------------------------------------------------------------------------------- /pyavl/utils/numerical.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jul 16, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | def false_position_method(func, x0, x1, epsilon, max_iter=100): 8 | '''the false position (secant) method to solve a non-linear equation 9 | returns x,y of the solution''' 10 | y0 = func(x0) 11 | y1 = func(x1) 12 | for i in xrange(max_iter): 13 | if y1 == y0 or -epsilon < y1 < epsilon: 14 | break 15 | x2 = x1 - y1 * (x1 - x0) / (y1 - y0) 16 | x0, x1 = x1, x2 17 | y0, y1 = y1, func(x1) 18 | print 'iterations =', i 19 | return x1, y1 20 | 21 | if __name__ == '__main__': 22 | import math 23 | func = math.cos 24 | print false_position_method(func, 0.0, 1.0, 1e-6) 25 | -------------------------------------------------------------------------------- /pyavl/utils/wizards/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajp/pyavl/714c2273a87c6040b76e876a018093b4b570af5d/pyavl/utils/wizards/__init__.py -------------------------------------------------------------------------------- /pyavl/utils/wizards/parafoil.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Jul 13, 2009 3 | 4 | @author: pankaj 5 | ''' 6 | 7 | from pyavl.geometry import Section, SectionAFILEData, Geometry, Surface, SectionData, SectionAIRFOILData 8 | from pyavl.ui.geometry_viewer import GeometryViewer 9 | from pyavl import runs_dir, src_dir 10 | 11 | import numpy 12 | import os 13 | 14 | from enthought.traits.api import Float, Range, Instance, Int, HasTraits 15 | from enthought.traits.ui.api import View, Item 16 | 17 | class ParafoilWizard(HasTraits): 18 | span = Float(7.5) 19 | chord = Float(3.75) 20 | number_of_cells = Int(9) 21 | anhedral_angle = Float(40) 22 | sectiondata = Instance(SectionData, SectionAFILEData(filename=os.path.join(src_dir, 'testcase', 'avl_case', 'clarky.dat'))) 23 | #le_cut = Range(0.0,1.0,0.0, desc='leading edge cut position') 24 | inlet_height = Range(0.0, 0.5, 0.1, desc='the height of the inlet cut') 25 | cut_angle = Range(90., 180., 135, desc='leading edge cut angle with the positive x axis') 26 | def get_surface(self): 27 | num_sections = (self.number_of_cells + 1) // 2 28 | anhedral_angle_r = self.anhedral_angle * numpy.pi / 180 29 | r = self.span / 2.0 / numpy.sin(anhedral_angle_r) 30 | sections = [] 31 | y = numpy.linspace(self.number_of_cells % 2, self.number_of_cells, num_sections) / self.number_of_cells 32 | sectiondata = SectionAIRFOILData.get_clipped_section_data(self.sectiondata, self.inlet_height, self.cut_angle) 33 | filename = 'parafoil.dat' 34 | filename = os.path.abspath(filename) 35 | sectiondata.write_airfoil_file(filename, 'parafoil') 36 | if self.number_of_cells%2==1: 37 | le = numpy.zeros((3,)) 38 | sectionafile = SectionAFILEData(filename=filename) 39 | sections.append(Section(leading_edge=le, chord=self.chord, type=sectionafile.type, data=sectionafile)) 40 | for i, theta in enumerate(anhedral_angle_r * y): 41 | le = numpy.array([0, r * numpy.sin(theta), r * (numpy.cos(theta) - 1)]) 42 | sectionafile = SectionAFILEData(filename=filename) 43 | sections.append(Section(leading_edge=le, chord=self.chord, type=sectionafile.type, data=sectionafile)) 44 | surface = Surface(name='Parafoil', yduplicate=0, sections=sections) 45 | return surface 46 | traits_view = View('span','chord','number_of_cells','anhedral_angle', 47 | Item('object.sectiondata.filename',label='section data file'), 48 | 'inlet_height','cut_angle') 49 | 50 | if __name__ == '__main__': 51 | import sys 52 | from pyavl.case import Case 53 | from pyavl import runs_dir, join 54 | file = open(join(runs_dir, 'bd.avl')) 55 | case = Case.case_from_input_file(file) 56 | pw = ParafoilWizard() 57 | pw.configure_traits() 58 | surface = pw.get_surface() 59 | #surface.configure_traits() 60 | geometry = Geometry(surfaces=[surface]) 61 | #geometry.configure_traits() 62 | g = GeometryViewer(geometry=geometry) 63 | g.configure_traits() 64 | surface.write_to_file(sys.stdout) -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from os.path import dirname, join 4 | import os 5 | import sys 6 | import subprocess 7 | 8 | src_dir = os.path.abspath(dirname(__file__)) 9 | 10 | os.environ['PATH'] = join(src_dir, 'avl', 'bin') + os.pathsep + os.environ['PATH'] 11 | 12 | if 'PYTHONPATH' in os.environ: 13 | os.environ['PYTHONPATH'] = src_dir + os.pathsep + os.environ['PYTHONPATH'] 14 | else: 15 | os.environ['PYTHONPATH'] = src_dir 16 | 17 | os.environ['ETS_TOOLKIT'] = 'wx' 18 | 19 | proc = subprocess.Popen([sys.executable, join(src_dir, 'pyavl', 'ui', 'envisage', 'run.py')]) 20 | 21 | proc.wait() 22 | 23 | -------------------------------------------------------------------------------- /testcase/avl_case/clarky.dat: -------------------------------------------------------------------------------- 1 | CLARK Y AIRFOIL 2 | 1.0000000 0.0005993 3 | 0.9900000 0.0029690 4 | 0.9800000 0.0053335 5 | 0.9700000 0.0076868 6 | 0.9600000 0.0100232 7 | 0.9400000 0.0146239 8 | 0.9200000 0.0191156 9 | 0.9000000 0.0235025 10 | 0.8800000 0.0277891 11 | 0.8600000 0.0319740 12 | 0.8400000 0.0360536 13 | 0.8200000 0.0400245 14 | 0.8000000 0.0438836 15 | 0.7800000 0.0476281 16 | 0.7600000 0.0512565 17 | 0.7400000 0.0547675 18 | 0.7200000 0.0581599 19 | 0.7000000 0.0614329 20 | 0.6800000 0.0645843 21 | 0.6600000 0.0676046 22 | 0.6400000 0.0704822 23 | 0.6200000 0.0732055 24 | 0.6000000 0.0757633 25 | 0.5800000 0.0781451 26 | 0.5600000 0.0803480 27 | 0.5400000 0.0823712 28 | 0.5200000 0.0842145 29 | 0.5000000 0.0858772 30 | 0.4800000 0.0873572 31 | 0.4600000 0.0886427 32 | 0.4400000 0.0897175 33 | 0.4200000 0.0905657 34 | 0.4000000 0.0911712 35 | 0.3800000 0.0915212 36 | 0.3600000 0.0916266 37 | 0.3400000 0.0915079 38 | 0.3200000 0.0911857 39 | 0.3000000 0.0906804 40 | 0.2800000 0.0900016 41 | 0.2600000 0.0890840 42 | 0.2400000 0.0878308 43 | 0.2200000 0.0861433 44 | 0.2000000 0.0839202 45 | 0.1800000 0.0810687 46 | 0.1600000 0.0775707 47 | 0.1400000 0.0734360 48 | 0.1200000 0.0686204 49 | 0.1000000 0.0629981 50 | 0.0800000 0.0564308 51 | 0.0600000 0.0487571 52 | 0.0500000 0.0442753 53 | 0.0400000 0.0391283 54 | 0.0300000 0.0330215 55 | 0.0200000 0.0253735 56 | 0.0120000 0.0178581 57 | 0.0080000 0.0137350 58 | 0.0040000 0.0089238 59 | 0.0020000 0.0058025 60 | 0.0010000 0.0037271 61 | 0.0005000 0.0023390 62 | 0.0000000 0.0000000 63 | 0.0000000 0.0000000 64 | 0.0005000 -.0046700 65 | 0.0010000 -.0059418 66 | 0.0020000 -.0078113 67 | 0.0040000 -.0105126 68 | 0.0080000 -.0142862 69 | 0.0120000 -.0169733 70 | 0.0200000 -.0202723 71 | 0.0300000 -.0226056 72 | 0.0400000 -.0245211 73 | 0.0500000 -.0260452 74 | 0.0600000 -.0271277 75 | 0.0800000 -.0284595 76 | 0.1000000 -.0293786 77 | 0.1200000 -.0299633 78 | 0.1400000 -.0302404 79 | 0.1600000 -.0302546 80 | 0.1800000 -.0300490 81 | 0.2000000 -.0296656 82 | 0.2200000 -.0291445 83 | 0.2400000 -.0285181 84 | 0.2600000 -.0278164 85 | 0.2800000 -.0270696 86 | 0.3000000 -.0263079 87 | 0.3200000 -.0255565 88 | 0.3400000 -.0248176 89 | 0.3600000 -.0240870 90 | 0.3800000 -.0233606 91 | 0.4000000 -.0226341 92 | 0.4200000 -.0219042 93 | 0.4400000 -.0211708 94 | 0.4600000 -.0204353 95 | 0.4800000 -.0196986 96 | 0.5000000 -.0189619 97 | 0.5200000 -.0182262 98 | 0.5400000 -.0174914 99 | 0.5600000 -.0167572 100 | 0.5800000 -.0160232 101 | 0.6000000 -.0152893 102 | 0.6200000 -.0145551 103 | 0.6400000 -.0138207 104 | 0.6600000 -.0130862 105 | 0.6800000 -.0123515 106 | 0.7000000 -.0116169 107 | 0.7200000 -.0108823 108 | 0.7400000 -.0101478 109 | 0.7600000 -.0094133 110 | 0.7800000 -.0086788 111 | 0.8000000 -.0079443 112 | 0.8200000 -.0072098 113 | 0.8400000 -.0064753 114 | 0.8600000 -.0057408 115 | 0.8800000 -.0050063 116 | 0.9000000 -.0042718 117 | 0.9200000 -.0035373 118 | 0.9400000 -.0028028 119 | 0.9600000 -.0020683 120 | 0.9700000 -.0017011 121 | 0.9800000 -.0013339 122 | 0.9900000 -.0009666 123 | 1.0000000 -.0005993 124 | -------------------------------------------------------------------------------- /testcase/avl_case/ls417.dat: -------------------------------------------------------------------------------- 1 | NASA/LANGLEY LS(1)-0417 (GA(W)-1) AIRFOIL 2 | 1.00000 -.00074 3 | .97500 .00604 4 | .95000 .01287 5 | .92500 .01965 6 | .90000 .02639 7 | .87500 .03313 8 | .85000 .03983 9 | .82500 .04644 10 | .80000 .05291 11 | .77500 .05913 12 | .75000 .06517 13 | .72500 .07096 14 | .70000 .07639 15 | .67500 .08144 16 | .65000 .08604 17 | .62500 .09013 18 | .60000 .09374 19 | .57500 .09674 20 | .55000 .09917 21 | .50000 .10269 22 | .45000 .10456 23 | .40000 .10500 24 | .35000 .10409 25 | .30000 .10169 26 | .25000 .09778 27 | .20000 .09209 28 | .17500 .08848 29 | .15000 .08413 30 | .12500 .07909 31 | .10000 .07309 32 | .07500 .06561 33 | .05000 .05600 34 | .03750 .04974 35 | .02500 .04165 36 | .01250 .03069 37 | .00500 .02035 38 | .00200 .01300 39 | 0.00000 0.00000 40 | .00200 -.00974 41 | .00500 -.01444 42 | .01250 -.02052 43 | .02500 -.02691 44 | .03750 -.03191 45 | .05000 -.03569 46 | .07500 -.04209 47 | .10000 -.04700 48 | .12500 -.05087 49 | .15000 -.05426 50 | .17500 -.05700 51 | .20000 -.05926 52 | .25000 -.06265 53 | .30000 -.06448 54 | .35000 -.06517 55 | .40000 -.06483 56 | .45000 -.06344 57 | .50000 -.06091 58 | .55000 -.05683 59 | .57500 -.05396 60 | .60000 -.05061 61 | .62500 -.04678 62 | .65000 -.04265 63 | .67500 -.03830 64 | .70000 -.03383 65 | .72500 -.02930 66 | .75000 -.02461 67 | .77500 -.02030 68 | .80000 -.01587 69 | .82500 -.01191 70 | .85000 -.00852 71 | .87500 -.00565 72 | .90000 -.00352 73 | .92500 -.00248 74 | .95000 -.00257 75 | .97500 -.00396 76 | 1.00000 -.00783 77 | -------------------------------------------------------------------------------- /testcase/avl_case/test3.avl: -------------------------------------------------------------------------------- 1 | Parafoil 2 | #Mach no 3 | 0.000000 4 | #iYsym iZsym Zsym 5 | 0 0 0.0 6 | #Sref Cref Bref 7 | 9.000000 0.900000 10.000000 8 | #Xref Yref Zref 9 | 0.500000 0.000000 0.000000 10 | 11 | ###################################################################### 12 | # SURFACES 13 | SURFACE 14 | H-stab 15 | # Nchord Cspace [ Nspan Sspace ] 16 | 6 1.0 6 1.000000 17 | YDUPLICATE 18 | 0.0 19 | INDEX 20 | 0 21 | SCALE 22 | 1.0 1.0 1.0 23 | TRANSLATE 24 | 4.0 0.0 0.0 25 | ANGLE 26 | 0.0 27 | SECTION 28 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 29 | 0.000000 0.000000 0.000000 0.700000 0.000000 30 | CLAF 31 | 1.000000 32 | CONTROL 33 | #Cname Cgain Xhinge HingeVec SgnDup 34 | elevator 1.000000 0.700000 0.000000 1.000000 0.000000 1.000000 35 | 36 | SECTION 37 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 38 | 0.140000 1.250000 0.000000 0.420000 0.000000 39 | CLAF 40 | 1.000000 41 | CONTROL 42 | #Cname Cgain Xhinge HingeVec SgnDup 43 | elevator 1.000000 0.700000 0.000000 1.000000 0.000000 1.000000 44 | 45 | 46 | SURFACE 47 | V-stab 48 | # Nchord Cspace [ Nspan Sspace ] 49 | 6 1.0 5 1.000000 50 | INDEX 51 | 0 52 | SCALE 53 | 1.0 1.0 1.0 54 | TRANSLATE 55 | 4.0 0.0 0.0 56 | ANGLE 57 | 0.0 58 | SECTION 59 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 60 | 0.000000 0.000000 0.000000 0.700000 0.000000 61 | CLAF 62 | 1.000000 63 | CONTROL 64 | #Cname Cgain Xhinge HingeVec SgnDup 65 | rudder 1.000000 0.500000 0.000000 0.000000 1.000000 1.000000 66 | 67 | SECTION 68 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 69 | 0.140000 0.000000 1.000000 0.420000 0.000000 70 | CLAF 71 | 1.000000 72 | CONTROL 73 | #Cname Cgain Xhinge HingeVec SgnDup 74 | rudder 1.000000 0.500000 0.000000 0.000000 1.000000 1.000000 75 | 76 | 77 | SURFACE 78 | Parafoil 79 | # Nchord Cspace [ Nspan Sspace ] 80 | 8 1.0 81 | YDUPLICATE 82 | 0.0 83 | INDEX 84 | 0 85 | SCALE 86 | 1.0 1.0 1.0 87 | TRANSLATE 88 | 0.0 0.0 0.0 89 | ANGLE 90 | 0.0 91 | SECTION 92 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 93 | 0.000000 0.226214 -0.004387 3.750000 0.000000 94 | AFILE 95 | clarky.dat 96 | CLAF 97 | 1.000000 98 | 99 | SECTION 100 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 101 | 0.000000 0.677282 -0.039447 3.750000 0.000000 102 | AFILE 103 | clarky.dat 104 | CLAF 105 | 1.000000 106 | 107 | SECTION 108 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 109 | 0.000000 1.124276 -0.109356 3.750000 0.000000 110 | AFILE 111 | clarky.dat 112 | CLAF 113 | 1.000000 114 | 115 | SECTION 116 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 117 | 0.000000 1.564509 -0.213693 3.750000 0.000000 118 | AFILE 119 | clarky.dat 120 | CLAF 121 | 1.000000 122 | 123 | SECTION 124 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 125 | 0.000000 1.995333 -0.351831 3.750000 0.000000 126 | AFILE 127 | clarky.dat 128 | CLAF 129 | 1.000000 130 | 131 | 132 | # END SURFACES 133 | 134 | # BODIES 135 | # END BODIES 136 | 137 | -------------------------------------------------------------------------------- /testcase/avl_case/testcase.avl: -------------------------------------------------------------------------------- 1 | Parafoil 2 | #Mach 3 | 0.0 4 | #IYsym IZsym Zsym 5 | 0 0 0.0 6 | #Sref Cref Bref 7 | 28.125 3.75 7.5 8 | #Xref Yref Zref 9 | 1.875 0.0 0.0 10 | SURFACE 11 | Parafoil 12 | # Nchord Cspace [ Nspan Sspace ] 13 | 8 1.000000 14 | YDUPLICATE 15 | 0.0 16 | INDEX 17 | 0 18 | SCALE 19 | 1.0 1.0 1.0 20 | TRANSLATE 21 | 0.0 0.0 0.0 22 | ANGLE 23 | 1.0 24 | SECTION 25 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 26 | 0.000000 0.226214 -0.004387 3.750000 0.000000 27 | AFILE 28 | clarky.dat 29 | CLAF 30 | 1.000000 31 | 32 | SECTION 33 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 34 | 0.000000 0.677282 -0.039447 3.750000 0.000000 35 | AFILE 36 | clarky.dat 37 | CLAF 38 | 1.000000 39 | 40 | SECTION 41 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 42 | 0.000000 1.124276 -0.109356 3.750000 0.000000 43 | AFILE 44 | clarky.dat 45 | CLAF 46 | 1.000000 47 | 48 | SECTION 49 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 50 | 0.000000 1.564509 -0.213693 3.750000 0.000000 51 | AFILE 52 | clarky.dat 53 | CLAF 54 | 1.000000 55 | 56 | SECTION 57 | #Xle Yle Zle Chord Ainc [ Nspan Sspace ] 58 | 0.000000 1.995333 -0.351831 3.750000 0.000000 59 | AFILE 60 | clarky.dat 61 | CLAF 62 | 1.000000 63 | 64 | 65 | -------------------------------------------------------------------------------- /testcase/avl_case/testflatplate.avl: -------------------------------------------------------------------------------- 1 | Flatplate 2 | !Mach 3 | 0.0 4 | !IYsym IZsym Zsym 5 | 1 0 0.0 6 | !Sref Cref Bref 7 | 2 0.5 4 8 | !Xref Yref Zref 9 | 0.25 0.0 0.0 10 | ! 11 | SURFACE 12 | WING 13 | !Nchordwise Space 14 | 8 1.0 15 | YDUPLICATE 16 | 0 17 | 18 | SECTION 19 | !Xle Yle Zle Chord Ainc Nspanwise Space 20 | 0.000 0.000 0.000 0.5 1. 10 1.0 21 | NACA 22 | 0012 23 | SECTION 24 | !Xle Yle Zle Chord Ainc Nspanwise Space 25 | 0.000 2.00 0.000 0.5 1. 10 1.0 26 | NACA 27 | 0012 28 | 29 | -------------------------------------------------------------------------------- /testcase/extras/clarky.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajp/pyavl/714c2273a87c6040b76e876a018093b4b570af5d/testcase/extras/clarky.gif -------------------------------------------------------------------------------- /testcase/extras/ls417.dat: -------------------------------------------------------------------------------- 1 | NASA/LANGLEY LS(1)-0417 (GA(W)-1) AIRFOIL 2 | 38. 38. 3 | 4 | 0.00000 0.00000 5 | .00200 .01300 6 | .00500 .02035 7 | .01250 .03069 8 | .02500 .04165 9 | .03750 .04974 10 | .05000 .05600 11 | .07500 .06561 12 | .10000 .07309 13 | .12500 .07909 14 | .15000 .08413 15 | .17500 .08848 16 | .20000 .09209 17 | .25000 .09778 18 | .30000 .10169 19 | .35000 .10409 20 | .40000 .10500 21 | .45000 .10456 22 | .50000 .10269 23 | .55000 .09917 24 | .57500 .09674 25 | .60000 .09374 26 | .62500 .09013 27 | .65000 .08604 28 | .67500 .08144 29 | .70000 .07639 30 | .72500 .07096 31 | .75000 .06517 32 | .77500 .05913 33 | .80000 .05291 34 | .82500 .04644 35 | .85000 .03983 36 | .87500 .03313 37 | .90000 .02639 38 | .92500 .01965 39 | .95000 .01287 40 | .97500 .00604 41 | 1.00000 -.00074 42 | 43 | 0.00000 0.00000 44 | .00200 -.00974 45 | .00500 -.01444 46 | .01250 -.02052 47 | .02500 -.02691 48 | .03750 -.03191 49 | .05000 -.03569 50 | .07500 -.04209 51 | .10000 -.04700 52 | .12500 -.05087 53 | .15000 -.05426 54 | .17500 -.05700 55 | .20000 -.05926 56 | .25000 -.06265 57 | .30000 -.06448 58 | .35000 -.06517 59 | .40000 -.06483 60 | .45000 -.06344 61 | .50000 -.06091 62 | .55000 -.05683 63 | .57500 -.05396 64 | .60000 -.05061 65 | .62500 -.04678 66 | .65000 -.04265 67 | .67500 -.03830 68 | .70000 -.03383 69 | .72500 -.02930 70 | .75000 -.02461 71 | .77500 -.02030 72 | .80000 -.01587 73 | .82500 -.01191 74 | .85000 -.00852 75 | .87500 -.00565 76 | .90000 -.00352 77 | .92500 -.00248 78 | .95000 -.00257 79 | .97500 -.00396 80 | 1.00000 -.00783 81 | -------------------------------------------------------------------------------- /testcase/extras/ls417.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pankajp/pyavl/714c2273a87c6040b76e876a018093b4b570af5d/testcase/extras/ls417.gif --------------------------------------------------------------------------------