3d_ellipsoid_shell

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > 3D_domains >

3d_ellipsoid_shell

Previous pageReturn to chapter overviewNext page

{ 3D_ELLIPSOID_SHELL.PDE  

 

 This problem constructs an elliptical shell.

 It is the geometric construction only, there are no variables or equations.

 

}  

 

 

title '3D Ellipsoid Shell'  

 

coordinates cartesian3  

 

definitions  

 ao=3.2  bo=2.2  co=1.2   { x,y,z radii - outer ellipse }  

 ai=3.0  bi=2.0  ci=1.0   { x,y,z radii - inner ellipse }  

 xc=1 yc=1 zc=1 { coordinates of ellipsoid center }  

 

{ top half of ellipsoid surface :

   the MAX function is used to ensure the surface is defined throughout all

   x,y space - essentially placing a 'skirt' on the top ellipsoid surface }  

 

 outer_ellipsoid = co*sqrt( max(0,1-(x-xc)^2/ao^2-(y-yc)^2/bo^2) )  

 inner_ellipsoid = ci*sqrt( max(0,1-(x-xc)^2/ai^2-(y-yc)^2/bi^2) )  

   

extrusion  

  surface 'outer bottom' z = zc - outer_ellipsoid  

  surface 'inner bottom' z = zc - inner_ellipsoid  

  surface 'inner top'    z = zc + inner_ellipsoid  

  surface 'outer top'    z = zc + outer_ellipsoid  

 

boundaries  

  region 'outer ellipse'  

      start(xc+ao,yc)  

      arc(center=xc,yc) to (xc,yc+bo) to (xc-ao,yc) to (xc,yc-bo) to close  

 

  limited region 'inner ellipse'  

    layer 2 void  

      start(xc+ai,yc)  

      arc(center=xc,yc) to (xc,yc+bi) to (xc-ai,yc) to (xc,yc-bi) to close  

 

plots  

  grid(x,y,z)  

  grid(x,y) on z=zc paintregions  

  grid(y,z) on x=xc paintregions  

  grid(x,z) on y=yc paintregions  

 

end