示例#1
0
 def _get_bc_y_0(self):
     return BCSlice(slice=self.xd_steel.mesh[:, -1, :, -1],
                    var='u',
                    dims=[1],
                    value=0)
示例#2
0
 def _get_right_x_c(self):
     return BCSlice(slice=self.xd_concrete.mesh[0, :, 0, :],
                    var='u',
                    dims=[0],
                    value=0)
示例#3
0
 def _get_left_x_s(self):
     return BCSlice(slice=self.xd_steel.mesh[0, :, 0, :],
                    var='f',
                    dims=[0],
                    value=0)
示例#4
0
from .mlab_decorators import decorate_figure

thickness = 1

xdomain = XDomainFEGrid(coord_max=(1, 1),
                        shape=(1, 1),
                        integ_factor=thickness,
                        fets=FETS2D4Q())

# print(xdomain.B1_Eimabc.shape)
# print(xdomain.B0_Eimabc.shape)

m = MATS3DDesmorat()
m = MATS2DElastic(E=1, nu=0)

left_y = BCSlice(slice=xdomain.mesh[0, :, 0, :], var='u', dims=[1], value=0)
left_x = BCSlice(slice=xdomain.mesh[0, :, 0, :], var='u', dims=[0], value=-1)
right_x = BCSlice(slice=xdomain.mesh[-1, :, -1, :],
                  var='u',
                  dims=[0],
                  value=0.0)

m = TStepBC(
    domains=[(xdomain, m)],
    bc=[left_x, right_x, left_y],
    record={
        'strain': Vis3DTensorField(var='eps_ab'),
        #        'damage': Vis3DStateField(var='omega_a'),
        #        'kinematic hardening': Vis3DStateField(var='z_a')
    })
s = m.sim
示例#5
0
 def _get_right_x_s(self):
     return BCSlice(slice=self.xd_steel.mesh[-1, :, -1, :],
                    var='u',
                    dims=[0],
                    value=self.u_max)
                          coord_max=(L_x, R_in),
                          shape=(n_x_e, 2),
                          fets=FETS2D4Q())
xd2 = XDomainFEGridAxiSym(coord_min=(0, R_in),
                          coord_max=(L_x, R_out),
                          shape=(n_x_e, n_y_e),
                          integ_factor=2 * np.pi,
                          fets=FETS2D4Q())
m1 = MATS3DElastic(E=280000, nu=0.32)
m2 = MATS3DElastic(E=28000, nu=0.3)

xd12 = XDomainFEInterface(I=xd1.mesh.I[:, -1],
                          J=xd2.mesh.I[:, 0],
                          fets=FETS1D52ULRH())

left_y = BCSlice(slice=xd1.mesh[0, 0, 0, 0], var='u', dims=[1], value=0)
left_x = BCSlice(slice=xd1.mesh[0, :, 0, :], var='u', dims=[0], value=-0)
right_x = BCSlice(slice=xd1.mesh[-1, :, -1, :], var='u', dims=[0], value=u_0)
bc1 = [left_y, left_x, right_x]

m = TStepBC(
    domains=[
        (xd1, m1),
        (xd2, m2),
        (xd12, MATS1D5Elastic(E_s=10000000, E_n=1000000)),
    ],
    bc=bc1,  # + bc2,
)

m.hist.vis_record = {
    'strain': Vis3DTensorField(var='eps_ab'),
示例#7
0
H = 100.0
L_c = 5.0
a = 5.0
w_max = 0.4
dgrid1 = XDomainFEGrid(coord_max=(L, H),
                       shape=(20, 20),
                       integ_factor=50,
                       fets=FETS2D4Q())
x_x, x_y = dgrid1.mesh.geo_grid.point_x_grid
L_1 = x_x[1, 0]
d_L = L_c - L_1
x_x[1:, :] += d_L * (L - x_x[1:, :]) / (L - L_1)
a_L = a / H
n_a = int(a_L * dgrid1.shape[1])
fixed_right_bc = BCSlice(slice=dgrid1.mesh[-1, 0, -1, 0],
                         var='u',
                         dims=[1],
                         value=0)
fixed_x = BCSlice(slice=dgrid1.mesh[0, n_a:, 0, -1],
                  var='u',
                  dims=[0],
                  value=0)
control_bc = BCSlice(slice=dgrid1.mesh[0, -1, :, -1],
                     var='u',
                     dims=[1],
                     value=-w_max)
m = TStepBC(domains=[(dgrid1, MATS2DScalarDamage(algorithmic=True))],
            bc=[fixed_right_bc, fixed_x, control_bc],
            record={
                'damage': Vis3DStateField(var='omega'),
            })
s = m.sim
示例#8
0
     E_T=400, gamma_T=6000, K_T=20, S_T=0.2, c_T=4.5, bartau=8,
     E_N=300, S_N=0.05, c_N = 9, m = 0.8, f_t=2, f_c=100, f_c0 = 80, eta=0.0)



