two-way_periodic_3d

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Periodicity >

two-way_periodic_3d

Previous pageReturn to chapter overviewNext page

{  3D TWO-_WAY PERIODIC.PDE  

 This example shows the use of FlexPDE in 3D applications with two-way periodic boundaries.

}

 

title '3D TWO-WAY PERIODIC BOUNDARY TEST'

 

coordinates

   cartesian3

 

Variables

   u

   

select

   ngrid=4

 

definitions

   k = 0.1

   h=0

   x0=0.3  y0=0.3  z0 = 0.6

   x1=0.8  y1 = 0.8  z1 = 0.8

   xc = (x0+x1)/2

   yc = (y0+y1)/2

   zc = (z0+z1)/2

 

equations

   u : div(K*grad(u)) + h = 0

 

extrusion z=0,z0,z1,1

 

boundaries

 

  surface 1 value(u)=0

  surface 4 value(u)=0

   

  region 1

    start(-1,-1)

      periodic(x,y+2)  

  line to (1,-1)      

 

    { The following arc is required to be a periodic image of an arc

       two units to its left. (This image boundary has not yet been defined.) }

    periodic(x-2,y)

    arc(center=-1,0) to (1,1)

 

    ! periodic(x,y-2)  

    line to (-1,1)      

 

    { The following arc provides the required image boundary for the previous

               x-periodic statement }

    nobc(u)   { turn off the value BC }

    arc(center= -3,0) to close

 

  { an off-center heat source in layer 2 provides the asymmetric conditions to

       demonstrate the periodicity of the solution }

  limited region 2

    layer 2 h=10 k=10

    start(x0,y0) line to (x1,y0) to (x1,y1) to (x0,y1) to close

 

monitors

  contour(u) on z=zc

  contour(u) on y=yc

  contour(u) on x=xc

 

plots

  contour(u) on z=zc painted as "U(x,y)"

  contour(u) on y=yc   painted as "U(x,z)"

  contour(u) on x=xc   painted as "U(y,z)"

   

  elevation(u) from(xc, yc, 0) to (xc, yc, 1)

  elevation(u) from(-1, yc, zc) to (1.5, yc, zc)

  elevation(u) from(xc, -1, zc) to (xc, 1, zc)

 

end