Skip to content
Snippets Groups Projects
Commit 24c690e0 authored by Ernesto Oquelis's avatar Ernesto Oquelis
Browse files

update

parent 674399dd
No related branches found
No related tags found
No related merge requests found
......@@ -3,26 +3,35 @@
This is an empty docstring
"""
import math
from oofem_classes import Constraint, Force, Node, Element, Structure, Visualizer
struct = Structure()
n1 = Node([0, 0, 0])
n2 = Node([1, 1, 0])
lb = 15.0
r = 457.2/2000
t = 10.0/1000
a = math.pi * ((r ** 2) - ((r-t) ** 2))
e = 2.1e11
c1 = Constraint([False, False, False])
c2 = Constraint([True, True, False])
f = Force([0, -20e3, -100e3])
n1 = struct.add_node(Node([0.0, 0.0, lb * ((2.0/3.0) ** 0.5)]))
n2 = struct.add_node(Node([0.0, lb/(3 ** 0.5), 0.0]))
n3 = struct.add_node(Node([-lb/2, -lb/(12.0 ** 0.5), 0.0]))
n4 = struct.add_node(Node([lb/2, -lb/(12.0 ** 0.5), 0.0]))
n1.set_force(f)
n2.set_constraint(c1)
n3.set_constraint(c1)
n4.set_constraint(c2)
struct.add_element(e, a, 0, 1)
struct.add_element(e, a, 0, 2)
struct.add_element(e, a, 0, 3)
struct.add_element(e, a, 1, 2)
struct.add_element(e, a, 2, 3)
struct.add_element(e, a, 3, 1)
e1 = Element(1, 1, n1, n2)
c1 = Constraint([False, True, True])
n1.set_constraint(c1)
eqn = n1.enumerate_dofs(0)
eqn = n2.enumerate_dofs(eqn)
e1.enumerate_dofs()
A= n1.get_dof_numbers()
B=n2.get_dof_numbers()
print(e1.get_dofs())
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment