Home / Insights / Chmltech Online Journal

Chmltech Online JournalVolume 106, Issue 23Research article

Hybrid Digital Twins for Heat Exchanger Fouling: Physics, Machine Learning and the Combination Tested on a Steam Preheater

Quak Foo LeeChief Technology Officer, Chmltech Ltd.Division of Clean Energy Technology Innovation · Vancouver, BC, Canada

Abstract

A digital twin of a fouling heat exchanger can be built from first principles, from data alone, or from both. This paper compares the three on the steam-heated feed preheater E-101, using synthetic histories with known truth. Each history holds three two-year runs of 4-hourly records with seasonal feed temperature, turndown campaigns, instrument noise and drift, a true tube-side coefficient that falls below the published correlation as a power law in Reynolds number, and Kern–Seaton fouling that differs from run to run. Four monitors are trained on the first two runs and tested on the third: physics only; physics with a constant correction learned from the days after each cleaning; a hybrid whose correction is a power law in Reynolds number; and gradient-boosted machine learning on flow, inlet temperature and time since cleaning. Over 20 histories the physics-only fouling estimate is biased by 1.8 × 10⁻⁴ m²K/W, about the TEMA design value; the hybrid's median RMS error is 0.25 × 10⁻⁴. One month into a run the hybrid forecasts when the exchanger can no longer heat the design case to within 20% in 14 of 20 histories, against 9 for the constant correction and none for machine learning. At turndown in the test run, which adds turndown in the coldest weeks, unseen in training, the hybrid predicts shell pressure to a median 0.07 bar, against 0.24 bar for machine learning and 0.47 bar for physics alone. The advantage is partly built into the test.

Keywords: digital twin; hybrid modelling; heat exchanger fouling; physics-informed machine learning; Kern-Seaton; condition monitoring; gradient boosting; steam preheater

1. Introduction

The companion paper sized E-101 for fouling it could only estimate: an asymptotic resistance judged at 1 to 8 × 10⁻⁴ m²K/W, and a tube-side coefficient carrying the ±15% scatter of its correlation, the two inputs that decided most of the outcome [1]. Once the plant runs, both can be measured. The monitor that measures them, and forecasts when the exchanger will need cleaning, is a simple example of what is now called a digital twin: a model kept in step with the plant by its own data [2, 3].

There are three ways to build it. A physics model computes the overall coefficient from the measured duty and temperatures, compares it with the clean coefficient from correlations, and calls the difference fouling. It needs no training data, but it inherits every error in the correlations. A machine-learning model learns the plant's behaviour from its history; it needs no correlations, but it knows only the conditions it has seen [4, 5]. A hybrid model keeps the physics structure and learns only what the physics gets wrong, an idea with a long history in process engineering [6–8] and now often called physics-informed machine learning [9, 10].

The arguments for the hybrid are well rehearsed, and probabilistic treatments of fouling have long fed exchanger maintenance [11]; quantitative comparisons of monitors on a plant where the truth is known are rarer. This paper builds synthetic histories of E-101 in which the true fouling and the true coefficients are known, gives the same data to four monitors, and measures three things an operator cares about: how well each estimates the fouling, how early and how accurately each forecasts the cleaning, and how each behaves in operating conditions it was not trained on.

2. The Plant and Its Data

The test bed is E-101 as built at 6 m², an area the companion paper showed to foul out within months, so that every run reaches the point where the steam runs out and the forecast has something to predict [1]. The feed is heated from tank temperature to 80 °C with steam at up to 2.7 barg in the shell; the steam valve holds the outlet temperature until the steam runs out, after which the outlet falls below 80 °C. Table 1 lists what the synthetic plant contains and what the monitors can see.

Table 1. The synthetic plant.
ElementIn the plant (true, hidden)Seen by the monitors
Records4-hourly, three runs of 24 months each, 4,000 records a runSame
Feed flow8,690 kg/h ± 5% at normal rate; 50% during four random turndown campaigns a run; in the test run, also turndown for the first 50 days of each year, a regime absent from the training runsMeasured with ±2% noise and a slow drift of ±1.5%
Feed inlet temperatureSeasonal, 8.5 to 36.5 °C with daily scatterMeasured with ±0.3 K noise
Outlet temperature80 °C, or lower when the steam runs outMeasured with ±0.3 K noise
Shell pressureSet by the steam valve; at most 2.7 bargMeasured with ±0.015 bar noise
Tube-side coefficient0.88 (Re/17,800)0.15 times the Gnielinski correlation: 12% low at normal rate, 20% low at turndownNot seen; the correlation is known
Condensing coefficient7,000 W/m²KAssumed 8,000 W/m²K
Shell-side fouling1 × 10⁻⁴ m²K/W, constantAssumed, correctly
FoulingKern–Seaton, a new level (1.5 to 6 × 10⁻⁴ m²K/W) and time constant (1,000 to 6,000 h) drawn for every runNot seen

