On Fri, 24 May 2013 12:10:34 +0200
Jan Blechta <[email protected]> wrote:
> On 24 May 2013 11:38:59 +0200
> "Niraj Jha" <[email protected]> wrote:
> > Hello Fenics team,
> > 
> > I am trying to solve a problem described here 
> > http://www.caesarsystems.co.uk/NAFEMS_benchmarks/le10.html..I don't
> > have the exact result what i am looking for??
> > I tried to check my code many times but there is still error..Any 
> > advance user can help me out with this problem..
> > 
> > tol = 1e-10
> > ABA'B'
> > class Left(SubDomain):
> >      def inside(self, x, on_boundary):
> >            return near (x[1],2.75) and between(x[2],(0.0,0.600))
> 
> As I said on stackexchange, you're missing here x[0]<tol 
> 
> >           #return between(x[1],(1.0,2.75)) or
> > between(x[2],(0.0,0.600))
> > 
> > DCD'C'
> > class Right(SubDomain):
> >      def inside(self, x, on_boundary):
> >          return near (x[0],3.25) and between(x[2],(0.0,0.600))
> 
> Missing x[1] < tol
> 
> >          #return  between(x[0],(2.0,3.25)) or
> > between(x[2],(0.0,0.600 )) 
> >BCB'C'
> > class Outerall(SubDomain):
> >      def inside(self, x, on_boundary):
> >          return (((x[0]/3.25)**2 +(x[1]/2.75)**2) - 1.0 > tol) and 
> > between(x[2],(0.0,0.600))
> 
> That's obviously wrong, you need 
> (((x[0]/3.25)**2 +(x[1]/2.75)**2 ) > 1.0-tol)
> instead of 
> (((x[0]/3.25)**2 +(x[1]/2.75)**2 ) > 1.0+tol)
> 
> > 
> > Mid plane of BCB'C'
> > class Outermid(SubDomain):
> >      def inside(self, x, on_boundary):
> >           return (((x[0]/3.25)**2 +(x[1]/2.75)**2 )-1.0 > tol) and 
> > near(x[2],0.300)
> 
> Here this should be: (((x[0]/3.25)**2 +(x[1]/2.75)**2 ) < 1.0+tol)

Here I was wrong. Correct is (abs((x[0]/3.25)**2 +(x[1]/2.75)**2 - 1.0)
< tol). But note that this has only good meaning if there are edges in
your mesh precisely aligned with this line. You should think over what
do you want to do and whether it has a good meaning to enforce Dirichlet
condition on one-dimensional manifold in 3D.

Also you don't need to use method='pointwise' for Top, Outerall, Right,
Left as these define 2D manifolds.

> 
> > ABCD
> > class Top(SubDomain):
> >      def inside(self, x, on_boundary):
> >          return near(x[2], 0.600 )
> > 
> > 
> > V = VectorFunctionSpace(mesh, "Lagrange", 1)
> > 
> > # Initialize sub-domain instances
> > left = Left()
> > right = Right()
> > outer1 = Outerall()
> > outer2 = Outermid()
> > top = Top()
> > 
> > facet_domains = FacetFunction('size_t', mesh, 0)
> > top.mark(facet_domains, 3)
> > 
> > bc_right = DirichletBC(V.sub(1), Constant(0.0), right, "pointwise")
> > bc_left =  DirichletBC(V.sub(0), Constant(0.0), left, "pointwise")
> > bc_outer1x = DirichletBC(V.sub(0), Constant(0.0),outer1,
> > "pointwise") bc_outer1y = DirichletBC(V.sub(1),
> > Constant(0.0),outer1, "pointwise") bc_outer2x =
> > DirichletBC(V.sub(0), Constant(0.0),outer2, "pointwise") bc_outer2y
> > = DirichletBC(V.sub(1), Constant(0.0),outer2, "pointwise")
> > bc_outer2z = DirichletBC(V.sub(2), Constant(0.0),outer2,
> > "pointwise") bc =
> > [bc_right,bc_left,bc_outer1x,bc_outer1y,bc_outer2x,bc_outer2y,bc_outer2z]
> > 
> > Thanks
> > Niraj Kumar Jha
> > 004917634988484
> > _______________________________________________
> > fenics mailing list
> > [email protected]
> > http://fenicsproject.org/mailman/listinfo/fenics
> 
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics

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

Reply via email to