Modeling Heat Exchanger by FDM and FEM in C# and Comsol ...

6 downloads 0 Views 543KB Size Report
Modeling Heat Exchanger by FDM and FEM in C# and Comsol Multiphysics. Stepan Ozana. Martin Pies. Lukas Skovajsa. Radovan Hajovsky. VSB-Technical ...
Modeling Heat Exchanger by FDM and FEM in C# and Comsol Multiphysics Stepan Ozana Martin Pies Lukas Skovajsa Radovan Hajovsky

VSB-Technical University of Ostrava 17. listopadu 15/2172 708 33, Ostrava-Poruba [email protected]

Abstract The paper deals with modeling and simulation of the heat exchanger by means of finite difference method (FDM) and finite element method (FEM) in C# and Comsol Multiphysics environments. It refers to previously published papers on this problematic while introducing new approaches. The paper brings a short introduction of solution of above mentioned particular approaches in Comsol Multiphysics and C#.

In the basic form, the thermal model of a superheater is described by a set of the following partial differential equations (1)-(5), see [1]: 1



2

1−

+

1

= =

1[ 1

1

2[ 2

2

2−

+

1

]

(1)

+

2

]

(2)

=

2

(3)

where 1

=

1 1

,

1

1

=

1

1 1| 1|

(4)

and 2

=

2 2

,

2

=

2

m m m  s1 m  s1 J  m2 1 s K J  m2 1 1 s K 1

2. Modeling the Heat Exchanger in Comsol Multiphysics

1. Mathematical model



surface of wall per unit of length in x direction for steam Surface of wall per unit of length in x direction for flue gas Velocity of the steam in x direction Velocity of the flue gas in x direction Heat transfer coefficient between the wall and the steam Heat transfer coefficient between the wall and the flue gas

2

2 2| 2|

2.1. Preparing the equations for Comsol Multiphysics The equations (1)-(3) can be rewritten into basic form and it determines required coefficient of PDE (6)-(8) :

(5)

List of parameters: heat capacity of steam

heat capacity of superheater’s material

wall

weight of wall per unit of length in x direction active length of the wall steam flow mass rate flue gas flow mass rate

J kg  K1 J kg1  K1 J kg1  K1 1

heat capacity of flue gas

Comsol Multiphysics is first-class modeling and simulation environment for solving systems of timedependent or stationary second order in space partial differential equations in one, two, and three dimensions. There exist predefined so-called application modes which act like templates in order to hide much of the complex details of modeling by equations. There are two forms of the partial differential equations available, the coefficient form and the general form.

kg  m1 m kg  s1 kg  s1

+





=0

(6)

+





=0

(7)









=0 (8)

2.2. Solution of the project in Comsol Multiphysics The definition and solution of the task in Comsol Multiphysics consists of the following steps: a)selecting space dimension (1D,2D,3D) b)adding physics, see Figure 1 c)selecting study type (eigenvalue, stationary, time dependent) d)defining geometry e) defining coefficients of PDE

f)meshingg, computing, postprocessinng

Figure 1. Defining th he physics 2.3. Coefficiient form of the t PDE The taskk defined in this paper requires usee of coefficient foorm of PDE (99) as follows:

+ =

+



+



+

+ (9)

where

0 = 0 0 1 = 0 0 0 = 0 0

0 0 0 0 1 0 0 0 0

= 0 0

0 0 0 0 0 1 0 0 0 0 0 0 0 0 0

= 0 = 0 0 0 = 0 0 0 = 0 0

0 0 0



0

=

0 0 0

(10)