The tube-side deviation is the key to the comparison. It stands for what real plants show: a correlation that fits the average of laboratory data is rarely exact for a given exchanger, and its error usually depends on flow [12]. In the plant here the error is 12% at normal rate and grows to about 20% at turndown, and the assumed condensing coefficient is also optimistic. None of the monitors is told this; each has to cope with it from the data.

Twenty such histories are generated, each with its own noise and its own fouling in each run. In every history the first two runs are the training data and the third is the test. The task each monitor faces is the one an operator faces at the start of a new run: estimate the fouling as it builds, forecast when the exchanger will no longer heat the design case, the P95 feed at the P5 inlet temperature of the companion paper and of the pump study before it [13], and predict the shell pressure at operating conditions not yet seen.

3. Four Monitors

Physics only (P). From each record the monitor computes the duty from the measured flow and temperatures, the steam temperature from the measured shell pressure, and the overall coefficient, based on the outside tube area A, from the log-mean temperature difference, Eq. (1). It computes the clean coefficient U₀ from the Gnielinski correlation [14] and the assumed condensing coefficient, and takes the fouling resistance as the difference of the reciprocals on the inside area, Eq. (2). Records with the shell at or below 0.05 barg are dropped, since stalled condensate breaks the assumption of uniform condensing:

\[U_m = \frac{\dot m\,c_p\,(T_{out} - T_{in})}{A\,\Delta T_{lm}}\](1)
\[R_f = \left( \frac{1}{U_m} - \frac{1}{U_0} \right) \frac{D_i}{D_o}\](2)

Physics with a constant correction (O). The same, but the correlation is first corrected by one factor learned from data. In the first 120 operating hours after each cleaning, when fouling has reached only 2% to 11% of its asymptote, the measured coefficient is taken as clean, and the ratio of the tube-side coefficient it implies to the correlation's is averaged over the two training runs. A longer window would let more of the early fouling into the calibration; a 300-hour window, tried first, biased the learned correction low and weakened the hybrid's early forecasts.

Hybrid (H). The same clean-period data, but the correction is learned as a function of the tube-side Reynolds number, Eq. (3), by regression of the logarithm of the ratio on the logarithm of Reynolds number. The physics fixes the structure, the energy balance, the resistances in series and the dependence on flow and temperature through the correlation; the data supply only the part the correlation gets wrong. The learned factor also absorbs the error in the assumed condensing coefficient:

\[h_i = f(Re)\,h_{i,\mathrm{Gnielinski}}, \qquad f(Re) = a\,Re^{\,b}\](3)

Machine learning only (M). A gradient-boosted regression [15, 16] maps three inputs available on any plant historian, feed flow, inlet temperature and time since cleaning, to the shell pressure. It is trained on the two training runs and retrained as the test run's data arrive.

Forecasting. For P, O and H, the fouling estimates are reduced to daily medians and the Kern–Seaton curve, Eq. (4), is fitted to them by robust least squares [17, 18]. The fitted curve is then carried forward with each monitor's own clean coefficient at the design case, and the forecast is the time at which the design case would need more than 2.7 barg in the shell. For M, the forecast is the time at which the model's predicted shell pressure at the design case first exceeds 2.69 barg. Forecasts are made after 0.5, 1, 1.5, 2 and 3 months of the test run, counting only forecasts made before the true limit is reached:

\[R_f(t) = R_\infty \left( 1 - e^{-t/\tau} \right)\](4)

4. Results: Estimating Fouling

