# Fenics : boundary condition

I am working on a problem found here " http://www.caesarsystems.co.uk/NAFEMS_benchmarks/le10.html" ..I am really confused about the boundary conditions and tried my level best to compute it but result is totally different

here is my bcs

class Left(SubDomain): def inside(self, x, on_boundary):
return (between (x[1], (1.0,2.75)) and between (x[2], (0.0,0.600000000))

class Right(SubDomain):
def inside(self, x, on_boundary):
return (between(x[0], (2.0,3.25)) and between (x[2], (0.0,0.600000000)))

class Outerall(SubDomain):
def inside(self, x, on_boundary):
return (((x[0]/3.25)**2 + (x[1]/2.75)**2 ) -1.0 < tol) and abs(x[2]-0.600000000)

class Outermid(SubDomain):
def inside(self, x, on_boundary):
return  (((x[0]/3.25)**2 + (x[1]/2.75)**2 ) -1.0 < tol) and abs(x[2]-0.300000000) < tol

class Top(SubDomain):
def inside(self, x, on_boundary):
return abs(x[2]-0.600000000) < tol

• Nick, please, use the markdown options provided with the editor, as there is {} to format your code. Doing so, your post will become more readable.
– Jan
May 21 '13 at 14:09
• thanks Jan.. I have edited my post now you can read it properly May 21 '13 at 14:18
• Yes, now it looks good. One more thing: Can you provide information on what you are trying to do and what eventually goes wrong? E.g. by commenting your code. I prefer to look for implementation errors immediately rather than starting with interpreting the code.
– Jan
May 21 '13 at 14:37
• I get the results for this problem but it is absolutely incorrect so I think my bc is misinterpreted by fenics ..if you can check my class Outerall(SubDomain) and class Outermid(SubDomain) definition that would be great help..thnks May 21 '13 at 14:44
• Hi nickrocks and welcome to scicomp! I agree with @Jan on this. In order to help you, we really need more information about the results you get, what you expect to happen, and some sort of correspondence between the boundary conditions in your code and the problem you're solving. This will help all of us to understand and help you better.
– Paul
May 22 '13 at 0:22

left = Left()