If we substitute thhe matrices (10) ( into genneral form of equuation (9), wee get: 1 0 0

0 1 0

0 0 ∙ 1 0

0 −

0 + 0 0

0

− − −



0 0 ∙ 0

+

0 = 0 (111) 0

Fig gure 2. Enttering matriices to defiine general form of diffe erential eq quation for the heat exc changer

2.4. Plotting the results Comsol Multiphysics offers a wide range of graphical outputs. We can display 2D plot of particular state variables over time or over x-axis or 3D graphs.

Figure 3. Steam temperature along the x-axis of the superheater in different times

Figure 6. 3D steam temperature distribution along x-axis and time by Comsol Multiphysics

3. Modeling in C# 3.1. Heat Exchanger Utility Within the frame of this project, the Heat Exchanger Utility has been created under C#. Besides standard functions of C#, it also uses a specialized library for solving a set of ODEs (ALGLIB).

Figure 4. Output steam temperature over the time

Figure 5. Steam temperature for x=20m over the time For example, as it can be seen from Figure 3, the heat exchanger is being heated by hot flue gases with time. We can also display time dependencies in a certain point, see Figure 4 and Figure 5.

Figure 7. Heat exchanger utility

Based on given parameters, it computes output temperature of the steam, flue gas and the wall. 3.2. ALGLIB Package ALGLIB [5] is a cross-platform numerical analysis and data processing library. It supports several programming languages (C++, C#, Pascal, VBA) and several operating systems (Windows, Linux, and Solaris). ALGLIB features include: ALGLIB package implement Runge-Kutta-CashKarp adaptive integrator to solve ordinary differential equations. Cash-Karp method uses six function evaluations to calculate 4-th and fifth-order accurate solutions. One of them is used to advance solution, another is used as the error estimate. Use of ALGLIB functions regarding solution requires rewriting a set of PDEs into a set of ODES, as it is introduced in [1]. Heat Exchanger utility computes the dynamic of the heat exchanger very effectively, using powerful graphical capabilities of ZedGraph, see [6].

heat transfer in heat exchangers. However, the license policy, prices of the products and portability make are the main drawbacks to spread these solutions into commercial field. At this moment, Heat Exchanger Utility makes it possible to enter the number of blocks connected in series. The main goal of its further development is to supply this product with graphical capabilities similar to Simulink. Blocks will be connected by the lines, and it will be possible to connect the blocks not only in series, but in arbitrary way, including feedbacks. The functionality of Heat Exchanger utility has been verified by comparison with the same model in Comsol Multiphysics. Acknowledgment The work was supported by the grant “Simulation of heat exchangers with the high temperature working media and application of models for optimal control of heat exchanger”', No.102/09/1003, of the Czech Science Foundation. References [1] NEVŘIVA, Pavel, OŽANA, Štěpán, VILIMEC, Ladislav. The Finite Difference Method Applied for the Simulation of the Heat Exchangers Dynamics. In MASTORAKIS, Nikos E., et al. RECENT ADVANCES IN SYSTEMS : Proceedings of the 13th WSEAS International Conference on SYSTEMS. [s.l.] : WSEAS Press, 2009. s. 109-114. July 22-24, Rhodes Island, Greece. ISBN 978-960-474-097-0. ISSN 17902769.

Figure 8. Output steam temperature computed by Heat Exchanger utility.

4. Conclusion The paper introduced new approaches to simulation of the dynamics of the heat exchanger described by a set of partial differential equations. Further development of the project will be devoted to low-cost solution using C# and extension of the Heat Exchanger utility. The Comsol Multiphysics and Matlab&Simulink environment, stated in [1], [2], [3], [4] are professional tools for modeling and simulation. They are especially efficient during development and tuning of the algorithms regarding modeling and simulation of the

[2] OŽANA, Štěpán, PIEŠ, Martin. Using Simulink S-Functions with Finite Difference Method Applied for Heat Exchangers. In MASTORAKIS, Nikos E., et al. RECENT ADVANCES IN SYSTEMS : Proceedings of the 13th WSEAS International Conference on SYSTEMS. [s.l.] : WSEAS Press, 2009. s. 210215. July 22-24, Rhodes Island, Greece. ISBN 978-960-474-097-0. ISSN 17902769. [3] Nevriva, P., Ozana, S., Pies, M., Vilimec, L. Dynamical Model of a Power Plant Superheater. In WSEAS Transactions on Systems 9 (7), pp. 774-783. Issue 7, Volume 9, 2010, dostupný z WWW:http://www.wseas.us/elibrary/transactions/systems/2010/89-878.pdf ISSN: 1109-2777 [4] Pryor, R. Multiphysics Modeling Using COMSOL: A First Principles Approach. Jones and Bartlett Publishers, 2011. [5] http://www.alglib.net/ [6] http://sourceforge.net/projects/zedgraph/