Figure 1 shows what each monitor learned about the clean exchanger. The plant's tube-side coefficient runs from 77% of the correlation at turndown to 91% at the top of the normal range. Physics only assumes 100% everywhere. The constant correction, learned from the clean days, settles at 85%, between the plant's values at the two ends but wrong at both. The hybrid's learned curve follows the plant's slope, with a median exponent of 0.157 against the plant's 0.15, and sits one to two points below it: it absorbs the optimistic condensing coefficient, which the plant's own data cannot separate from the tube side, and the little fouling already present in the calibration window.

Learned tube-side correction against Reynolds number 8,000 10,000 12,000 14,000 16,000 18,000 20,000 22,000 Tube-side Reynolds number 0.70 0.75 0.80 0.85 0.90 0.95 1.00 1.05 Tube-side coefficient / correlation turndown normal rate clean-day calibration data (first 120 h) Plant (true, unknown to the monitors) Hybrid: learned from the clean days of runs 1 and 2 Constant correction from the same data Physics only: correlation as published
Figure 1. Ratio of the tube-side coefficient to the Gnielinski correlation against Reynolds number: the plant, the hybrid's learned correction, the constant correction and the uncorrected correlation, with the operating ranges and the range of the calibration data (the illustrative history, with fixed fouling parameters).

Those differences become fouling errors, as Figure 2 shows for one test run. Physics only starts the run with an apparent fouling of about 1 × 10⁻⁴ m²K/W on clean tubes and stays about that much too high, the deficit of the correlation read as dirt; at every turndown campaign it jumps to 5 or 6 × 10⁻⁴, because the correlation's error is largest at low flow. The constant correction removes the offset at normal rate but still jumps at turndown. The hybrid follows the true curve through the whole run, with small dips at turndown, where its learned curve is extrapolated.

Fouling resistance estimated by three monitors over the test run 0 3 6 9 12 15 18 21 24 Months since cleaning, test run (daily medians of 4-hourly records) 0 2 4 6 8 Fouling resistance (10⁻⁴ m²K/W) Physics only (RMSE 2.14) Physics, constant correction (RMSE 0.74) Hybrid (RMSE 0.13) True fouling resistance
Figure 2. Fouling resistance estimated by three monitors over the test run of the illustrative history, against the true value; daily medians of 4-hourly records.

Table 2 gives the errors over all 20 histories. The physics-only bias, 1.8 × 10⁻⁴ m²K/W, is about the TEMA design allowance for this service, 0.001 h·ft²·°F/Btu or 1.8 × 10⁻⁴ m²K/W: a monitor of this kind would report an exchanger as carrying more than half its fouling allowance on the day it came back from cleaning, and several times the allowance at turndown. The constant correction cuts the error by two-thirds, the hybrid by nine-tenths, and the absolute gap between them doubles at turndown.

Table 2. Error of the fouling estimate on the test run (medians of 20 histories, 10⁻⁴ m²K/W).
MonitorBias, daily mediansRMS error, daily mediansRMS error, turndown records (4-hourly)
Physics only+1.802.193.95
Physics, constant correction+0.240.741.46
Hybrid−0.100.250.50

5. Results: Forecasting the Cleaning

The question an operator asks of the twin is when the exchanger will stop heating the design case, so that a cleaning can be planned rather than forced. Figure 3 shows how the forecast error falls as the test run's data accumulate.

Forecast error against months of data on the test run for physics only, constant correction, hybrid and machine learning: median error and share of forecasts within 20% of the truth 0.5 1.0 1.5 2.0 3.0 Months of data on the test run 0% 20% 40% 60% 80% 100% Median error of forecast (capped at 100%) Errors above 100% and 'never' answers count as 100% 0.5 1.0 1.5 2.0 3.0 Months of data on the test run 0% 20% 40% 60% 80% 100% Forecasts within 20% of the truth Physics only Physics, constant correction Hybrid Machine learning only
Figure 3. Forecast of the time at which the exchanger can no longer heat the design case, against months of data on the test run (20 histories; forecasts are counted only before the true limit, so 20, 20, 19, 16 and 12 histories contribute): median error, left, and share of forecasts within 20% of the truth, right. Errors are capped at 100%, which also scores a forecast that the limit is never reached; at 3 months physics only forecasts no limit in 10 of 12 histories.

Two weeks of data are too few for any monitor except the hybrid, which is already within 20% in 9 of 20 histories; the start of a Kern–Seaton curve says little about where it will level off unless the estimate is unbiased from the first day. After one month the hybrid's median error is 15%, with 14 of 20 forecasts within 20%; after six weeks 8%, and after two months 9%, with 14 of 16 within 20%. The constant correction is slower to become useful, with 9 of 20 within 20% at one month, but from six weeks it matches the hybrid, and at two months its median error is slightly lower, 7% against 9%; at three months the hybrid has 10 of 12 within 20% and the constant correction 9. The hybrid failed to forecast a limit once, at two weeks, in one slow-fouling history. Physics only never forecasts within 20%. Its fouling estimate carries the offset from the first day, and a curve forced through zero at the start of the run cannot fit it, so it predicts the limit far too early, by a median of 44% at two months, and at three months its fitted curve levels off below the limit in most histories. That failure is partly the fit rather than the physics: a curve with a free intercept, or fouling measured from the start-of-run value, would recover much of it, and the constant correction is in effect that remedy.

The machine-learning monitor never forecasts within 20%, and the reason is instructive. Its target, shell pressure, saturates at 2.7 barg once the steam runs out, so the data say little about how far past the limit the exchanger is, and the design case, at the top of the flow range and the bottom of the temperature range, lies at the edge of its training data. With only two training runs, both starting in winter, time since cleaning is also confounded with season: the model learned that cold feed and high shell pressure arrive about 8,000 hours after cleaning, when the training runs met their second winter, and forecast the limit there in most histories. Across the 20 histories its forecasts clustered at 7,200 to 7,900 hours, whatever the run's true limit, which ranged from 950 to 5,400 hours. This is a failure of feature and target design with too little history, the normal situation for a new exchanger, more than an inherent limit of machine learning; but it is exactly the failure a model with no physics has no way to notice.

6. Results: Outside the Training Data

The test run contains one regime the training runs did not: turndown during the first 50 calendar days of each year, when the feed is also coldest. Turndown itself appears in the training runs' random campaigns; turndown in the coldest weeks does not. For this test the machine-learning model is retrained on the two training runs plus every test-run record outside the scored turndown records, so it sees the test run's fouling; the physics monitors use their Kern–Seaton fit to the test run. Figure 4 gives each monitor's error in predicting the shell pressure over all turndown records of the test run, a quantity that decides whether the shell stalls; between 44% and 70% of them, depending on the history, fall in the winter windows, and the rest in random campaigns like those in training, so the test mixes the new regime with a familiar one.

Shell pressure error at turndown in the test run 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Mean absolute error of shell pressure at turndown, test run (bar) Physics only Physics, constant correction Machine learning only Hybrid 0.47 (P90 0.55) 0.28 (P90 0.32) 0.24 (P90 0.59) 0.07 (P90 0.18) Bar length: median of 20 histories P90 of 20 histories
Figure 4. Mean absolute error of the shell pressure predicted at turndown records of the test run: median and P90 over 20 histories.

The hybrid's median error is 0.07 bar. Machine learning's median is 0.24 bar, but its P90 is 0.59 bar: in some histories it does tolerably by interpolating nearby training data, in others it is badly wrong, with nothing to warn the user which. Physics only is consistently wrong by about 0.47 bar, the effect of its biased coefficient at low flow, and the constant correction by 0.28 bar.

The difference is in what each monitor carries into the new regime. The machine-learning model carries only correlations between its inputs and outputs, which may not hold where it has little data. The physics models carry the energy balance and the way heat transfer changes with flow, which hold everywhere; the hybrid adds the plant's own correction to that change. In the scored records the true shell pressure ranged from about 0 to 2.7 barg across the 20 histories (0.2 to 1.9 barg in the illustrative history), so some records sat at or near stall and some at the steam limit; an error of 0.2 bar near atmospheric pressure is the difference between a shell that drains its condensate and one that stalls, and the companion paper showed how much of the year a well-sized E-101 spends near that line [1].

6.1 How fair is the comparison?

Three features of the test favour the hybrid and should be read with the results. First, the plant's deviation from the correlation is itself a power law in Reynolds number, the form the hybrid fits. The hybrid recovered the exponent closely, 0.157 in the median history against 0.15, and could therefore extrapolate from the clean-day Reynolds numbers of about 14,000 to 18,500 down to turndown at 7,000 to 11,500; in a few histories the calibration window overlapped a turndown campaign, giving it some low-flow clean data. A plant whose deviation changes shape at low flow, for example near transition, would not be followed so closely, and the remedy is to calibrate on clean data at low flow as well, which a planned turndown after a cleaning can provide.

Second, the machine-learning monitor was given three raw inputs and a censored target. A model given outlet temperature, physics-derived features such as the measured overall coefficient, or many more runs would do better; the comparison shows what happens when a data-only model is used early in a plant's life, not the best that machine learning can do. Third, the 6 m² area was chosen so that every test run reaches its limit, between 950 and 5,400 hours after cleaning, which keeps the forecasting horizon short; for a well-sized exchanger whose limit is years away, every forecast would be harder and the gap between the monitors in absolute hours larger.

One feature works the other way. The plant's run lengths are counted in operating hours, 8,000 a year, while the seasons and the 50-day winter windows run on calendar days; a run of "24 months" is about 22 calendar months. This shifts the seasons against the fouling slightly from run to run, which is realistic and makes the forecasting task a little harder for every monitor.

7. Building a Hybrid Twin

A fouling twin of this kind needs little: four instruments the exchanger already has, a correlation, and a few days of clean operation after each cleaning. Table 3 sets out the choices.

Table 3. Building a fouling twin for a heat exchanger.
DecisionRecommendationWhy
InstrumentsFeed flow, inlet and outlet temperature, shell pressure or steam temperature; 4-hourly records were enough here, hourly gives more marginEnough for the duty and the driving force; the twin is only as good as the flow meter
Model structureEnergy balance and resistances in series, with the tube-side correlationHolds at any load, including ones not yet seen
What to learn from dataA correction to the clean coefficient as a function of Reynolds number, from the first few days after each cleaning, at more than one load if possibleThe correlation's error is the largest source of bias, and it may depend on flow
What not to learn from dataThe fouling curve of a new runIt differs run to run; fit it to the run's own estimates instead
Fouling model for forecastingKern–Seaton fitted to daily medians by robust least squares; a linear fit beside it is suggestedCaptures levelling off; a linear fit is the warning case
When to trust a forecastAfter about a month of a run for the hybrid; reporting the range from a few fits is suggestedEarlier forecasts are dominated by noise in the early curve
Data to excludeStalled-shell records, start-ups and transients; steam-limited records can stay if the outlet temperature is measuredThey break the steady, uniform-condensing assumptions
RecalibrationRefit the correction after every cleaning, from a short window; watch for drift in the flow meterThe clean days are free calibration data; drift and early fouling both look like a lower clean coefficient
Role of pure machine learningDetecting anomalies and instrument faults, filling gaps; physics-derived features if used for forecastingGood at interpolation; poor at forecasting a new run from little history

Three cautions apply. The clean-period calibration assumes the tubes really are clean after each cleaning and that the window is short enough for fouling not to have begun; a cleaning that leaves a residue will be learned as a lower clean coefficient and the fouling of the next run underestimated. The correction absorbs every error that varies with flow, so a slowly drifting flow meter will be learned too; a second, independent check such as a periodic duty test is worth having. And the forecast is only as good as the fouling model: if fouling does not level off, a Kern–Seaton fit will forecast too late, so the twin should report a linear fit beside it, and the gap between them, as the companion paper's linear-fouling case argues [1].

8. Conclusions

Four monitors of the same steam preheater, given the same synthetic plant data, were compared where the truth was known:

  • A physics-only monitor that trusts the published correlation reads the correlation's error as fouling. Here its bias, 1.8 × 10⁻⁴ m²K/W, was about the TEMA design allowance, and at turndown its error nearly doubled.
  • A hybrid that learns only the correlation's error, as a function of flow, from the first days after each cleaning, estimated fouling with a median RMS error of 0.25 × 10⁻⁴ m²K/W and forecast the cleaning to within 20% in 14 of 20 runs after one month. A constant correction matched it from about six weeks but was slower to become useful and two to four times as wrong at turndown.
  • A machine-learning model of the raw operating data could not forecast the cleaning of a new run, because with two training runs its time since cleaning was confounded with season and the design case lay at the edge of its data; at turndown in the test run, including turndown in the coldest weeks it had not seen, its errors were erratic, a median of 0.24 bar but a P90 of 0.59 bar, against 0.07 and 0.18 bar for the hybrid.
  • The parts of a twin that physics knows, the energy balance and how heat transfer changes with flow, should be built in; the parts it does not know, the plant's own deviation from the correlation, should be learned; and quantities that change from run to run, such as the fouling itself, should be fitted to each run as it happens.

The study has limits. The plant is synthetic, and the hybrid's advantage at turndown is partly built in: the plant's deviation from the correlation follows a power law that the hybrid's regression can represent exactly, real plants will be less tidy, and the noise and drift are idealised. Only one hybrid structure and one machine-learning model were tried; a machine-learning model given physics-derived features or more history would do better than the one here. The design case flow, 9,569 kg/h, sits at the very top of the plant's flow range; the illustrative history of Figures 1 and 2 uses fixed fouling parameters rather than randomly drawn ones. Stall, start-ups and cleaning residues are excluded or idealised. The Python model, which generates the plant histories and runs all four monitors, can be downloaded from this paper's page.

9. Appendix: A Hybrid Fouling Twin in About 50 Lines of Code

Table 4 maps the method to the downloadable model. The script below is the hybrid monitor on its own: it learns the Reynolds-number correction from clean records, estimates the fouling of a new run, fits Kern–Seaton to two months of daily medians and forecasts when the design case runs out of steam. A small synthetic plant stands in for historian data; replace it with the four instrument tags of a real exchanger. On its own synthetic data it learns a correction of 0.86 at Reynolds number 18,000 and forecasts the limit at 1,650 hours after cleaning, the true value, although the fitted asymptote and time constant are off by a fifth and almost a third, a reminder that the forecast is better determined than the curve's parameters.

Table 4. Steps of the method and where the model does them.
StepWhat to doIn this paperIn the downloadable model (printed script)
1. DataFlow, inlet and outlet temperature, shell pressure; drop stalled and transient records4-hourly, three runs per history; shell > 0.05 bargplant(), u_measured() (plant(), u_measured())
2. Learn the correctionRegress the clean-period coefficient on Reynolds numberFirst 120 h after each cleaning, runs 1 and 2calibrate_clean(), calibrate_offset() (calibrate())
3. Estimate foulingEq. (2) with the corrected clean coefficient; daily mediansEvery test-run recordestimate_rf(), daily() (fouling())
4. ForecastFit Eq. (4); carry forward to the design caseAfter 0.5 to 3 monthsks_fit(), time_to_limit() (forecast())
5. ComparePhysics only, constant correction, hybrid, machine learning; 20 historiesTable 2, Figures 1 to 4evaluate(), twin_summary.py
The hybrid monitor on its own: learn the Reynolds-number correction from clean records, estimate fouling, fit Kern–Seaton to two months of daily medians and forecast the limit (Python 3 with NumPy and SciPy).
"""Hybrid fouling twin for a steam-heated exchanger - Chmltech Online Journal (appendix script).
Learns a Reynolds-number correction to the Gnielinski coefficient from clean-period records (Eq. 3), estimates the
fouling resistance of each record (Eqs. 1-2), fits Kern-Seaton (Eq. 4) and forecasts when the design case runs out
of steam. A small synthetic plant stands in for historian data. Python 3 with NumPy and SciPy."""
import math
import numpy as np
from scipy.optimize import least_squares

CP, KF, OD, ID, TPP, A, HO, RWO = 2000.0, 0.13, 0.01905, 0.01575, 12, 6.0, 8000.0, 1e-4
RW = OD * math.log(OD / ID) / (2 * 45.0)
rho = lambda T: 900 - 0.95 * (T - 20); mu = lambda T: 1.6e-3 * np.exp(-0.018 * (T - 20))
tsat = lambda p: 1810.94 / (8.14019 - np.log10((p + 1.01325) * 750.062)) - 244.485


def gnielinski(m, T):                                   # tube-side coefficient (W/m2K) and Reynolds number
    v = m / 3600 / rho(T) / (TPP * math.pi * ID ** 2 / 4); Re = rho(T) * v * ID / mu(T); Pr = CP * mu(T) / KF
    f = (0.79 * np.log(Re) - 1.64) ** -2
    return (f / 8) * (Re - 1000) * Pr / (1 + 12.7 * np.sqrt(f / 8) * (Pr ** (2 / 3) - 1)) * KF / ID, Re


