if not root_joint_flag:
        infiledir = './DYMORE/input_files/'
        if os.path.exists(infiledir + 'AB_root_props.dat'):
            os.remove(basefilestr + 'AB_root_props.dat')
        if os.path.exists(infiledir + 'BC_rootTrans_upper_props.dat'):
            os.remove(basefilestr + 'BC_rootTrans_upper_props.dat')
        if os.path.exists(infiledir + 'BG_rootTrans_lower_props.dat'):
            os.remove(basefilestr + 'BG_rootTrans_lower_props.dat')

    if root_joint_flag:
        ### ROOT REGION (AB) ###########################################################################################

        # parameters ------------------------------------------------------------------------------------
        layup_file_data         = rl.readLayupFile('truegrid/monoplane_spar_layup.txt')
        spar_stn_list           = [1, 2]               # generate a DYMORE code block for these spar stations
        biplane_flag_list       = [False, False]
        beam_property_name      = 'propAB'
        BPD_comments            = 'beam properties for spar stations ' + str(spar_stn_list[0]) + '-' + str(spar_stn_list[-1])
        dymore_MKblock_filename = './DYMORE/input_files/AB_root_props.dat'  # save DYMORE code block to this filename
        # -----------------------------------------------------------------------------------------------

        print '\n****************', dymore_MKblock_filename, '****************'
        writeBeamPropertyDefinition(dymore_MKblock_filename, spar_stn_list, biplane_flag_list, layup_file_data, beam_property_name, property_definition_type, coordinate_type, BPD_comments, read_layup_eta=False, print_flag=True)


        ### ROOT TRANSITION REGION, UPPER (BC) #########################################################################

        # parameters ------------------------------------------------------------------------------------
        layup_file_data         = rl.readLayupFile('truegrid/biplane_cross-sections_layup_20120517_full-hSW.txt')
Example #2
0
start_time = time.time()

import os

main_debug_flag = False
runVABS_flag = True
delete_old_VABS_files = True

import truegrid.read_layup as rl

print "Please type the layup file path."
print "  For example: truegrid/monoplane_spar_layup.txt"
print "  *** the layup file must be the same file used by TrueGrid! ***"
layupfile = raw_input("  layup file path = ")
print "Using layup file:", layupfile
data = rl.readLayupFile(layupfile)

spar_stn_list = [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
import DYMOREutilities as du
import os
os.chdir('..')
import truegrid.read_layup as rl
os.chdir('DYMORE')

# parameters #####################################################################
spar_station = 16
dymoreMKfile = du.makeFile('spar_station_16__k2_0020_MK.dat')
vabsMK = '../VABS/cs_database/biplane_full-hSW_curved/spar_station_16__k2_0020.dat.K'
##################################################################################


# write the mass and stiffness matrices as a DYMORE-formatted file
layup_data = rl.readLayupFile('../truegrid/biplane_cross-sections_layup_20120517_full-hSW.txt')
stationData = rl.extractStationData(layup_data,spar_station)
du.writeMKmatrices(dymoreMKfile, vabsMK, stationData, CoordType='ETA_COORDINATE', debug_flag=True)
dymoreMKfile.close()