SHAPE OPTIMISATION OF HEAT EXCHANGER

Christopher Iliffe Sprague


ABSTRACT

This paper examines the design optimization of a repeating two-dimensional heat exchanger section. Focus is particularly directed upon a heat exchanger section with a variable top surface shape, and straight bottom, left, and right sides. The heat exchanger’s top surface is parametrized by a mathematical model, subject to section continuity and vertical thickness constraints. Its geometry is discretized into a mesh from which the heat flux per unit length is computed through finite-volume methods. Different optimization algorithms and mesh resolutions are examined in regard to their performance in maximizing the heat exchanger’s flux per unit length. It is shown that through the optimization of different mathematical characterizations of the heat exchanger’s top surface that, in fact, a heat flux per unit length greater than 35% of the nominal value from a flat top surface is possible, while abiding to thickness constraints.

Contents

1 Method
 1.1 Finite Volume
 1.2 Green-Gauss Theorem
2 Parametrization
 2.1 Top Surface Geometry
 2.2 Problem Requirements
3 Optimization
 3.1 Problem Formulation
 3.2 Solvers
4 Implementation
 4.1 Dynamic Coefficient Creation
 4.2 Work Flow
5 Results
 5.1 Initial Findings
 5.2 Interior-Point Optimizer
 5.3 Sequential Quadratic Programming
6 Conclusions
7 Tables
8 Source Code

List of Tables

Interior Point Optimizer Performance

List of Figures

Dynamic Coefficient Creation
IPOPT with 6 coefficients and 100 node resolution
IPOPT with 6 coefficients and 200 node resolution
IPOPT with 5 coefficients and 200 node resolution
SQP with 6 coefficients and 200 node resolution

Listings

1 Method
 1.1 Finite Volume
 1.2 Green-Gauss Theorem
2 Parametrization
 2.1 Top Surface Geometry
 2.2 Problem Requirements
3 Optimization
 3.1 Problem Formulation
 3.2 Solvers
4 Implementation
 4.1 Dynamic Coefficient Creation
 4.2 Work Flow
5 Results
 5.1 Initial Findings
 5.2 Interior-Point Optimizer
 5.3 Sequential Quadratic Programming
6 Conclusions
7 Tables
8 Source Code

1.

1 Method

In the context of a two dimensional heat exchanger without heat generation, convention leads to the use of the partial differential equation in Cartesian coordinates:

∂2T   ∂2T
∂x2-+ ∂y2-= 0
(1)

Through Fourier’s law, the heat flux associated with the heat exchanger’s temperature profile, T(x,y), and thermal conductivity, k, becomes:

q = - k∇T
(2)

However, when examining a heat exchanger optimization problem with a rather irregular geometrical structure, it is significantly more convenient to use methods which allow for unstructured meshes. One of such methods is the finite volume method, which essentially allows one to represent and evaluate partial differential equations, such as Equation 1, in the form of algebraic equations.

1.1.

1.1 Finite Volume

Through the finite volume method, values must be calculated at discrete places, otherwise known as nodes, within a meshed geometry [?]. Sub-dividing the heat exchanger’s spatial domain into finite volumes (i.e. cells), for a particular cell, i, the volume integral can be taken over the total volume of the cell, vi. This results in the problem’s partial differential equation transforming as follows:

               ∮
             1-
∇ ⋅f(u ) = 0 ⇒ vi si f(u)⋅ndS = 0
(3)

where u represents a vector of states, f represents the flux tensor, si represents the total surface area of the cell, and n represents the unit vector normal to the surface of the cell pointing outward.

1.2.

1.2 Green-Gauss Theorem

In the case of generally unstructured grid meshes, it is no longer feasible to compute the gradient of a scalar at a given volume centroid using the definition of derivatives. Rather, it is convenient to implement the conventional Green-Gauss theorem [?]. This theorem states that the surface integral of a scalar function is equal to the volume integral of the gradient of the scalar function; in mathematical representation:

∫          ∫
 V ∇ϕdV  =  SϕndS
(4)

where n is the surface normal pointing out from the volume, ϕ is a scalar, S is the surface, and V is the volume. After assuming the gradient of the scalar, ϕ, is constant over the control volume and that the integral over the surface can be represented as a summation of the average scalar value in each face multiplied by the face’s surface vector, the theorem can be reformulated as follows:

        N
∇ϕ = -1∑   ϕS
     V  i=1  i i
(5)

Using this methodology, the horizontal derivatives are used to correct the fluxes along the heat exchanger’s faces, that have both horizontal and vertical components to the face normal. After applying Dirichlet boundary conditions to both the top and bottom surfaces of the heat exchanger’s geometry and applying the Green-Gauss discretization to the geometry’s mesh, the heat flux per unit length can be computed.