def u_from_hi(hi, rf=0.0):                              # resistances in series on the outside area (used in Eq. 2)
    return 1 / (OD / (hi * ID) + RW + 1 / HO + rf * OD / ID + RWO)


def u_measured(m, Tin, Tout, p):                        # Eq. (1): duty over LMTD, from four instruments
    Ts = tsat(p); lm = (Tout - Tin) / np.log((Ts - Tin) / (Ts - Tout))
    return m / 3600 * CP * (Tout - Tin) / (A * lm)


def calibrate(m, Tin, Tout, p):                         # Eq. (3): f(Re) = a Re^b from clean records
    hi_c, Re = gnielinski(m, (Tin + 80) / 2)
    hi_m = OD / ID / (1 / u_measured(m, Tin, Tout, p) - RW - 1 / HO - RWO)
    b, ln_a = np.polyfit(np.log(Re), np.log(hi_m / hi_c), 1)
    return lambda R: np.exp(ln_a) * R ** b


def fouling(m, Tin, Tout, p, f):                        # Eq. (2), with the learned correction
    hi_c, Re = gnielinski(m, (Tin + 80) / 2)
    return (1 / u_measured(m, Tin, Tout, p) - 1 / u_from_hi(f(Re) * hi_c)) * ID / OD


def forecast(t, rf, f, m_d=9569.0, T_d=6.8, p_max=2.7):  # Eq. (4) fit, then hours until the design case runs out of steam
    x = least_squares(lambda x: x[0] * 1e-4 * (1 - np.exp(-t / x[1])) - rf, [3, 3000], bounds=([0.1, 200], [20, 3e4]), loss="soft_l1", f_scale=3e-5).x
    hi_c, Re = gnielinski(m_d, (T_d + 80) / 2); T_s = tsat(p_max)
    for h in np.arange(0, 3e4, 50):
        U = u_from_hi(f(Re) * hi_c, x[0] * 1e-4 * (1 - math.exp(-h / x[1])))
        if 80 > T_s - (T_s - T_d) * math.exp(-U * A / (m_d / 3600 * CP)): return h, x
    return float("inf"), x


# ---- synthetic plant: true coefficient 12% below the correlation at normal rate, more at low flow ----
rng = np.random.default_rng(3)
def plant(n, t, rinf, tau):
    m = 8690 * np.where(rng.random(n) < 0.15, 0.5, 1.0) * (1 + 0.05 * rng.standard_normal(n)); Tin = rng.uniform(8, 36, n)
    hi_c, Re = gnielinski(m, (Tin + 80) / 2); hi = 0.88 * (Re / 17800) ** 0.15 * hi_c
    U = 1 / (OD / (hi * ID) + RW + 1 / 7000 + rinf * (1 - np.exp(-t / tau)) * OD / ID + RWO)
    E = np.exp(-U * A / (m / 3600 * CP)); Ts = (80 - Tin * E) / (1 - E)
    p = 10 ** (8.14019 - 1810.94 / (Ts + 244.485)) / 750.062 - 1.01325
    return m * (1 + 0.02 * rng.standard_normal(n)), Tin + 0.3 * rng.standard_normal(n), 80 + 0.3 * rng.standard_normal(n), p + 0.015 * rng.standard_normal(n)

