Sie sind auf Seite 1von 9

Cooldt cool-down time calculator for multi-layers pipe

Cooldt calculate the cooling duration of a multi-layers pipe in a cold environment. The duration to reach the Final fluid
temperature or cool-down time (CDT) is calculated by solving the heat equation in cylindrical coordinates with a flux
conservative formulation.

Cold environment at Tambient

Layer 1

Warm
Layer 2
fluid

wall =hambient ( T wall T ambient ) Layer 3

Figure 1: Example of a multi-layers pipe

A typical plot of initial, final temperature profiles and the temperature decay at the fluid / solid interface is shown below.

Figure 2: Initial, final temperature profiles and temperature decay at the fluid / solid interface

Cooldt 2, January 2014 1/9 http://cooldt.sourceforge.net/


1 Features
Flux Conservative Formulation of Transient Heat Transfer
Automatic meshing and time step calculation (0.1% accuracy)
LibreOffice and Excel interfaces
Excel Add-in with Visual Basic interface
Gnuplot compatible output
32 and 64 bits versions

2 Requirements
Gnu/Linux or Windows (or any operating system if you compile Cooldt from source)
Recommended: LibreOffice or Excel
Optional: Gnuplot

3 Install Cooldt
Download Gnu/Linux 64 bits or Windows 32/64 bits binaries version and extract the archive.

To install the Excel Add-in, follow instructions from the link below.
http://office.microsoft.com/en-us/excel-help/load-or-unload-add-in-programs-HP010096834.aspx

For the 32 bits version of Excel select cooldt.xll and for the 64 bits version of Excel select cooldt-w64.xll. No administrative
privilege are required to install it.

4 Run Cooldt

4.1 LibreOffice or Excel


Open CooldtSheet.xls or CooldtSheet.ods, enter your data then click the Launch cooldt button.

Figure 3: Spreadsheet input

The cooldt executable and the spreadsheet must be in the same folder and the decimal separator must be the point (.)

On Windows, Cooldt can not run on an UNC path (i.e. a path starting with \\). Map your UNC path, or run Cooldt from a local
drive to solve this problem

4.2 Excel Add-in


The Excel Add-in provides a native Excel function to calculate cool-down time. It is very useful to calculate an insulation
thickness for a given cool-down time with the Excel solver. Avoid goal seek, it does not work very well with non-linear
functions. To use the CoolDownTime function, click on the fx button on the formula bar, select the Cooldt 2 category, select the
CoolDownTime function then enter your data. Examples of usage are presented on the CooldtSheet file.

Cooldt 2, January 2014 2/9 http://cooldt.sourceforge.net/


4.3 Command line interface
Type cooldt example.dat to calculate the cool-down time of the example.dat data file. Results will be saved to the
example.txt file.

Figure 4: Command line interface


Replace cooldt by cooldt-w64 if you are using the 64 bits version of Windows.

The data file is a text file with numbers separated by spaces or tabs. The file format is presented in the table below:

InitialTemp.(C) AmbientTemp.(C) FinalTargetTemp.(C) AmbientHeatTransfer(W/m2/K)

Pipe.ID(m) FluidConductivity.(W/m/K) FluidDensity(kg/m3) FluidHeatCapacity(J/kg/K)

Layer.1.OD(m) Layer.1.Conductivity.(W/m/K) Layer.1.Density(kg/m3) Layer.1.HeatCapacity(J/kg/K)

Layer.n.OD(m) Layer.n.Conductivity.(W/m/K) Layer.n.Density(kg/m3) Layer.n.HeatCapacity(J/kg/K)

Several files can be processed in one command, e.g. type cooldt file-1.dat file-2.dat file-3.dat to process
three files.

