#NEWLINE# def generate_input( self ) : #NEWLINE# #INDENT# 'Creates the PDCYL custom input file.' #NEWLINE# data = [ ] #NEWLINE# form = '%.15g %s\n' #NEWLINE# data . append ( '\n\n' ) #NEWLINE# data . append ( self . title ) #NEWLINE# data . append ( '\n\n' ) #NEWLINE# if ( self . icalc == True ) : #NEWLINE# #INDENT# icalc = 3 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# icalc = 0 #NEWLINE# #UNINDENT# data . append ( ( '%d icalc print switch' % icalc ) ) #NEWLINE# data . append ( '\n\n\n' ) #NEWLINE# data . append ( 'Wing geometry:\n' ) #NEWLINE# for nline in range ( 8 , 14 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( 'Material properties:\n' ) #NEWLINE# for nline in range ( 15 , 24 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( 'Geometric properties:\n' ) #NEWLINE# name = self . _fields [ 25 ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# data . append ( '\n' ) #NEWLINE# for nline in range ( 27 , 31 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( 'Structural concept:\n' ) #NEWLINE# for nline in range ( 32 , 34 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n' ) #NEWLINE# for nline in range ( 35 , 37 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n' ) #NEWLINE# data . append ( 'Tails:\n' ) #NEWLINE# name = self . _fields [ 40 ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# data . append ( '\n' ) #NEWLINE# for nline in range ( 42 , 45 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n\n' ) #NEWLINE# data . append ( 'Fuselage geometry:\n' ) #NEWLINE# for nline in range ( 49 , 53 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( 'Structural concept:\n' ) #NEWLINE# for nline in range ( 54 , 60 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n\n\n\n\n' ) #NEWLINE# data . append ( 'Material properties:\n' ) #NEWLINE# for nline in range ( 67 , 83 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( 'Geometric parameters:\n' ) #NEWLINE# for nline in range ( 84 , 86 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n\n' ) #NEWLINE# data . append ( 'Engines:\n' ) #NEWLINE# for nline in range ( 90 , 94 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n' ) #NEWLINE# for nline in range ( 95 , 97 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n' ) #NEWLINE# data . append ( 'Loads:\n' ) #NEWLINE# for nline in range ( 100 , 105 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n' ) #NEWLINE# for nline in range ( 107 , 111 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n' ) #NEWLINE# data . append ( 'Landing gear:\n' ) #NEWLINE# for nline in range ( 114 , 121 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n' ) #NEWLINE# for nline in range ( 122 , 125 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n\n' ) #NEWLINE# data . append ( 'Weights:\n' ) #NEWLINE# for nline in range ( 129 , 133 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# data . append ( '\n\n' ) #NEWLINE# data . append ( 'Factors:\n' ) #NEWLINE# name = self . _fields [ 136 ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# data . append ( '\n' ) #NEWLINE# name = self . _fields [ 138 ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# data . append ( '\n' ) #NEWLINE# for nline in range ( 140 , 147 ) : #NEWLINE# #INDENT# name = self . _fields [ nline ] #NEWLINE# data . append ( ( form % ( self . get ( name ) , name ) ) ) #NEWLINE# #UNINDENT# outfile = open ( self . stdin , 'w' ) #NEWLINE# outfile . writelines ( data ) #NEWLINE# outfile . close ( )