Skip to content

Commit

Permalink
Removing debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Jul 6, 2021
1 parent 47249ec commit cddd741
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions elastic-tube-3d/solid-fenics/solid.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def clamped_boundary(x, on_boundary):
Filter nodes at both ends of tube as they are fixed
"""
tol = 1E-14
return on_boundary and ((abs(x[2]) - 0.0) < tol) and ((abs(x[2]) - L) < tol)
return on_boundary and ((x[2] - 0.0) < tol) and ((x[2] - L) < tol)


def neumann_boundary(x, on_boundary):
Expand Down Expand Up @@ -43,9 +43,6 @@ def neumann_boundary(x, on_boundary):
inner_tube = Cylinder(Point(0, 0, L), Point(0, 0, 0), R, R)
mesh = generate_mesh(outer_tube - inner_tube, 20)

# Save the mesh
File("cylinder.pvd") << mesh

# create Function Space
V = VectorFunctionSpace(mesh, 'P', 2)

Expand All @@ -61,7 +58,7 @@ def neumann_boundary(x, on_boundary):
v_n = Function(V)
a_n = Function(V)

f_N_function = interpolate(Expression(("1", "0", "0"), degree=1), V)
f_N_function = interpolate(Expression(("1", "1", "0"), degree=1), V)
u_function = interpolate(Expression(("0", "0", "0"), degree=1), V)

coupling_boundary = AutoSubDomain(neumann_boundary)
Expand All @@ -76,7 +73,7 @@ def neumann_boundary(x, on_boundary):
# fenics_dt = 0.02 # if fenics_dt < precice_dt, subcycling is applied
dt = Constant(np.min([precice_dt, fenics_dt]))

# clamp the beam at the bottom
# clamp the tube on both sides
bc = DirichletBC(V, Constant((0, 0, 0)), fixed_boundary)

# alpha method parameters
Expand Down

0 comments on commit cddd741

Please sign in to comment.