<< Click to Display Table of Contents >> 3d_spherespec |
{ 3D_SPHERESPEC.PDE
This problem demonstrates the use of the SPHERE function for construction
of a spherical domain in 3D. It is a modification of the example problem 3D_SPHERE.PDE.
}
title '3D Sphere'
coordinates
cartesian3
variables
u
definitions
K = 0.1 { conductivity }
R0 = 1 { radius }
H0 = 1 { total heat input }
heat =3*H0/(4*pi*R0^3) { volume heat source }
zs = sphere((0,0,0),R0) { the top hemisphere }
equations
U: div(K*grad(u)) + heat = 0
extrusion
surface z = -zs { the bottom hemisphere }
surface z = zs { the top hemisphere }
boundaries
surface 1 value(u) = 0 { fixed value on sphere surfaces }
surface 2 value(u) = 0
Region 1
start (R0,0)
arc(center=0,0) angle=360
plots
grid(x,y,z)
grid(x,z) on y=0
contour(u) on x=0
contour(4*pi*magnitude(k*grad(u))) on x=0
contour(4*pi*magnitude(k*grad(u))) on y=0
contour(-4*pi*k*(x*dx(u)+y*dy(u)+z*dz(u))/sqrt(x^2+y^2+z^2)) on x=0 as "normal flux"
contour(-4*pi*k*(x*dx(u)+y*dy(u)+z*dz(u))/sqrt(x^2+y^2+z^2)) on y=0 as "normal flux"
vector(-grad(u)) on x=0
vector(-grad(u)) on y=0
contour(4*pi*normal(-k*grad(u))) on surface 1 as "4*pi*Normal Flux=1" { bottom surface }
contour(4*pi*normal(-k*grad(u))) on surface 2 as "4*pi*Normal Flux=1" { top surface }
surface(4*pi*normal(-k*grad(u))) on surface 1 as "4*pi*Normal Flux=1" { bottom surface }
surface(4*pi*normal(-k*grad(u))) on surface 2 as "4*pi*Normal Flux=1" { top surface }
summary
report(sintegral(normal(-k*grad(u)),1)) as "Bottom current :: 0.5 "
report(sintegral(normal(-k*grad(u)),2)) as "Top current :: 0.5 "
report(vintegral(heat)) as "Total heat :: 1"
report(sintegral(normal(-k*grad(u)))) as "Total Flux :: 1"
end