def run_pullout_multi(*args, **kw): po = PullOutModel(name='t33_pullout_multilinear', n_e_x=100, k_max=1000, u_f0_max=2.0) po.tline.step = 0.02 po.geometry.L_x = 200.0 po.loading_scenario.set(loading_type='monotonic') po.cross_section.set(A_f=16.67 / 9.0, P_b=1.0, A_m=1540.0) po.mats_eval.set(s_data='0, 0.1, 0.4, 4.0', tau_data='0, 70.0, 0, 0') po.mats_eval.update_bs_law = True po.run() w = BMCSWindow(model=po) # po.add_viz2d('load function', 'load-time') po.add_viz2d('F-w', 'load-displacement') po.add_viz2d('field', 'u_C', plot_fn='u_C') # po.add_viz2d('dissipation', 'dissipation') po.add_viz2d('field', 'eps_C', plot_fn='eps_C') po.add_viz2d('field', 's', plot_fn='s') po.add_viz2d('field', 'sig_C', plot_fn='sig_C') po.add_viz2d('field', 'sf', plot_fn='sf') # po.add_viz2d('dissipation rate', 'dissipation rate') w.offline = False w.finish_event = True w.configure_traits(*args, **kw)
def run_pullout_dp(*args, **kw): po = PullOutModel(n_e_x=100, k_max=500, w_max=1.5) po.tline.step = 0.01 po.geometry.L_x = 200.0 po.loading_scenario.trait_set(loading_type='monotonic') po.cross_section.trait_set(A_f=16.67, P_b=1.0, A_m=1540.0) po.trait_set(mats_eval_type='damage-plasticity') po.mats_eval.trait_set(gamma=0.0, K=15.0, tau_bar=45.0) po.mats_eval.trait_set(omega_fn_type='li') po.mats_eval.omega_fn.trait_set(alpha_2=1.0, plot_max=10.0) w = BMCSWindow(model=po) po.add_viz2d('load function', 'load-time') po.add_viz2d('F-w', 'load-displacement') po.add_viz2d('field', 'u_C', plot_fn='u_C') po.add_viz2d('field', 'omega', plot_fn='omega') po.add_viz2d('field', 'eps_C', plot_fn='eps_C') po.add_viz2d('field', 's', plot_fn='s') po.add_viz2d('field', 'sig_C', plot_fn='sig_C') po.add_viz2d('field', 'sf', plot_fn='sf') po.add_viz2d('dissipation', 'dissipation') po.add_viz2d('dissipation rate', 'dissipation rate') w.viz_sheet.viz2d_dict['u_C'].visible = False w.viz_sheet.viz2d_dict['load-time'].visible = False w.viz_sheet.viz2d_dict['load-displacement'].visible = False w.viz_sheet.viz2d_dict['dissipation rate'].visible = False w.viz_sheet.monitor_chunk_size = 10 w.viz_sheet.reference_viz2d_name = 'load-displacement' w.run() w.offline = False w.finish_event = True w.configure_traits(*args, **kw)
def run_po_paper2_4layers(*args, **kw): A_roving = 0.49 h_section = 20.0 b_section = 100.0 n_roving = 11.0 tt4_n_layers = 6 A_f4 = n_roving * tt4_n_layers * A_roving A_c4 = h_section * b_section A_m4 = A_c4 - A_f4 P_b4 = tt4_n_layers E_f = 180000.0 E_m = 30000.0 s_arr = np.array([ 0., 0.004, 0.0063, 0.0165, 0.0266, 0.0367, 0.0468, 0.057, 0.0671, 0.3, 1.0 ], dtype=np.float_) tau_arr = 0.7 * np.array([ 0., 40, 62.763, 79.7754, 63.3328, 53.0229, 42.1918, 28.6376, 17, 3, 1 ], dtype=np.float) po = PullOutModel(name='t33_pullout_multilinear', n_e_x=100, k_max=1000, w_max=2.0) po.fixed_boundary = 'clamped left' po.loading_scenario.set(loading_type='monotonic') po.mats_eval.trait_set(E_f=E_f, E_m=E_m) po.mats_eval.s_tau_table = [s_arr, tau_arr] po.cross_section.trait_set(A_f=A_f4, A_m=A_m4, P_b=P_b4) po.geometry.trait_set(L_x=500) po.trait_set(w_max=0.95, n_e_x=100) po.tline.trait_set(step=0.005) po.run() w = BMCSWindow(model=po) po.add_viz2d('load function', 'load-time') po.add_viz2d('F-w', 'load-displacement') po.add_viz2d('field', 'u_C', plot_fn='u_C') po.add_viz2d('dissipation', 'dissipation') po.add_viz2d('field', 'eps_C', plot_fn='eps_C') po.add_viz2d('field', 's', plot_fn='s') po.add_viz2d('field', 'sig_C', plot_fn='sig_C') po.add_viz2d('field', 'sf', plot_fn='sf') po.add_viz2d('dissipation rate', 'dissipation rate') w.offline = False w.finish_event = True w.configure_traits(*args, **kw)
def run_pullout_multilinear(): po = PullOutModel(n_e_x=8, k_max=500) po.w_max = 20.0 A_f = 16.44 po.cross_section.A_f = A_f r = np.sqrt(A_f / np.pi) po.cross_section.P_b = 2 * r * np.pi po.mats_eval_type = 'multilinear' po.tline.step = 0.01 po.geometry.L_x = 1.0 po.loading_scenario.set(loading_type='monotonic') # todo po.material.set(s_data='0, 1.0, 5.0, 10.0, 20.0', tau_data='0, 14.0, 16.5, 15.0, 7.0') po.material.update_bs_law = True Pu = po.rt_Pu w = BMCSWindow(model=po) Pu.add_viz2d('diagram') po.add_viz2d('field', 'u_C', plot_fn='u_C') w.offline = False w.finish_event = True w.configure_traits()
@cached_property def _get_tloop(self): return TimeLoop(tline=self.tline) def eval(self): self.tloop.eval() rt = Instance(ResponseTracer, ()) bc_dof = Instance(BCDof) def _bc_dof_default(self): return BCDof(time_function=TFunPWLInteractive()) tree_view = View( VGroup( Include('actions'), UItem('bc_dof@', height=500) ) ) if __name__ == '__main__': model = DemoModel() model.run() tv = BMCSWindow(model=model) model.rt.add_viz2d('time_profile', 'response tracer #1') tv.finish_event = True tv.configure_traits()