def test_fsi(self): bdf_filename = os.path.join(model_path, "fsi", "fsi.bdf") op2_filename = os.path.join(model_path, "fsi", "fsi.op2") test = NastranIO() test.is_nodal = False test.is_centroidal = True add_dummy_gui_functions(test) test.load_nastran_geometry(bdf_filename, None) test.load_nastran_results(op2_filename, None)
def test_solid_shell_bar_03(self): bdf_filename = os.path.join(model_path, "sol_101_elements", "static_solid_comp_bar.bdf") op2_filename = os.path.join(model_path, "sol_101_elements", "static_solid_comp_bar.op2") test = NastranIO() test.is_nodal = False test.is_centroidal = True add_dummy_gui_functions(test) test.load_nastran_geometry(bdf_filename, None) test.load_nastran_results(op2_filename, None)
def test_bottle(): """ Tests Nastran GUI loading """ test = NastranIO() add_dummy_gui_functions(test) #test.load_panair_geometry('SWB.INP','') test.load_nastran_geometry('bottle_shell_w_holes_pmc.bdf', '') test.load_nastran_results('bottle_shell_w_holes_pmc.op2', '') keys = test.result_cases.keys() assert (1, 'Stress1', 1, 'centroid', '%.3f') in keys, keys
def test_bottle(): """ Tests Nastran GUI loading """ test = NastranIO() test.is_nodal = False test.is_centroidal = True add_dummy_gui_functions(test) # test.load_panair_geometry('SWB.INP','') test.load_nastran_geometry("bottle_shell_w_holes_pmc.bdf", "") test.load_nastran_results("bottle_shell_w_holes_pmc.op2", "") keys = test.resultCases.keys() assert (1, "Stress1", 1, "centroid", "%.3f") in keys, keys
def test_beam_modes_02(self): dirname = bdf_filename = os.path.join(model_path, "beam_modes") bdf_filename = os.path.join(dirname, "beam_modes.dat") op2_filename = os.path.join(dirname, "beam_modes_m2.op2") test = NastranIO() test.is_nodal = False test.is_centroidal = True add_dummy_gui_functions(test) test.load_nastran_geometry(bdf_filename, None) test.load_nastran_results(op2_filename, None) test.load_nastran_geometry(bdf_filename, dirname) test.load_nastran_results(op2_filename, dirname) with self.assertRaises(IOError): test.load_nastran_geometry(bdf_filename, "")