initialeq

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Sequenced_Equations >

initialeq

Previous pageReturn to chapter overviewNext page

{  INITIALEQ.PDE

 

  This example illustrates use of the INITIAL EQUATIONS section.

  It is s modification of the FLOAT_ZONE.PDE example that first

  solves for a gaussian initial temperature distribution.

}

 

title "Float Zone"

 

coordinates xcylinder('Z','R')

 

variables

 temp (threshold=100)

 temp2(threshold=100)

 

definitions

 k = 0.85     {thermal conductivity}

 cp = 1       { heat capacity }

 long = 18

 H = 0.4       {free convection boundary coupling}

 Ta = 25       {ambient temperature}

 A = 4500     {amplitude}

 

 source = A*exp(-((z-1*t)/.5)^2)*(200/(t+199))

 

 tsource = time_integral(vol_integral(source))

 t1 = time_integral(1.0)

 

initial value

 temp = Ta

 temp2 = Ta

 

initial equations

 Temp:  div(k*grad(temp)) + A*exp(-(z-long/2)^2)= 0

 

equations

 Temp:  div(k*grad(temp)) + source = cp*dt(temp)

 Temp2:  div(k*grad(temp2)) + source = cp*dt(temp2)

 

boundaries

region 1

start(0,0)

  natural(temp) = 0

  natural(temp2) = 0

line to (long,0)

  value(temp) = Ta

  value(temp2) = Ta

line to (long,1)

  natural(temp) = -H*(temp - Ta)

  natural(temp2) = -H*(temp2 - Ta)

line to (0,1)

  value(temp) = Ta

  value(temp2) = Ta

line to close

 

feature

start(0.01*long,0) line to (0.01*long,1)

 

time -0.5 to 19

 

monitors

for t = -0.5 by 0.5 to (long + 1)

elevation(temp, temp2) from (0,1) to (long,1) range=(0,1800) as "Surface Temp"

contour(temp)

contour(dt(temp))

contour(temp2)

 

plots

for t = -0.5 by 0.5 to (long + 1)

elevation(temp, temp2) from (0,0) to (long,0) range=(0,1800) as "Axis Temp"

 

histories

history(temp,dt(temp)) at (0,0) (1,0) (2,0) (3,0) (4,0) (5,0) (6,0) (7,0) (8,0)

                  (9,0) (10,0) (11,0) (12,0) (13,0) (14,0) (15,0) (16,0)

                  (17,0) (18,0)

history(temp2,dt(temp2)) at (0,0) (1,0) (2,0) (3,0) (4,0) (5,0) (6,0) (7,0) (8,0)

                  (9,0) (10,0) (11,0) (12,0) (13,0) (14,0) (15,0) (16,0)

                  (17,0) (18,0)

  history(t1) as "Tintegral(1)"

  history(tsource) as "Tintegral(Source)"

 

end