Beispiel #1
0
def run_pullout_multilinear(*args, **kw):
    po = PullOutModel(name='t33_pullout_multilinear',
                      title='Multi-linear bond slip law',
                      n_e_x=20,
                      k_max=1000,
                      w_max=1.5)
    po.tline.step = 0.05
    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, 1.7', tau_data='0, 70, 0, 0')
    po.mats_eval.update_bs_law = True

    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.viz_sheet.viz2d_dict['u_C'].visible = False
    w.viz_sheet.viz2d_dict['load-time'].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 = True
    w.configure_traits(*args, **kw)
Beispiel #2
0
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)
Beispiel #3
0
def run_uniaxial_elastic():

    bt = UniaxialTestModel(
        n_e_x=2,
        n_e_y=1,
        k_max=300,
        #mats_eval_type='scalar damage'
        #mats_eval_type='microplane damage (eeq)'
        mats_eval_type='microplane CSD (eeq)'
        #mats_eval_type='microplane CSD (odf)'
    )
    L = 2.
    L_c = L / 10.0
    E = 20000.0
    #f_t = 2.4
    #G_f = 0.09
    bt.mats_eval.trait_set(
        # stiffness='algorithmic',
        E=E,
        nu=0.2)
    #     f_t_Em = np.ones_like(bt.dots_grid.state_arrays['omega']) * 10.0
    #     l_f_t_Em = len(f_t_Em)
    #     f_t_Em[0, ...] = 1.0
    #     bt.mats_eval.omega_fn.trait_set(
    #         E=E,
    #         f_t=f_t,
    #         f_t_Em=f_t_Em,
    #         G_f=G_f,
    #         L_s=L_c
    #     )

    bt.w_max = 0.001
    bt.tline.step = 0.01
    bt.cross_section.b = 1
    bt.geometry.trait_set(L=L, H=1, L_c=L_c)
    bt.loading_scenario.trait_set(loading_type='monotonic')
    w = BMCSWindow(model=bt)
    #bt.add_viz2d('load function', 'load-time')
    bt.add_viz2d('F-w', 'load-displacement')

    vis2d_energy = Vis2DEnergy(model=bt)
    viz2d_energy = Viz2DEnergy(name='dissipation', vis2d=vis2d_energy)
    viz2d_energy_rates = Viz2DEnergyRatesPlot(name='dissipation rate',
                                              vis2d=vis2d_energy)
    vis2d_crack_band = Vis2DCrackBand(model=bt)
    w.viz_sheet.viz2d_list.append(viz2d_energy)
    w.viz_sheet.viz2d_list.append(viz2d_energy_rates)

    vis3d = Vis3DStressField()
    bt.tloop.response_traces.append(vis3d)
    bt.tloop.response_traces.append(vis2d_energy)
    # bt.tloop.response_traces.append(vis2d_crack_band)
    viz3d = Viz3DStressField(vis3d=vis3d)
    w.viz_sheet.add_viz3d(viz3d)
    w.viz_sheet.monitor_chunk_size = 1

    w.run()
    w.offline = True
    #    w.finish_event = True
    w.configure_traits()
def run_bending3pt_mic_odf(*args, **kw):

    bt = BendingTestModel(
        n_e_x=1,
        n_e_y=1,
        n_e_z=1,
        k_max=500,
        mats_eval_type='microplane damage (eeq)'
        #mats_eval_type='microplane damage (eeq)'
        #mats_eval_type='microplane damage (odf)'
        # mats_eval_type='elastic'
    )
    E_c = 28000  # MPa
    f_ct = 3.0  # MPa
    epsilon_0 = f_ct / E_c  # [-]

    print(bt.mats_eval_type)
    bt.mats_eval.trait_set(
        # stiffness='algorithmic',
        epsilon_0=epsilon_0,
        epsilon_f=epsilon_0 * 10)

    bt.w_max = 0.001
    bt.tline.step = 0.005
    bt.cross_section.h = 1
    bt.geometry.L = 1
    bt.loading_scenario.trait_set(loading_type='monotonic')

    bt.record = {
        #       'Pw': Vis2DFW(bc_right=right_x_s, bc_left=left_x_s),
        #       'slip': Vis2DField(var='slip'),
        'strain': Vis3DTensorField(var='eps_ab'),
        'stress': Vis3DTensorField(var='sig_ab'),
        'damage': Vis3DTensorField(var='phi_ab'),
    }

    w = BMCSWindow(sim=bt)
    #    bt.add_viz2d('load function', 'load-time')
    #    bt.add_viz2d('F-w', 'load-displacement')

    viz_stress = Viz3DTensorField(vis3d=bt.hist['strain'])
    viz_strain = Viz3DTensorField(vis3d=bt.hist['stress'])
    viz_damage = Viz3DTensorField(vis3d=bt.hist['damage'])

    w.viz_sheet.add_viz3d(viz_stress)
    w.viz_sheet.add_viz3d(viz_strain)
    w.viz_sheet.add_viz3d(viz_damage)
    w.viz_sheet.monitor_chunk_size = 1

    w.run()
    time.sleep(10)
    w.offline = False
    #    w.finish_event = True
    w.configure_traits()
