A prospective customer recently asked if we had a MapleSim model of a double pipe heat exchanger. Heat exchangers are a critical unit operation in the process industries, and accurate models are needed for process control studies. I couldn't find an appropriate model so I decided to derive the dynamic equations, and implement them using MapleSim's custom component interface. I'll outline my modeling strategy in this blog post.
Typically, double pipe heat exchangers are modeled using
 a continuum approach, in which the temperature variation across both streams is described by PDEs,
 or a discretized approach, in which the temperature variation is described by ODEs.
Given that MapleSim solves ODEs (and not PDEs), I chose the discretized approach.
1 Deriving the System Equations
1.1 Introduction
The heat exchanger was divided into N control volumes.
A heat balance on a typical control volume resulted in three differential equations – one each for the tube and shellside liquid, and one to model the heat capacity of the tube wall. Axial heat flow along the tube wall (heat flow into and out of tube wall sections due to temperature differences in adjacent tube wall sections) was also modeled with Fourier’s Law of conduction.
For the simple model outlined here, I’ve assumed that heat exchanger was insulated, so no convective heat losses from the surface are considered.
1.2 Energy Balance on the Tube and ShellSide Streams
For a single control volume, a heat balance on the tubeside stream gives
However Tt_{in,i} and Tt_{out,i} (the inlet and outlet tubeside temperatures in each control volume) are not state variables. They are approximated by taking the average of adjacent temperatures:
Hence the heat balance on the tubeside becomes
A similar heat balance on the shellside fluid gives
1.3 Energy Balance on the Tube Wall
The tube wall acts as a heat capacitor, and can have a significant effect on the transfer of energy from one stream to another. It is assumed that the tube wall has a homogenous temperature in each control volume, with heat transferred to and from the tube and shellside liquids, and via conduction from adjacent tubewall sections. A heat balance gives:
In reality, the inner and outer surface would have different temperatures. This could be modeled by dividing the tube wall into several layers, performing a heat balance on each with Fourier’s Law governing heat flux between layers. This simplified model ignores this effect.
1.4 Heat Transfer Coefficients
The heat transfer coefficients hwt and hws were predicted by the DittusBoelter correlation.
2 Implementation of System Equations in a Custom Component
The entire set of differential equations for all N control volumes were generated in a MapleSim custom component with a simple application of the ?seq command (this approach meant I could explore how increasing the number of control volumes affected the results simply by changing the value of N and regenerating the custom component).
Figure 3 give a small subset of equations implemented in the custom component (see the attached MapleSim model for the full set), while Figure 4 outlines the steps involved in creating a custom component.
It’s important to note that no causality has been specified, so the block can be used in any configuration.
3 Complete Heat Exchanger Model
The heat exchanger as outlined above can be downloaded here.
A more sophisticated version of this model can be found here. This version accounts for the temperature variation of the tubeside liquid viscosity (which can have a significant effect on the tubeside heat transfer coefficient, as predicted by the DittusBoelter correlation), and also implements a temperature control loop.
Another version (that I can’t share) models the temperature variation of the tube wall to a greater fidelity, and convective losses from the shell surface.
4 Notation
Dit

Inside diameter of tube

m

Dot

Outside diameter of tube

m

Dis

Inside diameter of shell

m

t

Density of tubeside fluid

kg m^{3}

s

Density of shellside fluid

kg m^{3}

w

Density of tubewall material

kg m^{3}

Cpt

Specific heat capacity of tubeside liquid

J kg^{1} K^{1}

Cps

Specific heat capacity of shellside liquid

J kg^{1} K^{1}

Cpw

Specific heat capacity of tubewall material

J kg^{1} K^{1}

hsw

Heat transfer coefficient of shellside fluid and tube wall

W m^{2} K^{1}

htw

Heat transfer coefficient of tubeside fluid and tube wall

W m^{2} K^{1}

L

Length of heat exchanger

M

N

Number of control volumes


Tt_{i}

Temperature of tubeside liquid in control volume i

K

Ts_{i}

Temperature of shellside liquid in control volume i

K

Tw_{i}

Temperature of tube wall in control volume i

K

Q_{t}

Flowrate of tubeside liquid

m^{3}s^{1}

Q_{s}

Flowrate of tubeside liquid

m^{3}s^{1}