2.

2 Parametrization

2.1.

2.1 Top Surface Geometry

In the effort to optimize the shape of the heat exchanger’s top surface, it is fitting to apply some sort of mathematical model. Given that this particular problem requires that the shape’s boundary conditions on both the left and right sides be periodic to allow continual section addition, it is convenient to select a mathematical model that is innately periodic, namely a sin series. The general form of a sin series representing the heat exchanger’s vertical thickness as a function of horizontal distance, h(x), can be shown as follows:

             ∑N      ( 2π(n - 1)x)
h (a,x) = a1 +   ansin  ---Lx-----
             n=2
(6)

where [a1,,an]T represents the coefficient vector, N represents the number of coefficients, and Lx is the horizontal width of the heat exchanger as a whole. In the programming language of MATLAB, this formulation culminates in the form of the class instance function shown in function ts = Surface(obj, a) of Listing 4, that generates a discretized mesh of the heat exchanger’s top surface in accordance to variable size vector of coefficients.

2.2.

2.2 Problem Requirements

As required by the given problem, the heat exchanger is asserted to have several constant preexisting properties, namely: a horizontal width, Lx, of 5 cm, a thermal conductivity, κ, of 20 W-⋅m-
 ∘K, and a minimum and maximum vertical thickness, h(x), of 1 cm and 5 cm respectively. Beyond intrinsic parameters, the environment is modelled to assert a bottom and top temperature of T1 = 90K and T2 = 20K respectively. This environmental model closely represents the application of a radiator, in which it is desired to transfer heat from hot water, designated by T1, to air, designated by T2.

3.

3 Optimization

3.1.

3.1 Problem Formulation

Essentially, the goal of this study is to maximize the heat exchanger’s flux per unit length through alteration of its top surface shape, while abiding to constraints. In the conventional generalization of optimization problems, one has an objective function to be minimized, subject to inequality constraints, equality constraints, and domain bound constraints. In the case of the heat exchanger, this problem boils down to the following formulation:

m inimize  Flux(a)
   a
subjectto 1 cm ≤ h(a,x) ≤ 5cm
(7)

where Flux(a) represents the flux per unit length as a function top surface geometry determined by the coefficient vector, a = [a1,...,aN]T, and the thickness at any point along the top surface, h(a,x) is within constraints. The MATLAB implementation of this formulation is shown in the objective function, function f = Neg_Flux(obj, a), and the constraint function, function [c, ceq] = Thickness_Limit(obj, a) of Listing 4.

3.2.

3.2 Solvers

In this paper MATLAB’s fmincon is used to assess the effectiveness of different optimization algorithms, namely: interior point method, active set method, and sequential quadratic programming. The interior point method is capable handling large, sparse problems, as well as small dense problems, and is able to satisfy bounds at each iteration [?]. Sequential Quadratic Programming is an iterative method for nonlinear optimization, which is typically used on problems in which the objective function and the constraints are twice continuously differentiable [?]. The active set method, in general, is faster than the two aforementioned algorithms; however it takes large steps, as it is suited for large scale problem, which may lead inaccurate minima determination [?], and thus will herein escape the scope of this paper. In use, the user’s discretion determines the algorithm used by passing its string designation to the function, function [aopt, fval] = Optimize(obj, a0, alg) of Listing 4.

4.

4 Implementation

In the effort to enable the modular implementation of the methods and formulation described in previous sections, a Heat Exchanger class is constructed in MATLAB, as shown in Listing 4, allowing one to instantiate an object of the heat exchanger class as such:

Listing 1: Instantiation
HE = Heat_Exchanger(... 
  0.05,        ... % Horizontal width (m). 
  0.01,        ... % Minimum thickness (m). 
  0.05,        ... % Maximum thickness (m). 
  20,          ... % Thermal conductivity (W/mK). 
  90 + 273.15, ... % Bottom surface temp. (K). 
  20 + 273.15, ... % Top surface temp. (K). 
  100,         ... % # of horizontal elements. 
  100          ... % # of vertical elements. 
);

4.1.

4.1 Dynamic Coefficient Creation

Once the heat exchanger object has been instantiated, one can test the dynamic scaling of the top surface mesh generation function, function ts = Surface(obj, a), by executing the following:

Listing 2: Dynamics Coefficient Creation
figure; 
hold on; 
for n=1:10 
  a = ones(n).'; 
  y = HE.Surface(a); 
  x = linspace(0, HE.Lx, HE.Nx + 1); 
  plot(x, y); 
end

from which, with some additional annotation, the plot in Figure 1 is generated. The user can specify a coefficient vector of an arbitrary length, N, and the top surface mesh function’s sin formulation will accommodate it.


