export_history

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Import_Export >

export_history

Previous pageReturn to chapter overviewNext page

{ EXPORT_HISTORY.PDE  

 

 This example illustrates use of the FORMAT modifier in the export of a

HISTORY plot.  

 

 The repeat (#R) construct is used to create a comma-delimited data list.  

 

 The problem is the same as FLOAT_ZONE.PDE.

 

}  

 

title  

"FORMATTED HISTORY EXPORT"  

 

coordinates  

 xcylinder('Z','R')  

 

select  

 cubic         { Use Cubic Basis }  

 

variables  

 temp (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))  

 

initial value  

 temp = Ta  

 

equations  

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

 

boundaries  

region 1  

  start(0,0)  

  natural(temp) = 0 line to (long,0)  

  value(temp) = Ta line to (long,1)  

  natural(temp) = -H*(temp - Ta) line to (0,1)  

  value(temp) = Ta line to close  

feature  

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

 

time -0.5 to 19 by 0.01  

 

monitors  

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

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

contour(temp)  

 

plots  

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

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

 

histories  

{ EXPORT a formatted HISTORY file: }  

  history(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) export format "#t#r,#i"  

 

end