﻿ Sample Problems > Applications > Heatflow > 3d_bricks+time

# 3d_bricks+time

Navigation:  Sample Problems > Applications > Heatflow >

# 3d_bricks+time   {  3D_BRICKS+TIME.PDE

This problem demonstrates the application of FlexPDE to time-dependent

three dimensional heat conduction.  An assembly of bricks of differing

conductivities has a gaussian internal heat source, with all faces held

at zero temperature.  After a time, the temperature reaches a stable

distribution.

This is the time-dependent analog of example problem 3D_BRICKS.PDE.

}

title 'time-dependent 3D heat conduction'

select

regrid=off { use fixed grid }

ngrid=5     { smaller grid for quicker run }

coordinates

cartesian3

variables

Tp(threshold=0.1)   { the temperature variable, with approximate size  }

definitions

long = 1

wide = 1

K   { thermal conductivity -- values supplied later }

Q = 10*exp(-x^2-y^2-z^2)   { thermal source }

tmax = 6                   { plot range control }

initial values

Tp = 0.

equations

Tp : div(k*grad(Tp)) + Q = dt(Tp)   { the heat equation }

extrusion z = -long,0,long     { divide Z into two layers }

boundaries

Surface 1 value(Tp)=0       { fix bottom surface temp }

Surface 3 value(Tp)=0       { fix top surface temp }

Region 1   { define full domain boundary in base plane }

k = bylayer (1.0, 0.1) { bottom and top right brick }

start(-wide,-wide)

value(Tp) = 0         { fix all side temps }

line to (wide,-wide)   { walk outer boundary in base plane }

to (wide,wide)

to (-wide,wide)

to close

Region 2   { overlay a second region in left half }

k = bylayer (0.2, 0.4) { bottom and top left brick }

start(-wide,-wide)

line to (0,-wide)     { walk left half boundary in base plane }

to (0,wide)

to (-wide,wide)

to close

time 0 to 3 by 0.01 { establish time range and initial timestep }

monitors

for cycle=1

contour(Tp) on z=0 as "XY Temp" range=(0,tmax)

contour(Tp) on x=0 as "YZ Temp" range=(0,tmax)

contour(Tp) on y=0 as "XZ Temp" range=(0,tmax)

elevation(Tp) from (-wide,0,0) to (wide,0,0) as "X-Axis Temp" range=(0,tmax)

elevation(Tp) from (0,-wide,0) to (0,wide,0) as "Y-Axis Temp" range=(0,tmax)

elevation(Tp) from (0,0,-long) to (0,0,long) as "Z-Axis Temp" range=(0,tmax)

plots

for t = endtime

contour(Tp) on z=0 as "XY Temp" range=(0,tmax)

contour(Tp) on x=0 as "YZ Temp" range=(0,tmax)

contour(Tp) on y=0 as "XZ Temp" range=(0,tmax)

histories

history(Tp) at (wide/2,-wide/2,-long/2)

(wide/2,wide/2,-long/2)

(-wide/2,wide/2,-long/2)

(-wide/2,-wide/2,-long/2)

(wide/2,-wide/2,long/2)

(wide/2,wide/2,long/2)

(-wide/2,wide/2,long/2)

(0,0,0) range=(0,tmax)

end