2d_sphere_in_cylinder

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > 3D_domains >

2d_sphere_in_cylinder

Previous pageReturn to chapter overviewNext page

{ 2D_SPHERE_IN_CYLINDER.PDE

 

 2D cylindrical (axi-symmetric) model of an empty sphere in a cylindrical box.

 

}  

 

title '2D sphere in a can'  

 

coordinates  

   ycylinder("R","Z") { vertical coordinate is cylinder axis }  

 

variables  

   u  

 

definitions  

   k = 1  

   R0 = 1  

   box = 2*R0  

 

equations    

   U: div(k*grad(u)) = 0  

 

boundaries  

  region 1  

      start(0,-box)  

      value(u)=0 line to (box,-box)  

      natural(u)=0 line to (box,box)  

      value(u)=1 line to (0,box)  

      natural(u)=0 line to (0,R0)     { cylindrical axis }  

          arc(center=0,0) angle=-180 { spherical cutout }  

          line to close               { cylindrical axis }  

 

monitors  

  grid(r,z)  

  contour(u)  

plots  

  grid(r,z)  

  contour(u)  

 

end