print 'pickle file saved to file: %s' % file_name file.close() sim_model.f_w_diagram_supprt.trace.mpl_plot(p, color='blue') #-------------------- # experiments #-------------------- if test_series == 'ST-12c': # ST-12c-6cm-TU # ex_path = join(simdb.exdata_dir, 'slab_tests', '2011-12-15_ST-12c-6cm-u-TU', 'ST-12c-6cm-u-TU.DAT') ex_run = ExRun(ex_path) ex_run.ex_type._plot_force_center_deflection_interpolated(p) format_plot(p, xlim=35, ylim=70, xlabel='displacement [mm]', ylabel='force [kN]') if test_series == 'ST-10g': # ST-10a # ex_path_TRC10 = join(simdb.exdata_dir, 'slab_tests', '2010-03-08_ST-10g-3cm-a-FR_TRC10', 'ST-10g-3cm-a-FR-TRC10.DAT') ex_path_TRC11 = join(simdb.exdata_dir, 'slab_tests', '2010-03-09_ST-10g-3cm-a-FR_TRC11', 'ST-10g-3cm-a-FR-TRC11.DAT') ex_path_TRC12 = join(simdb.exdata_dir, 'slab_tests', '2010-03-10_ST-10g-3cm-a-FR_TRC12', 'ST-10g-3cm-a-FR-TRC12.DAT') tests = [ex_path_TRC10, ex_path_TRC11, ex_path_TRC12] for ex_path in tests: ex_run = ExRun(ex_path) ex_run.ex_type._plot_force_center_deflection_interpolated(p) format_plot(p, xlim=35, ylim=70, xlabel='displacement [mm]', ylabel='force [kN]') if test_series == 'ST-6c':
'BT-3PT-12c-6cm-0-Tu-V1.raw') ex_path_V2 = os.path.join(simdb.exdata_dir, 'bending_tests', 'three_point', '2011-06-10_BT-3PT-12c-6cm-0-TU_ZiE', 'BT-3PT-12c-6cm-0-Tu-V2.raw') ex_path_V3 = os.path.join(simdb.exdata_dir, 'bending_tests', 'three_point', '2011-06-10_BT-3PT-12c-6cm-0-TU_ZiE', 'BT-3PT-12c-6cm-0-Tu-V3.raw') ex_path_V4 = os.path.join(simdb.exdata_dir, 'bending_tests', 'three_point', '2011-06-10_BT-3PT-12c-6cm-0-TU_ZiE', 'BT-3PT-12c-6cm-0-Tu-V4.raw') tests = [ex_path_V1, ex_path_V2, ex_path_V3, ex_path_V4] for ex_path in tests: ex_run = ExRun(ex_path) # ex_run.ex_type._plot_force_machine_displacement_wo_elast_interpolated(p, color='black') ex_run.ex_type._plot_force_machine_displacement_wo_elast_analytical_offset(p, color='black') # format plot font as time new roman within the predefined limits # format_plot(p, xlim=25, ylim=14, xlabel='displacement [mm]', ylabel='force [kN]') if test_series == 'BT-6c': ex_path_V2 = os.path.join(simdb.exdata_dir, 'bending_tests', 'three_point', '2013-07-02_BT-6c-2cm-0-TU_bs4', 'BT-6c-2cm-0-TU-V2_bs4.DAT') ex_path_V3 = os.path.join(simdb.exdata_dir, 'bending_tests', 'three_point', '2013-07-02_BT-6c-2cm-0-TU_bs4', 'BT-6c-2cm-0-TU-V3_bs4.DAT') # ex_path_V1 = join(simdb.exdata_dir, 'bending_tests', 'three_point', '2013-07-18_BT-6c-2cm-0-TU_bs5', # 'BT-6c-2cm-0-TU-V1_bs5.DAT') # ex_path_V2 = join(simdb.exdata_dir, 'bending_tests', 'three_point', '2013-07-18_BT-6c-2cm-0-TU_bs5', # 'BT-6c-2cm-0-TU-V2_bs5.DAT') # ex_path_V3 = join(simdb.exdata_dir, 'bending_tests', 'three_point', '2013-07-18_BT-6c-2cm-0-TU_bs5', # 'BT-6c-2cm-0-TU-V3_bs5.DAT') tests = [ ex_path_V2, ex_path_V3 ] for ex_path in tests:
# ex_run.ex_type._plot_force_deflection_thirdpoints( p ) # continuous fabrication with pause # # path = join(simdb.exdata_dir, 'bending_tests', 'four_point', '2012-04-03_BT-4PT-12c-6cm-0-TU', 'BT-4PT-12c-6cm-SH4FF') # tests = [ 'BT-4PT-12c-6cm-SH4FF-V1.DAT', 'BT-4PT-12c-6cm-SH4FF-V2.DAT' ] # for t in tests: # ex_path = join(path, t) # ex_run = ExRun(ex_path) # ex_run.ex_type._plot_force_deflection_center(p) #---------------------------------------------------------------------- # plot sim curve as time new roman within the predefined limits #---------------------------------------------------------------------- # format_plot(p, xlim=55, ylim=14, xlabel='displacement [mm]', ylabel='force [kN]') png_file_path = join(png_path, param_key + '.png') p.title(param_key, fontsize=8) p.savefig(png_file_path, dpi=300.) print 'png-file saved to file: %s' % png_file_path p.show() app.main() #------------------------------ # show last results #------------------------------ if do == 'show_last_results': from matresdev.db.exdb.ex_run import ExRun
p.plot([0.38], [1.26], 'kD', label='mean values') p.legend(loc=4, frameon=True, numpoints=1, markerscale=1.1) # ranges and labels # # xlim = 0.4 # ylim = 50 p.axis([-0.01, 0.4, 50.8, 0]) p.xticks([0, 0.1, 0.2, 0.3, 0.4]) p.yticks([0, 10, 20, 30, 40, 50]) xlabel = 'bending moment $M$ [kNm]' ylabel = 'normal force $N$ [kN]' format_plot(p, fontsize=fontsize, xformat="%.2f", xlabel=xlabel, ylabel=ylabel) # , xlim=xlim, ylim=ylim) ax = p.gca() ax.xaxis.grid(True, which='major') ax.yaxis.grid(True, which='major') save_fig_to_file = True test_series_name = 'BTT-6c_NXM2' if save_fig_to_file: img_dir = os.path.join(simdb.exdata_dir, 'img_dir') # check if directory exist otherwise create # if os.path.isdir(img_dir) == False: os.makedirs(img_dir) test_series_dir = os.path.join(img_dir, test_series_name)
p.legend(loc=4, frameon=True, numpoints=1, markerscale=1.1) # ranges and labels # # xlim = 0.4 # ylim = 50 p.axis([-0.01, 0.4, 50.8, 0]) p.xticks([0, 0.1, 0.2, 0.3, 0.4]) p.yticks([0, 10, 20, 30, 40, 50]) xlabel = 'bending moment $M$ [kNm]' ylabel = 'normal force $N$ [kN]' format_plot(p, fontsize=fontsize, xformat="%.2f", xlabel=xlabel, ylabel=ylabel) # , xlim=xlim, ylim=ylim) ax = p.gca() ax.xaxis.grid(True, which='major') ax.yaxis.grid(True, which='major') save_fig_to_file = True test_series_name = 'BTT-6c_NXM2' if save_fig_to_file: img_dir = os.path.join(simdb.exdata_dir, 'img_dir') # check if directory exist otherwise create # if os.path.isdir(img_dir) == False: os.makedirs(img_dir)