This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

bouandry condition

0 votes

I for solved the problem of the propagation of the crack where I have a rectangular field with a circle.

I must have a displacement imposed on the circle. I have the following code for BC which I must change to carry out this but I am new with the fenics. Any help would be appreciated much.
def Borbas(x, on_boundary)
return near(x[1],0.)
def Borhaut(x, on_boundary)
return near(x[1],120.)

bc_ub1 = DirichletBC(V_u.sub(0), Constant(0.), Borbas)
bc_ub2 = DirichletBC(V_u.sub(1), Constant(0.), Borbas)
bc_ub3 = DirichletBC(V_u.sub(1,), Ut, Borhaut)

asked Dec 9, 2016 by maro FEniCS Novice (220 points)

I'm not sure what you're asking because your question is not very clear, but I'm going to take a guess that you want to know how to specify a boundary for a disk that has been removed from a rectangular domain. A relatively straightforward solution is to check for x which are both on_boundary and within a square/rectangle that bounds the circle and does not intersect any other boundaries. (Note: you're existing boundaries should really be checking on_boundary as well.)

...