<< Click to Display Table of Contents >> 3d_thermocouple |
{ 3D_THERMOCOUPLE.PDE
This problem constructs a thermocouple inside a box.
It is the geometric construction only, there are no variables or equations.
Thermocouple rods are inserted exactly half way into the sphere. Rod tops are rounded.
Partial insertion is more difficult to generate the appropriate surfaces.
}
Title 'Thermocouple'
Coordinates Cartesian3
Definitions
len = 10 ! length of rods
rr = 1 ! radius of rods
rs = 3 ! radius of sphere
b = 1 ! box offset
d = 0.5 ! distance between rods
h = sqrt(rr^2 - (2*rs)^2) ! additional height from top of rod to center of sphere
c = len + h ! z value for center of sphere
xr = rr+d/2 ! x center for rods
zsphere = sphere((0,0,0),rs) ! top sphere surface at origin (untranslated)
rsphere1 = sphere((-xr,0,0),rr) ! rod1 sphere surface at z=0 (untranslated)
rsphere2 = sphere((xr,0,0),rr) ! rod2 sphere surface at z=0 (untranslated)
zrods = c ! regionally defined surface with default value of C
k = 1 ! regionally defined material property with default value of 1
Extrusion
Surface 'box bottom' z = -b
Surface 'rod bottom' z = 0
Surface 'sphere bottom' z = c - zsphere
Surface 'rod top' z = zrods
Surface 'sphere top' z = c + zsphere
Surface 'box top' z = c + rs + b
Boundaries
Region 'box'
start(b+rs,b+rs)
line to (-b-rs,b+rs) to (-b-rs,-b-rs) to (b+rs,-b-rs) to close
Limited Region 'sphere'
layer 3 k = 2
layer 4 k = 2
start(rs,0)
arc(center=0,0) angle = 360
Limited Region 'rod1'
zrods = c + rsphere1
layer 2 k = 3
layer 3 k = 3
start(-xr,rr)
arc(center=-xr,0) angle = 360
Limited Region 'rod2'
zrods = c + rsphere2
layer 2 k = 4
layer 3 k = 4
start(xr,rr)
arc(center=xr,0) angle = 360
Plots
glgrid(x,y,z) on region 'rod1' on region 'rod2'
glgrid(x,y,z) on region 'sphere' on region 'rod1' on region 'rod2'
grid(x,y,z) on region 'rod1' on region 'rod2'
grid(x,y,z) on region 'sphere' on region 'rod1' on region 'rod2'
grid(x,y,z)
grid(x,z) on y=0
End