<< Click to Display Table of Contents >> sine_boundary |
{ SINE_BOUNDARY.PDE
This example creates a sinusoidal boundary segment using
the implicit CURVE descriptor. FlexPDE follows the given
equation exactly, so the current point and the ending point
must satisfy the equation or an error is issued. It starts
tracking the4 curve in the direction specified (-X).
}
title 'Sine Boundary'
coordinates cartesian2
variables u
definitions
k = 1
bottom = -1
initial values u=1
equations
U: div(K*grad(u)) + 4 = 0
boundaries
Region 1
start(-1,bottom)
value(u)=0
line to (10,bottom)
natural(u)=0
line to (10,2)
value(u)=1
{ create a boundary segment that follows the equation
y = cos(pi*x)+1, and start moving in the -X direction. }
curve (y = cos(pi*x)+1) by (-x) to (-1,0)
natural(u)=0
line to close
plots
contour(u)
elevation(u) from(-1,0) to (1,0)
end