f = calibrate(*plant(150, np.zeros(150), 0, 1))         # clean weeks after a cleaning
t = np.arange(0, 1340, 4.0)                             # first two months of a new run
rf = fouling(*plant(len(t), t, 3.5e-4, 2500), f)
day = (t // 24).astype(int); td = np.array([t[day == d].mean() for d in np.unique(day)]); rd = np.array([np.median(rf[day == d]) for d in np.unique(day)])
h, x = forecast(td, rd, f)
print(f"Learned correction at Re 18,000: {f(18000):.3f};  fitted Rinf {x[0]:.2f}e-4 m2K/W, tau {x[1]:.0f} h (true 3.50e-4, 2,500 h)")
print(f"Forecast after two months: design case runs out of steam at {h:.0f} h after cleaning (true: 1,650 h)")

References

  1. Lee, Q. F. (2026). Sizing the feed preheater under fouling uncertainty: Area margin, cleaning and condensate stall. Chmltech Online Journal, 106(21). www.chmltech.com/post/sizing-the-feed-preheater-under-fouling-uncertainty-area-m
  2. Rasheed, A., San, O., & Kvamsdal, T. (2020). Digital twin: Values, challenges and enablers from a modeling perspective. IEEE Access, 8, 21980–22012. 10.1109/ACCESS.2020.2970143
  3. Lee, Q. F. (2026). Digital twins in chemical process plants: Architecture, modeling approaches and applications. Chmltech Online Journal. www.chmltech.com/post/digital-twins-in-chemical-process-plants-architecture-mode
  4. Sundar, S., Rajagopal, M. C., Zhao, H., Kuntumalla, G., et al. (2020). Fouling modeling and prediction approach for heat exchangers using deep learning. International Journal of Heat and Mass Transfer, 159, 120112. 10.1016/j.ijheatmasstransfer.2020.120112
  5. Ujević Andrijić, Ž., & Rimac, N. (2025). Data-driven fouling detection in refinery preheat train heat exchangers using neural networks and gradient boosting. Sensors, 25(16), 4936. 10.3390/s25164936
  6. Psichogios, D. C., & Ungar, L. H. (1992). A hybrid neural network–first principles approach to process modeling. AIChE Journal, 38(10), 1499–1511. 10.1002/aic.690381003
  7. Thompson, M. L., & Kramer, M. A. (1994). Modeling chemical processes using prior knowledge and neural networks. AIChE Journal, 40(8), 1328–1340. 10.1002/aic.690400806
  8. von Stosch, M., Oliveira, R., Peres, J., & Feyo de Azevedo, S. (2014). Hybrid semi-parametric modeling in process systems engineering: Past, present and future. Computers & Chemical Engineering, 60, 86–101. 10.1016/j.compchemeng.2013.08.008
  9. Karniadakis, G. E., Kevrekidis, I. G., Lu, L., Perdikaris, P., Wang, S., & Yang, L. (2021). Physics-informed machine learning. Nature Reviews Physics, 3, 422–440. 10.1038/s42254-021-00314-5
  10. Bradley, W., et al. (2022). Perspectives on the integration between first-principles and data-driven modeling. Computers & Chemical Engineering, 166, 107898. 10.1016/j.compchemeng.2022.107898
  11. Zubair, S. M., Sheikh, A. K., Younas, M., & Budair, M. O. (2000). A risk based heat exchanger analysis subject to fouling: Part I: Performance evaluation. Energy, 25(5), 427–443.
  12. Bergman, T. L., Lavine, A. S., Incropera, F. P., & DeWitt, D. P. (2011). Fundamentals of heat and mass transfer (7th ed.). Wiley.
  13. Lee, Q. F. (2026). Sizing pumps and control valves under uncertainty: Monte Carlo design points for chemical plants. Chmltech Online Journal, 106(8). www.chmltech.com/post/sizing-pumps-and-control-valves-under-uncertainty-monte-ca
  14. Gnielinski, V. (1976). New equations for heat and mass transfer in turbulent pipe and channel flow. International Chemical Engineering, 16(2), 359–368.
  15. Friedman, J. H. (2001). Greedy function approximation: A gradient boosting machine. Annals of Statistics, 29(5), 1189–1232. 10.1214/aos/1013203451
  16. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., et al. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830.
  17. Kern, D. Q., & Seaton, R. E. (1959). A theoretical analysis of thermal surface fouling. British Chemical Engineering, 4(5), 258–262.
  18. Müller-Steinhagen, H. (2011). Heat transfer fouling: 50 years after the Kern and Seaton model. Heat Transfer Engineering, 32(1), 1–13. 10.1080/01457632.2010.505127

How to cite this article

Lee, Q. F. (2026). Hybrid Digital Twins for Heat Exchanger Fouling: Physics, Machine Learning and the Combination Tested on a Steam Preheater. Chmltech Online Journal, 106(23). https://www.chmltech.com/post/hybrid-digital-twins-for-heat-exchanger-fouling-physics-machine-learning-and-the-combination-tested-on-a-steam-preheater

Chmltech Online Journal · Vol. 106, Issue 23

Download the PDF

Hybrid Digital Twins for Heat Exchanger Fouling: Physics, Machine Learning and the Combination Tested on a Steam Preheater

We use your details to record this request and may follow up about it. See our privacy notice.

Test what you have read

Free Process / ChemEng practice exams

Interactive exams with an explanation for every answer. No sign-up.