MATHEMATICAL METHODS, COMPUTATIONAL TECHNIQUES, INTELLIGENT SYSTEMS
The applications of the non-linear equations systems algorithms for the heat transfer processes CRISTIAN PATRASCIOIU1, CRISTIAN MARINOIU2 1 Control and Computer Department 2 Informatics Department Petroleum – Gas University of Ploiesti Ploiesti, 39 Bd. Bucuresti, 100680 ROMANIA 1
[email protected] 2
[email protected] Abstract: The paper presents the author’s researches in the heat transfer mathematical models and in the implementation of the numerically algorithms for solving the non-linear equations systems. The article has three parts. In the first part is presented the mathematically model of the heat exchanger. The second part is dedicated to study of the numerically algorithms for solving the non-linear equations systems. The authors have studied three algorithms: the Newton-Raphson algorithm based on analytically expressions of the Jacobean matrix, the Newton-Raphson algorithm based on numerically values of the Jacobean matrix and the Broyden algorithm. The last part contains an analysis of the performances of theses algorithms in rapport of calculus effort and calculus precision criteria. Key-Words: non-linear equations system, Newton-Raphson algorithm, Broyden algorithm, mathematical modeling, heat exchanger, numerically analyze studied, modeled and simulated the shell and tube heat exchanger having fluxes in counter flow. In figure 1 is presented a section of the shell and tube heat exchanger [3].
1 Introduction The mathematical modelling of the chemical processes represents an important problem for the process design and for the chemical process operating. A class of the chemical processes is represented by the heat transfer processes. The authors have studied the heaters process and they have modeled the radiation section of the tubular heater [1]. The researches have permitted for the authors to building the statically characteristics of the tubular heater there and have contributed to developed the optimal combustion control structure [2]. In the last years, the authors have studied the modeling of the heat exchanger, for design the control systems which contained heat exchangers [3]. On important problem of the heat exchangers modeling is the mathematical algorithm used to solve the model. Because the mathematical model of these processes is an equations system, the authors have studied the algorithms used to solve the model.
Fig. 1 The shell and tube heat exchanger section The heat exchanger is characterized by four inlet and two outlet variables, figure 2. The inlet variables are: Th1, Qhot – the input hot temperature and the hot flow rate, Tcl, Qcold – the input cold temperature and the flow rate of cold fluid. The outlet variables are: Th2 - the outlet temperature of the hot fluid, Tc2 – the outlet temperature of the cold fluid.
2 The structure and the mathematical model of the heat transfer process A most important class of the heat transfer processes is defined by the heat exchangers. The authors have
ISSN: 1790-2769
30
ISBN: 978-960-474-188-5
MATHEMATICAL METHODS, COMPUTATIONAL TECHNIQUES, INTELLIGENT SYSTEMS
heat balance equation associated with the hot flow and the cold flow and the Delaware model of the heat exchanger [4]. The compact form of the mathematical model of the exchanger is a non-linear equation system with two equations and two variables
f1 (Th 2 ,Tc 2 ) = 0 . f 2 (Th 2 ,Tc 2 ) = 0
Fig. 2 The shell and tube heat exchanger structure
(1)
The non – linear functions of the equations system (1) are in the next form:
Mathematical model of heat exchanger consists into
f1 = Qhot cp,hot(Th1 −Th2 ) −Qcold cp,cold(Tc2 −Tc1) ;
f 2 = Qhot c p ,hot (Th1 − Th 2 ) − kA
(2)
(Th1 − Tc 2 ) − (Th 2 − Tc1 ) . ln
3 The algorithms used to solving the non-linear equation systems
n ∂f f ( X ) ≈ f X (0 ) + ∑ j =1 ∂x j
(
Let the non-linear equation system
f1 ( x1 , x 2 ,K x n ) = 0 f ( x , x ,K x ) = 0 2 1 2 n , f n ( x1 , x 2 ,K x n ) = 0
n ∂f fi ( X ) ≈ fi X (0) + ∑ i ∂x j j =1
( )
(5)
(
∂f1 ∂x 1 ∂f 2 J ( X ) = ∂x1 L ∂f n ∂x1
The vector F contains the n functions defined into non-linear equation system (4) (7)
The equation system solution may be approximated using the successive calculations, started at initial estimation
[
]
(9)
× ∆x j , i = 1,K,n . (10)
) (
)
(11)
∂f1 ∂x2 ∂f 2 ∂x2 L ∂f n ∂x2
∂f1 ∂x n ∂f 2 L ∂x n . L L ∂f n L ∂x n L
(12)
(8) The applications of the Newton method are the Newton – Raphson algorithm and the Broyden algorithm.
The solution of the non-linear system (1) is determinated using the Newton method [5]. This method is based on the Taylor linear approximation formula
ISSN: 1790-2769
× ∆x j .
The J ( X ) represents the Jacobean matrix associated to non-linear equation system (4)
(6)
T X (0 ) = x1(0 ) , x 2(0 ) ,K , x n(0 ) .
X = X ( 0)
F ( X ) = F X (0 ) + J X (0 ) ∆X .
where the X vector represents the non-linear equation system variables
F T = [ f1 , f 2 ,K , f n ] .
X = X (0 )
Using the matriceal components defined into relations (6) and (7), the relation (10) will have a new form
respectively
X T = [x1 , x 2 ,K , x n ] .
)
If will generalized the Taylor linear approximation on the all n functions of the system (4) will be obtained (4)
F (X ) = 0 ,
(3)
Th1 − Tc 2 Th 2 − Tc1
31
ISBN: 978-960-474-188-5
MATHEMATICAL METHODS, COMPUTATIONAL TECHNIQUES, INTELLIGENT SYSTEMS
(
∆X (k ) = − J X (k )
3.1 The Newton - Raphson algorithm The Newton-Raphson algorithm consists into new approximation of the solution of the non-linear equation system, approximation defined by relation
X (k +1) = X (k ) + ∆X (k ) .
(
)
(
k
(15)
{X ( ) , X ( ) , K , X ( ) ,K} of the system solution 0
The correction vector ∆X (k ) is obtained using the equation (11), where F ( X ) = 0 , respectively
( )
−1
The numerical values of the solution (15) are obtained by using the Gauss algorithm. The convergence conditions of the array
(13)
J X k ∆X (k ) = − F X (k ) .
) F (X ( ) ) .
1
k
estimations are presented in [5]. The stop criteria of the Newton-Raphson algorithm is formulated by the relations
(
)
f i X (k ) ≤ ε i , i = 1,K , n .
(14)
)
If the Jacobean matrix J X (k ) is a non-singular matrix, the solution of the linear system (14) has the form
(16)
The Jacobean matrix associated to non-linear equations system (1) has the following components:
∂f1 = −Qhot c p ,hot ; ∂Th 2
(17)
∂f1 = −Qcold c p ,cold ; ∂Tc 2
(18)
∂f 2 = −Qhot c p ,hot − k ed A ∂Th 2
∂f 2 = − k ed A ∂Tc 2
ln
− ln
Th1 − Tc 2 Th1 − Th 2 + Tc1 − Tc 2 − Th 2 − Tc1 Th 2 − Tc1 Th1 − Tc 2 ln − T T 2 1 h c
Th1 − Tc 2 Th1 − Th 2 + Tc1 − Tc 2 − Th 2 − Tc1 Th1 − Tc 2 Th1 − Tc 2 ln Th 2 − Tc1
2
The most important disadvantage of the NewtonRaphson method consists into calculating effort to evaluate the n 2 elements of the Jacobean matrix
( ) ( )
(19)
.
(20)
(
(
)
i = 1,K , n; j = 1, K , n .
(
)
(22)
3.3 The Broyden algorithm
The authors have studied the estimation of the partially derivates of the functions f 1 , f 2 ,K , f n of the nonlinear system (4). For the current point X have been defined the small variations
)
f i x1(k ) , K, x (jk ) + h (jk ) , K , x n(k ) − f i X (k −1) ∂f i = , ∂x j h (jk )
3.2 The numerical evaluation of the Jacobean matrix
ISSN: 1790-2769
;
For evaluation of the Jacobean matrix (12) in the point X ( k ) , the authors have used the general relation for the evaluation of the element of the Jacobean matrix
J X (k ) and the n functions of the vector F X (k ) [7].
hi(k ) = 0.0001 × xi(k ) , i = 1,K , n .
2
The Broyden algorithm reduces the Jacobean elements calculus effort using the approximation of the Newton-Raphson Jacobean matrix:
(k )
(21)
32
ISBN: 978-960-474-188-5
MATHEMATICAL METHODS, COMPUTATIONAL TECHNIQUES, INTELLIGENT SYSTEMS
∆F A(k ) = A(k −1) +
(k ) − A(k −1) ∆X (k ) T ∆X (k ) , (23) ( k) 2 || ∆X ||
(
(
where A (0 ) = J X (0 ) relation
(
)
)
(A + uv ) T
) (
)
−1
(25)
where A is a nonsingular matrix (n × n ) ; v and u are n dimensional vectors with the property v T A −1 u ≠ −1 . The authors have considered the following expressions for the u and v variables:
and ∆F (k ) is defined by
∆F (k ) = F X (k ) − F X (k −1)
A −1 u v T A −1 =A − , 1 + v T A −1 u
−1
(24)
and
∆X (k ) = X (k ) − X (k −1) . The A (k ) matrix most to satisfy the properties:
u=
∆F (k ) − A(k −1) ∆X (k ) ; || ∆X (k ) ||2
(
(26)
)
v T = ∆X (k ) .
a) To verifying the equation
J ( X (k ) ) ∆X (k ) = ∆F ( X (k ) ) ;
T
(27)
Using the new variables u and v, the relation (23) will have the form
b) To minimizing the difference
A(k ) = A(k −1) + u v T .
min || A − A (k −1) || . A
(28)
Using (25) into (28) formula is obtained a new form of the inverse of the matrix A (k )
Theses two properties of the matrix A (k ) have demonstrated in [6]. The stop criteria of the Broyden algorithm are similarly to the stop criteria of the Newton-Raphson algorithm. The steps of the Broyden algorithm are described below [7]:
(A( ) ) = (A( k −1
(
= A (k −1)
Step 1. Variables initialization
(
)
(
)
k = 0 , A ( 0 ) = J X ( 0 ) , F ( 0 ) = F X (0 ) .
(
)
−1
F (0 ) .
(
A(k ) = A(k −1) +
T ∆F (k ) − A(k −1)∆X (k ) ∆X (k ) ; k) 2 ( || ∆X ||
(
( )
−1
(
k −1 −1
u v T A (k −1) −1 1 + v T A (k −1) u
−1
(
• u=
• X (k +1) = X (k ) − A (k )
=
(
)
)
−1
.
)
)
∆F (k ) − A(k −1) ∆X (k ) ; || ∆X (k ) ||2
(
• v T = ∆X (k )
( ) (
• A (k )
F (k ) .
Step 4. Stop
−1
)
T
;
= A(k −1)
( A( ) ) ) −
k −1 −1
(
u v T A(k −1) −1 1 + v T A(k −1) u
−1
( )
• X (k +1) = X (k ) − A (k )
The major disadvantage of the Broyden algorithm is represented by the evaluation of the inverse matrix
−1
(
)
)
−1
;
F (k ) .
All the modifications have contributed to increase the performances of the Broyden algorithm.
A (k ) for each iteration k ≥ 1 . A better solution of
this problem has been defined by Sherman-Morrison [7]. The original form of the Sherman-Morrison formula is
ISSN: 1790-2769
(29)
• F ( k ) = F X (k ) ;
)
•
−1
• k = k + 1;
• k = k + 1;
F ( k ) = F X (k ) ;
( A( ) ) ) −
)
Step 3. While the stop criterion has false value does:
Step 3. While the stop criterion has false value does:
•
+ u vT
With this result, the third step of the Broyden algorithm is transformed in a new form:
Step 2. Initialization using the Newton-Raphson algorithm
X (1) = X (0 ) − A (0 )
k −1)
33
ISBN: 978-960-474-188-5
MATHEMATICAL METHODS, COMPUTATIONAL TECHNIQUES, INTELLIGENT SYSTEMS
to solving the non-linear equation system are made by the authors [8].
4 The results of the simulation of the heat transfer process
The shell and tube heat exchanger used by the authors is described in [3, 9]. For the structure showed in figure 2, the heat exchanger is characterized by the next input data: Qh = 165000 kg/h;
The authors have elaborated the numerical programs destined to simulation of the shell and tube heat exchanger. The programs have a modular structure which contained: a) the sub-algorithms for reading the input data file (the geometrically heat exchanger data, the properties and the operating parameters of the heat and cold fluid); b) the sub-algorithm for solving the non-linear equation system; c) the main module (the input data reading and the heat transfer algorithm.
Qc = 50000 kg/h; Th1 = 180 °C; Tc1 = 103 °C. For all the algorithms the stop criteria parameter (16) has the value ε i = 10 5 , i = 1, 2 kJ/h, and the initial solution has the components: x1(0 ) = 160°C ,
x 2(0 ) = 130°C . For the Newton – Raphson
The authors have elaborated three numerical programs, differentiated by the sub-algorithm used to solve the non-linear equation systems. First program uses the Newton-Raphson algorithm with the analytically expressions of the Jacobean matrix. The second program implemented the NewtonRaphson algorithm with the numerically expressions of the Jacobean matrix. The last program is based on the Broyden algorithm. All the sub-algorithms used
algorithm which uses the numerically expressions for evaluation of the Jeacobean matrix, the values of the small variation (24) are hi = xi × 10 −4 °C. The results obtained with the three numerical programs are presented in table 1.
Table 1. Comparative results to solver the non-linear equation system of the heat exchanger
Algorithm The Newton-Raphson algorithm based on analytically expressions of the Jacobean matrix The Newton-Raphson algorithm based on numerically values of the Jacobean matrix The Broyden algorithm
Iteration
9
2
6
The solution of the non-linear equations system presented in [9] is x1 = 140°C and x 2 = 118°C . For the initial solution assumed by the authors and for the stop criterion presented allow, the solution of the non-linear equation system is obtained in various iterations depending of the algorithm. The program based on the Newton-Raphson algorithm determines the most exactly solution in the bigger iteration number. For the system (1), the NewtonRaphson algorithm based on numerically values of the Jacobean matrix is the most quickly. All the
ISSN: 1790-2769
The variable of the system 1
x × 10 −2
f
[°C]
[kJ/h]
1.39137
0.00000E+00
2
1.18480
-6.27496E+04
1
1.38815
-7.01904E-04
2
1.18602
1.80675E+02
1
1.38758
1.40269E+04
2
1.18579
9.36209E+03
obtained solutions are concentrated around the point Th 2 = 139°C and Tc 2 = 118°C . The influence of the stop criteria parameter to the precision of the solution of the non-linear equation system is presented in table 2. The conclusions of numerical analysis are following: a) The decrease of the stop criteria value will increase the calculus precision; will decrease the values of the functions f1 and f 2 and will increase the number of iteration.
34
ISBN: 978-960-474-188-5
MATHEMATICAL METHODS, COMPUTATIONAL TECHNIQUES, INTELLIGENT SYSTEMS
b) Although the numerical values of the functions f1 and f 2 decrease at once by the stop criteria value, the modification of the solution of the non-linear equations system is very small, that
the supplementary calculus effort is not justified.
Stop criteria value [kJ/h]
Equation of the system
Table 2. The influence of the stop criteria value on the solution of the non-linear equations system solved by the Newton-Raphson algorithm
10 5
1 2 1 2 1 2 1 2
10 4 10 3 10 2
x × 10 −2
f
[°C]
[kJ/h]
1.39137 1.18480 1.38850 1.18589 1.38820 1.18601 1.38816 1.18602
0.00000E+00 -6.27496E+04 -3.051757E-05 -6.53380E+03 0.00000E+00 -6.73119E+02 6.10351E-05 -6.92686E+01
Because the errors between the values of the solutions obtained by using the three algorithms and the original solution are very small, the authors consider that the mathematical model of the heat exchanger, the algorithms for the solving the nonlinear equations systems and the numerical programs are validated.
[2]
[3]
4 Conclusion The article presents the author’s researches of the applications of the numerical algorithm for heat processes. For the heat exchanger, the mathematical model is represented by a non-linear equations system. For solving the mathematical model, the authors have studied three algorithms: the NewtonRaphson algorithm based on analytically expressions of the Jacobean matrix, the NewtonRaphson algorithm based on numerically values of the Jacobean matrix and the Broyden algorithm. The authors have analyzed the performances of theses algorithms in rapport of calculus effort and calculus precision criteria.
[4]
[5] [6] [7] [8]
[9]
References: [1] Pătrăşcioiu C., Marinoiu V., Advanced Control System for the tubular heaters of the vacuum and crude unit - I. Mathematic Modelling of the
ISSN: 1790-2769
35
Iteration number
9 12 15 18
Combustion and Heat Transfer, Revista de chimie nr.4, 1997 (Romanian). Pătrăşcioiu C., Marinoiu V., Modelling and Optimal Control of an Industrial Furnace DYCOPS-5, 5th IFAC Symposium on Dynamics and Control of Process Systems, Corfu, Grecee, June 8-10, 1998. Patrascioiu C., The Steady-State Modelingand Simulationof a Heat Exchenger, Petroleum-Gas University of Ploiesti Bulletin, Technical Series, Vol LXI, No. 3. 2009. Serth, De R. W., Process heat transfer: principles and applications, ISBN 978-0-12373588-1, Elsevier Ltd, p.189-195, 2007. Demidovich B. P., Maron I.,A., Computational mathematics, Mir Publishers , Moscow, 1981. http://infohost.nmt.edu/~travdog8/FINALMath 518.pdf http://math.fullerton.edu/mathews/n2003/Broyd enMethodMod.html Patrascioiu C., Numerical methods applied in chemical engineering – PASCAL applications, MatrixRom, Bucuresti, p.117-124, 2005 (Romanian). Dobrinescu D., Heat transfer procesees and specific devices, Editura Didactica si Pedagigica, Bucuresti, p. 343-349, 1983 (Romanian).
ISBN: 978-960-474-188-5