Navigation:  Sample Problems > usage > periodicity >

two-way_periodic

Print this Topic Previous pageReturn to chapter overviewNext page

{ TWO-WAY_PERIODIC.PDE

 

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

  FlexPDE cannot support multiple periodic images of a single point, so straightforward

    request for periodicity in both X nad Y will not work.

  If a small boundary segment is introduced at the corner point, however, then no point

    is imaged twice, and the specification will be accepted.

  The default boundary condition on the small non-periodic segment will be natural()=0, which

    is not strictly correct, but if the segment is short and located in a region of relative

    inactivity, the distortion should not be significant.

  Alternatively, the "tautological" boundary condition may be used.  This condition merely

    supplies the surface terms required by the definition of the natural BC.  In the diffusion

    equation used in this example it is simply Natural()=normal(K*grad(u)).

}

 

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(0.95,-1)

    { New "line" spec breaks periocity }

 

 

 

    {   optional:   natural(u) = normal(K*grad(u)) }

    line to (1,-1)

 

    { Periodic right boundary }

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

 

    { Images of non-periodic stub and periodic bottom boundry }

    line to (0.95,1) 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

 


Page url: index.html?usage_periodicity_two_way_periodic.html