PIC

Fig. 1: Dynamic Coefficient Creation


4.2.

4.2 Work Flow

With the instantiated heat exchanger object, the user can begin the optimization process by asserting an initial guess, a0. Then after, the initial guess is fed through the heat exchanger’s class instance optimization method as follows, [aopt, fval] = HE.Optimise(a0, alg), where alg is a string in the list: ['interior-point', 'sqp', 'active-set']. Finally, the user can visualize the resulting geometry simply by running HE.Visualise(aopt).

5.

5 Results

After instantiating an object of the heat exchanger class, as shown in Listing 1, it is rather easy to begin the process of optimization by asserting an initial guess of the optimal coefficient vector.

5.1.

5.1 Initial Findings

It was found, through trial and error, that the chance of convergence among all algorithms was maximized with an initial coefficient vector guess such that the sin series oscillates about a thickness of 3 cm. Such as it is, the first term in all initial guesses of the coefficient vector shall herein be asserted as a1 = 0.03 m.

5.2.

5.2 Interior-Point Optimizer

Through practice it was found that through both mesh resolution and coefficient vector length alteration, that the interior-point optimizer (IPOPT) algorithm is rather finicky at lower mesh resolutions, but it was indeed shown that convergence to a performance of over 35% greater than the nominal flat plate flux value was aided by resolution increases. For example, a coefficient vector guess of length six and vertical and horizontal resolutions of 200 nodes was optimized and visualized as follows:

Listing 3: Implementation
% Resolution 
HE.Nx = 200; HE.Ny = 200; 
% Coefficient vector guess 
a0 = [0.03; 0.0; 0.0; 0.0; 0.0] 
% Optimization 
[aopt, fval] = HE.Optimise(a0, 'interior-point'); 
% Visualization 
HE.Visualise(aopt);

leading to an optimal coefficient vector of aopt = [0.0300; -0.0025; 0.0044; 0.0032; 0.0146; -0.0049], with a flux per unit length of 9876.19 W-
m. This particular case is shown in Figure 4. The geometries resulting from an initial coefficient vector guess of length six, as show in in Figures 2 and 3, offered even higher gains in performance, garnering a flux per unit length of 10442.4008 Wm- and 10518.4232 Wm- respectively. These results are summarized in Table 1. It can be seen that accuracy is indeed confirmed through mesh refinement.


PIC

Fig. 2: IPOPT with 6 coefficients and 100 node resolution



PIC

Fig. 3: IPOPT with 6 coefficients and 200 node resolution



PIC

Fig. 4: IPOPT with 5 coefficients and 200 node resolution


5.3.

5.3 Sequential Quadratic Programming

The method of sequential quadratic programming, otherwise known as SQP, is undoubtedly very powerful. However, in the case of the heat exchanger’s top surface shape optimization, it proved to be exceedingly painstaking and slow. For nearly all of the cases that the interior point optimizer faced with acceptable results, the SQP solver tended to get stuck in local infeasible minima, while its step size became increasingly smaller until termination. However, one strike of feasibility and incredible results came with six coefficients and 200 vertical and horizontal nodes, generating an incredible heat flux per unit length of 12682.4002 Wm, with a coefficient vector of aopt = [0.0300; -0.0019; -0.0015; 0.0008; -0.0190; 0.0001]. This is an 81% improvement over the nominal heat flux value of a flat heat exchanger with equivalent dimesions. The resulting geometry can be seen in Figure 5.


PIC

Fig. 5: SQP with 6 coefficients and 200 node resolution


6.

6 Conclusions

It has been shown that improvements of over 35% of the nominal value of heat flux from a flat heat exchanger can be made. The scalability of the sin series, used to model the heat exchanger’s top surface was quite conducive in enabling the testing various amounts of coefficients. It has been shown that, in regards to a sin series formulation, a greater amount of coefficients tends to garner a higher value of heat flux per unit length, in this two dimensional case. Furthermore, it has been shown that increasing the resolution of the optimization process leads to a marginal gain in heat flux performance, that rather serves as an indication of accuracy, as shown in the transition between 100 to 200 nodes for the six coefficient IPOPT model. It can be seen that, although it is indicated that increasing the size of the input parameters leads to a gain in heat flux performance, it was also quite obvious that there was a loss in computational performance. With increasing resolution of the optimization, one is limited by their computer’s free random access memory, and with increasing coefficient vector size, one is limited by time, as the computations become evermore prolonged. 7.

7 Tables


Table 1: Interior Point Optimizer Performance



Heat Flux Per Unit Length (W/m)Coefficient Vector



