two-way_periodic

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Periodicity >

two-way_periodic

Previous pageReturn to chapter overviewNext page

{ TWO-WAY_PERIODIC.PDE

 

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

 

 Starting in version 7, two-way periodcity is fully supported at a single point.

 Prior to version 7, this was not supported and a small segment with no

 periodicity needed to be inserted near the two-way periodic point.

}

 

title 'TWO-WAY PERIODIC BOUNDARY TEST'

 

variables

    u

 

definitions

   k = 1  

   h=0

   x0=0.4   x1=0.9 { right box x-coordinates }

   x2=-0.5  x3=0.0 { left box x-coordinates }

   y0=-0.7 y1 = -0.3 {y-coordinates for both boxes }

 

equations

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

 

boundaries

  region 1

 

    { Periodic bottom boundary }

    start(-1,-1)

    periodic(x,y+2) line to (1,-1)

 

 

 

    { Periodic right boundary }

    periodic(x-2,y) arc(center=-1,0) to (1,1)

 

    { Image of periodic bottom boundary }

    line to  (-1,1)

 

    { Image of periodic right boundary }

    arc(center= -3,0) to close

 

    { off-center hot box }

    start(x0,y0)

    value(u)=1   line to (x1,y0) to (x1,y1) to (x0,y1) to close

 

    { off-center cold box }

    start(x2,y0)  

    value(u)=-1   line to (x3,y0) to (x3,y1) to (x2,y1) to close

 

monitors

    grid(x,y)

    contour(u)

 

plots

    grid(x,y)

    contour(u)

end