Dear team members

I am working on a problem which has an obstacle defined as domain (midplane region)and I need to apply Dirichlet BC in that region (z direction displacement is zer0) but really donot have any idea to apply BC for obstacle region ..





class Midplane(SubDomain):
    def inside(self, x, on_boundary):
return on_boundary and(((x[0]/3.25)**2 + (x[1]/2.75)**2 ) -1.0 < DOLFIN_EPS) and near (x[2], 0.60)


midplane = Midplane()


# Initialize mesh function for interior domains
domains = CellFunction("uint", mesh)
domains.set_all(0)
midplane.mark(domains, 1)

# Initialize mesh function for boundary domains
boundaries = FacetFunction("uint", mesh)
boundaries.set_all(0)
left.mark(boundaries, 1)


# Define function space and basis functions
V = VectorFunctionSpace(mesh, "Lagrange", 1)
U = TrialFunction(V)
v = TestFunction(V)

# Define boundary conditions

c =  Constant(("0.0"))
bc1 = DirichletBC(V.sub(0), c, boundaries, 1)
bc2 = DirichletBC(V.sub(2), c, domains, 1)
bc =  [bc1,bc2]




thnks
Niraj

_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to