Spline_Bdry

Top  Previous  Next

{

  SPLINE_BDRY.PDE

  This example shows the use of the SPLINE statement in constructing boundary curves.

}

 

title 'Spline Boundary'

 

Variables

    u

 

definitions

    k = 1

    u0 = 1-r**2

    s = 4

 

equations        

   div(k*grad(u)) + s  = 0

 

boundaries

    Region 1

       start(0,0)

       natural(u) = 0 line to (1,0)

       value(u)=0

       spline to(0.99985,0.01745)  ! short initial interval to establish slope

               to (0.866,0.5)

               to(0.5,0.866)

               to (0.01745,0.99985)        ! short final interval to establish slope

               to (0,1)

       natural(u)=0 line to close

 

monitors

    grid(x,y)

    contour(u)

    contour(u-u0)

plots

    grid(x,y)

    contour(u)

    contour(u-u0)

end