<< Click to Display Table of Contents >> spline_boundary |
{ SPLINE_BDRY.PDE
This example shows the use of the SPLINE statement in constructing boundary curves.
A circular arc is approximated by five spline segments.
The end segments are made very short to establish the proper slope at the ends.
The problem solves a heatflow equation on a quarter circle and compares the solution
with the analytic value.
}
title 'Spline Boundary'
Variables
u
definitions
k = 1
u0 = 1-r^2
s = 4
equations
U: 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