Exemplo n.º 1
0
model = dnl.DynELA("Shear")

# Creates the Nodes
model.createNode(1, 0.00, 0.00, 0.00)
model.createNode(2, 10.0, 0.00, 0.00)
model.createNode(3, 10.0, 10.0, 0.00)
model.createNode(4, 0.00, 10.0, 0.00)
print("Number of nodes created:", model.getNodesNumber())

# Creates the Elements
model.setDefaultElement(dnl.Element.ElQua4N2D)
model.createElement(1, 1, 2, 3, 4)
print("Number of elements created:", model.getElementsNumber())

# Creates the Groups
allNS = dnl.NodeSet("NS_All")
model.add(allNS, 1, 4)

topNS = dnl.NodeSet("NS_Top")
model.add(topNS, 3, 4)

bottomNS = dnl.NodeSet("NS_Bottom")
model.add(bottomNS, 1, 2)

allES = dnl.ElementSet("ES_All")
model.add(allES, 1)

histNS = dnl.NodeSet("NS_Hist")
model.add(histNS, 1)

histES = dnl.NodeSet("ES_Hist")
Exemplo n.º 2
0
model = dnl.DynELA("Tensile")

# Creates the Nodes
model.createNode(1, 0.00, 0.00, 0.00)
model.createNode(2, 10.0, 0.00, 0.00)
model.createNode(3, 10.0, 10.0, 0.00)
model.createNode(4, 0.00, 10.0, 0.00)
print("Number of nodes created:", model.getNodesNumber())

# Creates the Elements
model.setDefaultElement(dnl.Element.ElQua4N2D)
model.createElement(1, 1, 2, 3, 4)
print("Number of elements created:", model.getElementsNumber())

# Creates the Groups
allNS = dnl.NodeSet("NS_All")
model.add(allNS, 1, 4)

rightNS = dnl.NodeSet("NS_right")
model.add(rightNS, 2, 3)

leftNS = dnl.NodeSet("NS_left")
model.add(leftNS, 1)
model.add(leftNS, 4)

allES = dnl.ElementSet("ES_All")
model.add(allES, 1)

# Creates the hardening law
hardLaw = dnl.JohnsonCookLaw()
hardLaw.setParameters(A, B, C, n, m, depsp0, Tm, T0)
Exemplo n.º 3
0
C = 0.0089
n = 0.168
m = 1.1
depsp0 = 1.0
Tm = 1540.0
T0 = 20.0

dxWidth = width / (nbElementsWidth)
dxHeigh = heigh / (nbElementsHeigh)

# Creates the main Object
model = dnl.DynELA("Taylor")

# Creates the Nodes
nbNodes = 1
allNS = dnl.NodeSet("NS_All")
for j in range(nbElementsHeigh + 1):
    for i in range(nbElementsWidth + 1):
        model.createNode(nbNodes, i * dxWidth, j * dxHeigh, 0.00)
        model.add(allNS, nbNodes)
        nbNodes += 1
nbNodes -= 1
print("Number of nodes created:", model.getNodesNumber())

# Creates the Elements
model.setDefaultElement(dnl.Element.ElQua4NAx)
nbElements = 1
allES = dnl.ElementSet("ES_All")
for j in range(nbElementsHeigh):
    for i in range(nbElementsWidth):
        n1 = (i + (j * (nbElementsWidth + 1)) + 1)
Exemplo n.º 4
0
m = 1.1
depsp0 = 1.0
Tm = 1540.0
T0 = 20.0

dxWidth = bottomWidth / nbElementsWidth
dxHeigh = heigh / nbElementsHeigh
ddx = (topWidth - bottomWidth) / bottomWidth / heigh
speed = displacement / stopTime

# Creates the main Object
model = dnl.DynELA("BarNecking")

# Creates the Nodes
nbNodes = 1
nsAll = dnl.NodeSet("NS_All")
dxHeigh /= (1 / factor + 1) / 2
y = 0
for j in range(nbElementsHeigh + 1):
    for i in range(nbElementsWidth + 1):
        model.createNode(nbNodes, i * dxWidth * (1 + ddx * y), y, 0)
        model.add(nsAll, nbNodes)
        nbNodes += 1
    if (j == nbElementsHeigh / 2): dxHeigh /= factor
    y += dxHeigh
nbNodes -= 1
print("Number of nodes created:", model.getNodesNumber())

# Creates the Elements
model.setDefaultElement(dnl.Element.ElQua4NAx)
nbElements = 1
Exemplo n.º 5
0
model = dnl.DynELA("Shear-Elastic")

# Creates the Nodes
model.createNode(1, 0.00, 0.00, 0.00)
model.createNode(2, 10.0, 0.00, 0.00)
model.createNode(3, 10.0, 10.0, 0.00)
model.createNode(4, 0.00, 10.0, 0.00)
print("Number of nodes created:", model.getNodesNumber())

# Creates the Elements
model.setDefaultElement(dnl.Element.ElQua4N2D)
model.createElement(1, 1, 2, 3, 4)
print("Number of elements created:", model.getElementsNumber())

# Creates the Groups
allNS = dnl.NodeSet("NS_All")
model.add(allNS, 1, 4)

topNS = dnl.NodeSet("NS_Top")
model.add(topNS, 3, 4)

bottomNS = dnl.NodeSet("NS_Bottom")
model.add(bottomNS, 1, 2)

allES = dnl.ElementSet("ES_All")
model.add(allES, 1)

# Creates the hardening law
hardLaw = dnl.JohnsonCookLaw()
hardLaw.setParameters(A, B, C, n, m, depsp0, Tm, T0)