def elem_dep_data_h8msgso(na, nb, nt):
    fens, fes = h8_block(a, b, t, na, nb, nt)
    femm = FEMMDeforLinearH8MSGSO(material=m, material_csys=mcsys, fes=fes)
    bfes = mesh_boundary(femm.fes)
    fesel = fe_select(fens, bfes, box=[a, a, 0, b, 0, t], inflate=htol)
    tsfes = bfes.subset(fesel)
    sfemm = FEMMDeforLinear(fes=tsfes,
                            integration_rule=GaussRule(dim=2, order=2))
    return fens, femm, sfemm
Esempio n. 2
0
from spyfe.meshing.exporters.vtkexporter import vtkexport

start0 = time.time()
E = 200e9
nu = 0.3
rho = 8000
a = 10.0
b = a
h = 0.05

htol = h / 1000
na, nb, nh = 6,6,4
m = MatDeforTriaxLinearIso(rho=rho, e=E, nu=nu)

start = time.time()
fens, fes = h8_block(a, b, h, na, nb, nh)
fens, fes = h8_to_h20(fens, fes)
print('Mesh generation', time.time() - start)
geom = NodalField(fens=fens)
u = NodalField(nfens=fens.count(), dim=3)
cn = fenode_select(fens, box=numpy.array([0, 0, 0, b, 0, h]), inflate=htol)
for j in cn:
    u.set_ebc([j], comp=0, val=0.0)
    u.set_ebc([j], comp=1, val=0.0)
    u.set_ebc([j], comp=2, val=0.0)
u.apply_ebc()
femmk = FEMMDeforLinear(material=m, fes=fes, integration_rule=GaussRule(dim=3, order=2))
femmk.associate_geometry(geom)
u.numberdofs()
print('Number of degrees of freedom', u.nfreedofs)
start = time.time()
Esempio n. 3
0
start0 = time.time()
E = 1000
nu = 0.3
W = 2.5
H = 5
L = 50
nW, nL, nH = 2, 40, 8
htol = min(L, H, W) / 1000
magn = -0.2 * 12.2334 / 4
Force = magn * W * H * 2
Force * L**3 / (3 * E * W * H**3 * 2 / 12)
uzex = -12.0935378981478
m = MatDeforTriaxLinearIso(e=E, nu=nu)

start = time.time()
fens, fes = h8_block(W, L, H, nW, nL, nH)
print('Mesh generation', time.time() - start)
geom = NodalField(fens=fens)
u = NodalField(nfens=fens.count(), dim=3)
cn = fenode_select(fens, box=numpy.array([0, W, 0, 0, 0, H]), inflate=htol)
for j in cn:
    u.set_ebc([j], comp=0, val=0.0)
    u.set_ebc([j], comp=1, val=0.0)
    u.set_ebc([j], comp=2, val=0.0)
cn = fenode_select(fens, box=numpy.array([W, W, 0, L, 0, H]), inflate=htol)
for j in cn:
    u.set_ebc([j], comp=0, val=0.0)
u.apply_ebc()
u.numberdofs()
print('Number of degrees of freedom', u.nfreedofs)
femm = FEMMDeforLinear(material=m,
Esempio n. 4
0
start0 = time.time()

# Reference value is the axial stress at point A
sigma_x_A_ref = -4830e6

E = 210e9
nu = 0.3
alpha = 2.3e-4
m = MatDeforTriaxLinearIso(e=E, nu=nu, alpha=alpha)

start = time.time()
L, H, W = 5.0, 2.0, 1.0
nW, nL, nH = 1, 2, 1
htol = min(L, H, W) / 1000
fens, fes = h8_block(L, W, H, nL, nW, nH)
fens, fes = h8_to_h20(fens, fes)
print('Mesh import', time.time() - start)

geom = NodalField(fens=fens)
u = NodalField(nfens=fens.count(), dim=3)
cn = fenode_select(fens, box=numpy.array([0.0, 0.0, 0, W, 0, H]), inflate=htol)
for j in cn:
    u.set_ebc([j], comp=0, val=0.0)
    u.set_ebc([j], comp=1, val=0.0)
    u.set_ebc([j], comp=2, val=0.0)
cn = fenode_select(fens, box=numpy.array([L, L, 0, W, 0, H]), inflate=htol)
for j in cn:
    u.set_ebc([j], comp=0, val=0.0)

u.apply_ebc()