|
Polar |
Top Previous Next |
|
{ POLAR.PDE } { Test equations in polar form, using function definitions to expand polar derivatives in cartesian (XY) geometry. }
title 'Polar Coordinates'
Variables u
definitions k = 1 u0 = 1-r**2 s = 4 dr(f) = (x/r)*dx(f) + (y/r)*dy(f) { functional definition of polar derivatives... } dphi(f) = (-y)*dx(f) + x*dy(f) {... in cartesian coordinates }
equations { Multiply by r^2 to clear the singularity } r*dr(r*dr(u)) + dphi(dphi(u)) + r*r*s = 0
boundaries Region 1 start(0,0) natural(u) = 0 line to (1,0) value(u)=u0 arc(center=0,0) angle=90 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 |