100 Nodes, 5 CoefficientsN/A N/A
100 Nodes, 6 Coefficients10442.4008 [0.0300; -0.0025; 0.0044; 0.0032; 0.0145; -0.0048]
200 Nodes, 5 Coefficients9876.19 [0.0300; -0.0021; 0.0024; -0.0187; -0.0025]
200 Nodes, 6 Coefficients10518.4232 [0.0300; -0.0025; 0.0044; 0.0032; 0.0146; -0.0049]




8.

8 Source Code


Listing 4: Heat Exchanger Class
 
1classdef Heat_Exchanger 
2  properties 
3    Lx;           % Horizontal width (float)(metres). 
4    Lymin; Lymax; % Minimum and maximum vertical thicknesses (float)(metres). 
5    k;            % Thermal conductivity (float)(Watts/metres/Kelvin). 
6    T1; T2;       % Top and bottom environmental temperatures (float)(Kelvin). 
7    Nx; Ny;       % Number of elements along x and y directions (integer). 
8  end 
9  methods 
10    function obj = Heat_Exchanger(Lx, Lymin, Lymax, k, T1, T2, Nx, Ny) 
11      % Constructs Heat Exchanger class instance. 
12      obj.Lx    = Lx; 
13      obj.Lymin = Lymin; 
14      obj.Lymax = Lymax; 
15      obj.k     = k; 
16      obj.T1    = T1; 
17      obj.T2    = T2; 
18      obj.Nx    = Nx; 
19      obj.Ny    = Ny; 
20    end 
21    function ts = Surface(obj, a) 
22      % Generates the form of the top surface as a function of (a,x), 
23      % according to the specified number of coefficients. 
24      % First necessary coefficient. 
25      eqn   = @(x) a(1); 
26      % Summation of the sin series according to length of vector. 
27      for n = 2:length(a); 
28        eqn = @(x) eqn(x) + a(n)sin((2⋆pi⋆(n-1)x)/obj.Lx); 
29      end 
30      ts    = eqn(linspace(0, obj.Lx, obj.Nx + 1)).'; 
31    end 
32    function f = Neg_Flux(obj,a) 
33      % Calculates the negative flux of the given geometry. 
34      % Generate top surface mesh. 
35      h    = obj.Surface(a); 
36      % Calculate the flux per unit length. 
37      flux = CalcFlux(obj.Lx, h, obj.Nx, obj.Ny, obj.k, obj.T2, obj.T1); 
38      % Negative sign to convert for minimization. 
39      f    = -flux; 
40    end 
41    function [c, ceq] = Thickness_Limit(obj, a) 
42      % Mesh of top surface. 
43      ts   = obj.Surface(a); 
44      % Maximum point. 
45      tmax = max(ts); 
46      % Minimum point. 
47      tmin = min(ts); 
48      % Constraint vector. 
49      c    = [tmax - obj.Lymax; -tmin + obj.Lymin]; 
50      ceq  = []; 
51    end 
52    function [aopt, fval] = Optimise(obj, a0, alg) 
53      % Specify the objective function to be minimized. 
54      fun     = @obj.Neg_Flux; 
55      % Specify the nonlinear inequality constraints. 
56      nonlcon = @obj.Thickness_Limit; 
57      % Ignore other specifications. 
58      A   = []; b   = []; Aeq = []; beq = []; lb  = []; ub  = []; 
59      % Specify optimization options. 
60      options = optimoptions(           ... 
61        'fmincon',                      ... % The optimisation algorithm. 
62        'Display',              'iter', ... % Display the optimisation output. 
63        'UseParallel',            true, ... % Use multiple CPUs. 
64        'Algorithm',               alg, ... % The specified algorithm. 
65        'MaxFunctionEvaluations', 5000, ... % Many evaluations... 
66        'MaxIterations',          5000  ... % Many iterations... 
67      ); 
68      [aopt, fval] = fmincon(fun,a0,A,b,Aeq,beq,lb,ub,nonlcon,options); 
69    end 
70    function Visualise(obj, aopt) 
71      ts   = obj.Surface(aopt); 
72      bs   = zeros(obj.Nx + 1); 
73      x    = linspace(0, obj.Lx, obj.Nx + 1); 
74      area(x, ts); 
75      tstr = 'HeatExchangerGeometry($$Flux='; 
76      tstr = strcat(tstr, num2str(-obj.Neg_Flux(aopt)), '~\frac{W}{m}$$)'); 
77      title(tstr, 'Interpreter', 'latex'); 
78      xlabel('Width$$L_x$$[metres]', 'Interpreter', 'latex') 
79      ystr = 'Thickness$$L_y$$[metres]' 
80      ystr = strcat(ystr, '$$~\mathbf{a}=', mat2str(aopt), '$$') 
81      ylabel(ystr, 'Interpreter', 'latex') 
82    end 
83  end 
84end