4.4 With Gnuplot (http://gnuplot.sourceforge.net/)


To generate png and svg plots from a Cooldt output file, use the gnuplot-script.gp script file with the Gnuplot command:
gnuplot -e "OutputFile='example.txt';" gnuplot-script.gp

4.5 Excel Visual Basic Interface


Cooldt can be called from Visual Basic. The declaration of the cooldt function and two examples of usage are given in the
CooldtVB file.

5 Build from Source

5.1 Gnu/Linux
Requirements:
Windows 32 bits build: MinGW gcc and g++ http://www.mingw.org/
Windows 64 bits build: MinGW-w64 gcc and g++ http://mingw-w64.sourceforge.net/
Gnu/Linux build: gcc http://gcc.gnu.org/

Build commands:
Gnu/Linux build: make -f Makefile
Windows 32 bits build: make -f Makefile PLATFORM=WIN32
Windows 64 bits build: make -f Makefile PLATFORM=WIN64

Cooldt 2, January 2014 3/9 http://cooldt.sourceforge.net/


If you have Code::Blocks installed, open the project file Cooldt.cbp and select one of these targets:
Linux build: Gnu/Linux
Windows 32 bits build: CrossWIN32
Windows 64 bits build: CrossWIN64

All Cooldt 2 binary releases have been built on Gnu/Linux with gcc, i586-mingw32msvc-gcc, i586-mingw32msvc-g++,
x86_64-w64-mingw32-gcc and x86_64-w64-mingw32-g++ version 4.6.3.

5.2 MS Windows
Requirements:
Windows 32 bits build: MinGW gcc and g++ http://www.mingw.org/
Windows 64 bits build: MinGW-w64 gcc and g++ http://mingw-w64.sourceforge.net/

I recommend:
To use the tdm installer for MinGW-w64 http://tdm-gcc.tdragon.net/
To install MinGW and/or MinGW-w64 in paths without spaces (i.e. not in C:\Program Files)

It is possible to install both MinGW and MinGW-w64 e.g. in C:\mingw32 and C:\mingw64 respectively. If so:
It is useless to install mingw32-make with MinGW-w64 (it is included with MinGW 32 bits)
Because both C:\mingw32\bin and C:\mingw64\bin are defined in %PATH%, use non ambiguous compilers names like
mingw32-gcc.exe and x86_64-w64-mingw32-gcc.exe

Build commands:
Windows 32 bits build: mingw32-make -f MakefileWindows.mak PLATFORM=WIN32
Windows 64 bits build: mingw32-make -f MakefileWindows.mak PLATFORM=WIN64

If you have Code::Blocks installed, open the project file Cooldt.cbp and select one of these targets:
Windows 32 bits build: WIN32
Windows 64 bits build: WIN64

6 Cooldt cool-down time calculator License


Copyright 2010, 2013, 2014, Benjamin DEGLO DE BESSES. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY Benjamin DEGLO DE BESSES "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Benjamin DEGLO DE BESSES OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

Cooldt includes XLW A Wrapper for the Excel API http://xlw.sourceforge.net

Cooldt 2, January 2014 4/9 http://cooldt.sourceforge.net/


7 Cooldt formulation
The heat equation in cylindrical coordinates is
( 2 r C p T ) T
t
=
r
2k r
r ( ) (1)

The flux per unitary length is given by


T
=2 k r (2)
r
See [1] for details.

7.1 Pipe discretization


The pipe is dividing in N cells delimited by N points indexed from 0 to N.

r(i-1/2) r(i) r(i+1/2)

r=0

i=0 i=2 i-1 i i+1 i = N-1 i=N

Figure 5: Pipe discretization with a cell centred nodes approach


Interfaces conductivities are given by the steady state solution
k i k i+1 ln (r i +1 /r i )
k i +1/ 2= (3)
k i ln (r i +1 / r i +1/ 2 )+ k i+ 1 ln (r i +1 /2 /r i )
Obviously
k i1 / 2=k i 1 / 21 (4)

At the pipe center (i = 0)


k +1/ 2=k 0 (5)

7.2 Flux Conservative Formulation


For one cell, flux at i - and i + interfaces are
T ip+1T i1
p +1
p+1
/2 =2 r i1/ 2 k i1/ 2
i1 (6)
r ir i1
And:

p+1 T i+p +11 T ip+1


i +1/ 2 =2 r i +1/ 2 k i+1 / 2 (7)
r i +1r i
Thus the flux conservative formulation is
T i ip+1 p+1
2 r i i Cpi = 1 / 2 i +1/ 2 (8)
t r i +1/ 2r i1 /2
See [2] and [4] for details.

Cooldt 2, January 2014 5/9 http://cooldt.sourceforge.net/


With
p 1 p
T i =T i T i (9)

The equation (8) can be rearranged and Si the surface of the cell i appears
Si
Ti

(r r2
)
i +1/ 2
2
i1 /2 i Cpi p+1
=i1 p+1
/ 2 i +1/ 2
(10)
t

7.2.1 At the Pipe Center (i = 0)


The equation (8) become
S0
Ti T p +1T 0p+1

r 2
1/ 2 0 Cp0 =2 r 1 / 2 k 1 / 2 1 (11)
t r1
If
0=0 (12)

And
0=S 0 0 Cp 0 (13)

And
2 r 1 / 2 k 1 / 2
0= (14)
r1
The equation (11) is equivalent to
0 p1
T 0 T 0p = 0 T 1p1T 0p 1 (15)
t
Consequently
B0 C0 D0
T T

[ 0 + t 0 ] t 0 +
[ t 0 ] t 1 = p p
0 (T 1 T 0 )
(16)

7.2.2 In Fluid and Pipe Layers (1 i N-1)


The equation (8) become
Si
p +1
T ip T ip+1T i1p+ 1
T T ip+1+1T ip+1 (17)
( r 2i +1/ 2r 2i1 /2 ) i Cpi i =2 r i 1 / 2 k i 1/ 2 +2 r i +1/ 2 k i+1 / 2
t r i r i1 r i +1r i
If
i =S i i Cpi (18)

And
2 r i 1 / 2 k i 1/ 2
i= = i1 (19)
r i r i 1
And
2 r i1/ 2 k i1/ 2
i = (20)
r i 1r i

Cooldt 2, January 2014 6/9 http://cooldt.sourceforge.net/


The equation (17) is equivalent to
i
T p1T ip =i T ip1T i1
p1 p1
i T i1 T ip1 (21)
t i
Consequently
Ai Bi Ci Di
T T T

[ t i ] ti 1 +
[ i + t( i + i) ] t i +
[ t i ] ti +1 = p p p p
i (T i1T i )+ i (T i +1T i )
(22)

7.2.3 At the Outer Boundary (i = N)


The equation (8) become
SN
T N T p+1T Np +1
2
( r r
N ) 2
N 1 /2 N Cp N =2 r N 1 /2 k N 1/ 2 N 1 p+1
+wall (23)
t r i r i1
With
p+1
+wall =2 r N hambient ( T Np+ 1T ambient ) (24)

If
N =S N N Cp N (25)

And
2 r N 1/ 2 k N 1 /2
N = = N 1 (26)
r N r N 1
And
N =2 r N hambient (27)

The equation (23) is equivalent to


N p+1 p p+1 p +1 p+1
(T N T N )= N (T N T N 1 ) N (T N T ambient ) (28)
t
Consequently
AN BN DN
T T

[ t N ] Nt 1 +
[ N + t( N + N )] t N = p p p
N (T N 1 T N )+ N (T ambient T N )
(29)

7.2.4 System of Equations


The following system of equation is build with equations (16), (22) and (29)

[ ] [ ][ ]
B0 C 0 0 0 T0
D0
A 1 B1 C 1 0 T1
D1
0 1

Ai Bi Ci = Di
t Ti (30)
0
0 AN 1 B N 1 C N 1 D
T N 1 N 1

0 0 AN BN D
TN N

T i
t

This non-symmetric tri-diagonal diagonally-dominant system is solved with a Thomas algorithm (see [3] for details).

Cooldt 2, January 2014 7/9 http://cooldt.sourceforge.net/


7.3 Steady State
All fluid cell are at the initial temperature
T i =T initial for i < number of fluid cells (31)

The virtual1 temperature at the fluid/solid interface is supposed to be the initial temperature
[ # i ] T i [ i ] T i1=[ # ] T initial with i = number of fluid cells (32)

With
2 ri k i
# = with i = number of fluid cells (33)
r i r i 1/ 2
The temperature gradient in solid layers is given by
[i ] T i1[ i i ] T i [ i ] T i1=0 for i > number of fluid cells (34)

And for the last node


[N ] T N 1[ N N ] T N = N T ambient if i = N (35)

A non-symmetric tri-diagonal system is build with (32), (34) and (35) then solved with a Thomas algorithm (see [3] for details) to
generate the initial temperature profile.

The steady state numerical solution match the analytic solution by design.

7.4 Implicit Time Integration

7.4.1 Backward Euler Method (cooldt v 0.5)

Ti
T ip1=T ip t (36)
t

7.4.2 Exponential Decay Method


The cool-down process is close2 to an exponential decay to the ambient temperature. As a consequence it is possible to calculate
Ti
decay constants i for each cells from the calculated values. Thus:
t
Ti
T ip + t T ambient
t
i= (37)
T i
t
Then next temperatures are calculated with:
p+1 p
T i =T ambient +(T i T ambient ) exp ( t / i) (38)

1 There is no node at the fluid/solid interface


2 Exact solutions of heat conduction in cylindrical coordinates are based on Bessel's function.

Cooldt 2, January 2014 8/9 http://cooldt.sourceforge.net/


7.4.3 Comparison of Methods
The figure below presents the comparison of the cool-down time calculated with these two methods.

10.3

10.2

Cool down time (h)


10.1 cooldt v0.5 cooldt v0.6, Time
step = 1000 s
10.0

9.9

9.8

9.7
5 50 500
Time step (s)

Figure 6: Cool-down time vs. Time step


The exponential decay method offer a very good accuracy with large time steps compared to the Euler backward method. The
exponential decay method is more than 100 times faster than the Euler backward method.

7.5 Accuracy Control


The accuracy control algorithm is shortly describe below:
a) Produce a first estimation of the calculated cool-down time (CDT) with 2 cells for the first layer (fluid), 1 cell for solid
layers and a large time step (1000 s)
b) Try to improve each parameter (i.e. double cell number or divide time step by 10) individually
c) Find the parameter which produce the bigger change (i.e. best improvement) of CDT, then keep only the parameter
change corresponding to the best improvement of CDT
d) While the relative change of CDT has not converged, go to step b

7.6 References
[1]. Bernard Eyglunent, Manuel De Thermique - Thorie Et Pratique, 2me dition, Hermes Science Publications
[2]. Suhas V, Patankar , Numerical Heat Transfer and Fluid Flow - Series in computational methods in mechanics and
thermal sciences , Hemisphere Publishing Corporation
[3]. http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm
[4]. http://en.wikipedia.org/wiki/Finite_volume_method

Cooldt 2, January 2014 9/9 http://cooldt.sourceforge.net/

Das könnte Ihnen auch gefallen