lefhs = discre.stiffness(p6, t6, material, qpe)
    dirdof, dirval, neudof, neuval = boucon.circle(p6, t6, fy)
    righs = discre.loadpoint(p6, t6, thick, neudof, neuval)
    disp = solution.solver(lefhs, righs, dirdof, dirval, p6.shape[0] * 2)
    Gi, ki, keq, craang = solution.SIF(tipava, p6, t6, numtip, disp, young,
                                       poisson, k, qpe)
    if max(abs(keq)) >= KIC:
        p, t, tipcra, nodcra, moucra, gloang, tipava, crapro = rm.adjustmesh(
            tipava, KIC, Gi, keq, lmin, iniang, gloang, craang)
        proste = proste + 1
        remesh = 1
        plot.trisurf2d(fig,
                       grid,
                       p,
                       t,
                       eleind=0,
                       nodind=0,
                       line=nodcra,
                       point=tipcra,
                       parame=[fy])
        plt.show()
        plt.pause(0.0001)
        data.append(
            np.array(([np.copy(p)], [np.copy(t)], [np.copy(nodcra)],
                      [np.copy(tipcra)], [np.copy(proste)], [np.copy(fy)])))
        Sigxxi, Sigyyi, Sigxyi, error = solution.stresses(
            p6, t6, disp, material, qpe)
    else:
        remesh = 0
        fy = fy + fy0
Ejemplo n.º 2
0
material, dirdof, dirval, neudof, neuval, possla, posmas, gap = boucon.hertcontact(
    p6, t6, R, N, boucir, numcir, bourec, f0, phi)
gap = gap + d0
p0 = np.copy(p6)
pori = np.copy(p6)
p0[:, 0] = p6[:, 0] * math.cos(phi) - p6[:, 1] * math.sin(phi)
p0[:, 1] = p6[:, 0] * math.sin(phi) + p6[:, 1] * math.cos(phi)
p6 = np.copy(p0)
slapoi = p6[possla, :]
maspoi = p6[posmas, :]
lefhs = discre.stiffness(p6, t6, material, [])
righs = discre.loadsegment(p6, neudof, neuval)
disp, consla, conmas, traction = contact.contactsolver(p6, t6, material, [],
                                                       lefhs, righs, dirdof,
                                                       dirval, slapoi, maspoi,
                                                       gap, 0)
U = np.concatenate((disp[::2], disp[1::2]), axis=1)
fig, grid = plt.subplots()
grid.plot(pori[possla, 0], -traction, 'r-')
fig, grid = plt.subplots()
plot.trisurf2d(fig,
               grid,
               p6,
               t6,
               eleind=0,
               nodind=0,
               line=[],
               point=p6[np.concatenate((consla, conmas)), :],
               parame=[])
plt.show()
Ejemplo n.º 3
0
KIC = 1.5 * 1E6
tor = 2E6
tor0 = 0.1 * 5E6
p, t = meshing.gmshpy(open('Mesh_multi_cracks.msh'))

p, t, nodaro, tipcra, moucra, roscra, nodcra, iniang, dc, aremin, lmin, slapoi, maspoi = meshing.reprocessing(
    p, t, 5, 'multi crack')
lmin = lmin * 1.2
aremin = lmin**2 * np.sqrt(3) / 4

fig, grid = plt.subplots()
plot.trisurf2d(fig,
               grid,
               p,
               t,
               eleind=0,
               nodind=0,
               line=nodcra,
               point=tipcra,
               parame=[])
plt.show()
plt.pause(0.0001)

numtip = len(tipcra)
gloang = np.zeros((numtip))
crapro = np.zeros((numtip)) == 0
tipava = np.zeros((numtip)) == 0
error = np.zeros((t.shape[0]))
proste = 0
remesh = 1
dsi = np.zeros((numtip)) + lmin * 4
Ejemplo n.º 4
0
    dirdof, dirval, neudof, neuval = boucon.edgcraextension(
        p6, t6, nodaro, nodmid, sig)
    lefhs = discre.stiffness(p6, t6, material, qpe)
    righs = discre.loadsegment(p6, neudof, neuval)
    disp = solution.solver(lefhs, righs, dirdof, dirval, p6.shape[0] * 2)
    Gi, ki, keq, craang = solution.SIF(tipava, p6, t6, numtip, disp, young,
                                       poisson, k, qpe)
    Sigxxi, Sigyyi, Sigxyi, error = solution.stresses(p6, t6, disp, material,
                                                      qpe)
    Ene = solution.energy(p6, t6, disp, material, qpe)
    if step < N:
        Sigxxi, Sigyyi, Sigxyi, error = solution.stresses(
            p6, t6, disp, material, qpe)
        parame = [
            Ene * young / (sig**2 * lx**2) * thick,
            ki[0][0] / (sig * np.sqrt(math.pi * lx / 2)) * thick,
            max(error)[0],
        ]
        plot.trisurf2d(fig,
                       grid,
                       p6,
                       t6,
                       eleind=0,
                       nodind=0,
                       line=[],
                       point=[],
                       parame=parame)
        plt.show()
        plt.pause(0.0001)
        p, t = rm.refinement(tipava, crapro, error, 0, 0, "based on error")