Beispiel #5
0
def run_pullout_const_shear(*args, **kw):
    po = PullOutModel(name='t32_analytical_pullout')
    po.geometry.trait_set(L_x=800)
    #     po.cross_section.trait_set(A_f=4.5, P_b=1.0)
    #     po.material.trait_set(E_f=9 * 180000.0, tau_pi_bar=2.77 * 9)
    po.tline.step = 0.01

    w = BMCSWindow(sim=po)
    # po.add_viz2d('load function')
    po.add_viz2d('F-w', 'load-displacement')
    po.add_viz2d('field', 'shear flow', plot_fn='sf')
    po.add_viz2d('field', 'displacement', plot_fn='u')
    po.add_viz2d('field', 'strain', plot_fn='eps')
    #    po.add_viz2d('field', 'sig', plot_fn='sig')
    w.viz_sheet.monitor_chunk_size = 2

    w.run()
    w.offline = False
    w.configure_traits(*args, **kw)
Beispiel #6
0
    ll, lr = 0, 0

    cbcb = ConstantBondCB(n_z=1000)
    cbcb1 = ConstantBondCB(n_z=1000)

    viz2d_sig_eps = Viz2DFieldVar(name='stress-strain',
                                  vis2d=cbcb)

    w = BMCSWindow(model=cbcb)

    w.viz_sheet.viz2d_list.append(viz2d_sig_eps)
    w.viz_sheet.n_cols = 1
    w.viz_sheet.monitor_chunk_size = 1

    w.run()
    w.offline = False
    w.configure_traits()

    if False:
        #     cbcb.configure_traits()
        x = np.linspace(0, 1000, 10001)
        sig = cbcb.get_sig_m_z(x, ll, lr, cbcb.sig_cu / 4)
        eps = cbcb.get_eps_f_z(x, ll, lr, cbcb.sig_cu / 4)

        sig1 = cbcb1.get_sig_m_z(x, ll, lr, cbcb.sig_cu / 4)
        eps1 = cbcb1.get_eps_f_z(x, ll, lr, cbcb.sig_cu / 4)

        print((sig == sig1))

        plt.plot(x, sig - sig1)
Beispiel #7
0
    w.viz_sheet.viz2d_list.append(viz2d_energy_rates)
    w.viz_sheet.monitor_chunk_size = 1

    L_c_list = [0.1]
    G_f_list = [0.1, 0.2]
    n_e_x_li = [15, 20, 25]
    colors = ['blue', 'green', 'orange', 'yellow', 'black']
    bt.mats_eval.omega_fn.trait_set(L_s=L_c_list[0])
    ax1 = plt.subplot(211)
    ax2 = plt.subplot(212)
    for L_c in L_c_list:
        for G_f_i in G_f_list:
            c = colors.pop()
            #    for n_e_x, c in zip(n_e_x_li, colors):
            bt.trait_set(n_e_x=20)
            bt.geometry.trait_set(L_c=L_c)
            bt.mats_eval.omega_fn.trait_set(G_f=G_f_i, L_s=L_c)
            w.run()
            w.offline = True
            w.finish_event = True
            w.join()
            viz2d_Fw.plot(ax1,
                          1,
                          color=c,
                          label='L_c_x=%g, G_f=%g' % (L_c, G_f_i))
            viz2d_energy_rates.plot(ax2,
                                    1,
                                    color=c,
                                    label='L_c_x=%g, G_f=%g' % (L_c, G_f_i))
    plt.show()