<< Click to Display Table of Contents >> 1d_cylinder |
{ 1D_CYLINDER.PDE
This problem tests the implementation of 1D cylindrical coordinates in FlexPDE.
A distributed source is applied to a heatflow equation. The source is chosen as
the analytic derivative of an assumed Gaussian solution. The numerical solution
is then compared to the analytical solution.
}
title '1D Cylinder Test -- Gaussian'
coordinates
cylinder1 { default coordinate name is 'R' }
variables
u
definitions
k = 1
w=0.1
{ assume a gaussian solution }
u0 = exp(-r^2/w^2)
{ apply the correct analytic source for cylindrical geometry (we could use
div(k*grad(u0)) here, but that would not test the 1D Cylinder expansions) }
s = -(4/w^2)*(r^2/w^2-1)*u0
left=point(0)
right=point(1/10)
equations
U: div(K*grad(u)) +s = 0
boundaries
region 1
start left point value(u)=u0
line to right point load(u)=(-2*k*r*u0/w^2)
monitors
elevation(u) from left to right
plots
elevation(u,u0) from left to right
elevation(u-u0) from left to right as "Error"
elevation(-div(grad(u)),s) from (0.01) to right
elevation(-grad(u),-grad(u0)) from (0.01) to right
end