bond_m = Slide34(**material_params)

m = TStepBC(
        domains=[(xd_lower, m1),
                 (xd_upper, m2),
                 (xd12, bond_m),
                 ]
    )


lower_fixed_0 = BCSlice(slice=xd_lower.mesh[:, 0, :, 0], var='u', dims=[1], value=0)
upper_fixed_1 = BCSlice(slice=xd_upper.mesh[0, :, 0, :], var='u', dims=[0], value=0)

tf_first = TFBilinear(loading_ratio=1.0, time_ratio=0.05)
tf_second = TFBilinear(loading_ratio=0.00, time_ratio=0.05)

list_param = np.linspace(300,500,3)
compression_list = np.linspace(-15,-30,2)
list_param = [500]


for param in list_param:

    material_params['gamma_T'] = param
    bond_m = Slide34(**material_params)
示例#9
0
    I=xd_steel_1.mesh.I[n_ex:-n_ex, -1],
    J=xd_concrete_2.mesh.I[n_ex:-n_ex, 0],
    fets=FETS1D52ULRH(),
    integ_factor=np.pi * ds
)

tau_bar = 0.2
E_T = 1000
s_0 = tau_bar / E_T
print('s_0', s_0)
m_interface = MATS1D5D(E_T=E_T, E_N=1000000, omega_fn_type='jirasek',
                       algorithmic=True)
m_interface.omega_fn.trait_set(s_0=s_0, s_f=2000 * s_0)

u_max = 0.1
right_x_s = BCSlice(slice=xd_steel_1.mesh[-1, :, -1, :],
                    var='u', dims=[0], value=u_max)
right_x_c = BCSlice(slice=xd_concrete_2.mesh[0, :, 0, :],
                    var='u', dims=[0], value=0)
left_x_s = BCSlice(slice=xd_steel_1.mesh[0, :, 0, :],
                   var='f', dims=[0], value=0)

bc1 = [right_x_c, right_x_s]

s = Simulator(
    domains=[(xd_steel_1, m_steel),
             (xd_concrete_2, m_concrete),
             (xd12, m_interface),
             ],
    bc=bc1,  # + bc2,
    record={
        'Pw': Vis2DFW(bc_right=right_x_s, bc_left=left_x_s),
示例#10
0
        handler=BMCSTreeViewHandler(),
        key_bindings=key_bindings,
        toolbar=ToolBar(*toolbar_actions,
                        image_size=(32, 32),
                        show_tool_names=False,
                        show_divider=True,
                        name='view_toolbar'),
        menubar=MenuBar(
            Menu(menu_exit, Separator(), menu_save, menu_open, name='File'),
            Menu(menu_tools_report_tex, menu_tools_report_pdf, name='Tools'),
        ))


if __name__ == '__main__':
    from view.examples.response_tracer import ResponseTracer
    from simulator.api import Simulator
    from ibvpy.core.bcond_mngr import BCondMngr
    from ibvpy.bcond import BCDof, BCSlice
    bc_mngr = BCondMngr()
    bc_mngr.bcond_list = [BCDof(), BCSlice()]
    rt = ResponseTracer()
    bm = Simulator(node_name='sim',
                   tree_node_list=[
                       BMCSTreeNode(node_name='subnode 1'),
                       BMCSTreeNode(node_name='subnode 2'), rt, bc_mngr
                   ])
    bm.tree_node_list += [bm.tline]
    tv = BMCSWindow(model=bm)
    rt.add_viz2d('time_profile', 'time profile')
    tv.configure_traits()