Periodic_xy

Top  Previous  Next

periodic_xy04

{

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 = 0.1

   h=0

   x0=0.5  y0=-0.2

   x1=1.0  y1 = 0.2

   x2=-0.5  x3=0.0

 

equations

   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 }

       value(u)=1

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

 

     { off-center cold box }

       value(u)=-1

            start(x2,y0) 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