<< Click to Display Table of Contents >> sine3d |
{ SINE3D.PDE
This problem compares the solution accuracy for three different levels of ERRLIM.
}
title '3D Accuracy Test - Sine'
coordinates
cartesian3
select
ngrid = 5
errlim = staged(1e-2, 3e-3, 1e-3, 3e-4, 1e-4)
variables
u
definitions
long = 1
wide = 1
z1 = -1
z2 = 1
w=0.1
rs = r/w
uex = sin(rs)/rs
s = -(dxx(uex)+dyy(uex)+dzz(uex))
RMS_error = sqrt(integral((u-uex)^2)/sqrt(integral(uex^2)))
equations
U: div(grad(u)) + s = 0
extrusion z = z1,z2
boundaries
surface 1 value(u)=uex { fix bottom surface temp }
surface 2 value(u)=uex { fix top surface temp }
Region 1 { define full domain boundary in base plane }
start(-wide,-wide)
value(u) = uex { fix all side temps }
line to (wide,-wide) { walk outer boundary in base plane }
to (wide,wide)
to (-wide,wide)
to close
monitors
grid(x,z) on y=0 as "Grid on X-Z cut"
contour(uex) on y=0 as "Exact Solution Uex"
contour(u) on y=0 as "Numerical Solution U"
contour(u-uex) on y=0 as "Actual error U-Uex"
plots
grid(x,z) on y=0 as "Grid on X-Z cut"
contour(uex) on y=0 as "Exact Solution Uex"
contour(u) on y=0 as "Numerical Solution U"
contour(u-uex) on y=0 as "Actual error U-Uex"
summary
report(errlim) as "Requested error"
report(RMS_error)
histories
history(RMS_error, errlim) LOG
end