3d_surf_export

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Import_Export >

3d_surf_export

Previous pageReturn to chapter overviewNext page

{ 3D_SURF_EXPORT.PDE

 

 This problem shows data export on an extrusion surface in 3D.

 

 Values are exported on a cut plane in default text format,

 and on a cut plane and an extrusion surface in user-specified columnar format.

 (See "Format 'string'" in the Help Index for formatting rules.)

 

 The output files will be given the default names  

 "3d_surf_export.p02", "...p03" and "...p04", corresponding to the second,

 third and fourth plot specifications.

 

 The problem is a modification of 3D_SPHERE.PDE.

}  

 

title '3D Export Test - Sphere'  

 

coordinates  

    cartesian3  

 

variables  

    u  

 

definitions  

    k = 0.1                   { conductivity }  

    heat =6*k                 { internal heat source }  

   u0 = exp(-x^2-y^2)  

 

equations  

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

 

extrusion  

  surface z = -sqrt(1-(x^2+y^2))     { the bottom hemisphere }  

  surface z = sqrt(1-(x^2+y^2))       { the top hemisphere }  

 

boundaries  

  surface 1 value(u) = u0     { fixed value on sphere surfaces }  

  surface 2 value(u) = u0  

  region 1  

      start(1,0) arc(center=0,0) angle=360  

 

plots  

  grid(x,y,z)  

  contour(u) on x=0         { YZ plane through diameter }  

  export  

  contour(u) on z=0.5       { XY plane above center }  

          export format "#x#b#y#b#z#b#1"  

  contour(u) on surface 2           { top surface }  

          export format "#x#b#y#b#z#b#1"  

 

end