3d_spherebox

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > 3D_domains >

3d_spherebox

Previous pageReturn to chapter overviewNext page

{ 3D_SPHEREBOX.PDE

 

 An empty 3D sphere inside a box.

}

 

title 'Empty 3D Sphere in a box'

 

coordinates

   cartesian3

 

variables

   u

 

definitions

   K = 0.1                     { conductivity }

   R0 = 1                     { radius }

   box = 2*R0

 

   zsphere = SPHERE ((0,0,0),R0)   {  hemisphere shape }

 

equations

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

 

extrusion

  surface z=-box

  surface z = -zsphere       { the bottom hemisphere and plane }

  surface z = zsphere         { the top hemisphere and plane }

  surface z=box

 

boundaries

  surface 1 value(u) = 0     { fixed value on box surfaces }

  surface 4 value(u) = 1

 

  Region 1       { the bounding box - defaults to insulating sidewalls }

      start(-box,-box)  

      line to (box,-box) to (box,box) to (-box,box) to close

 

  Limited Region 2           { sphere exists only in region 2 }

      layer 2 void           { ... and layer 2 }

      start  (R0,0)

          arc(center=0,0) angle=360

 

plots

  grid(x,y,z)

  grid(x,z) on y=0

  contour(u) on x=0

 

end