CHE-460 · Lesson 8 of 12 · 20 min
Design specifications, sensitivity analysis and case studies
With the flowsheet converging reliably, the questions from the project team began to arrive. Carla, the project manager, wanted to know what reflux ratio the ester column needed to meet the 99.7 % purity with the 24 stages the contractor had chosen. Wren, the operations lead who would run the line, asked what would happen to purity if the reflux drifted. Nadia, the quality manager, asked how robust the purity was to changes in the decanter feed. Each question is a different kind of simulation study: a design specification, a sensitivity analysis and a set of case studies.
Design specifications
A simulator's unit models take inputs and calculate outputs. A column model takes a reflux ratio and calculates the product purity. But the engineer often knows the purity required and wants the reflux. A design specification turns the problem around. It names a target, such as the mole fraction of light material in the bottoms equal to 0.003, and a manipulated variable, such as the reflux ratio, with bounds. The simulator then adjusts the manipulated variable until the target is met. The degrees of freedom are unchanged: one specification has been traded for another.
In a sequential-modular simulator, a design specification is a loop around part of the flowsheet. The simulator guesses the manipulated variable, calculates the units, compares the result with the target, and updates the guess, usually by a secant or Newton method. When a design specification sits inside a recycle, there are nested loops, or the simulator converges the specification and the tears together, which a quasi-Newton method does well.
The choice of the target function matters. Bottoms impurity falls roughly exponentially as reflux rises, so \(x_{B}\) itself is a strongly curved function of \(R\), and a secant method on it can overshoot badly. Taking the logarithm makes the function nearly linear, and the secant converges smoothly. Theo found this the hard way: a secant on \(x_{B}\) alone jumped to reflux ratios outside the bounds before it settled. The code uses a rating model of the column with 24 stages and the feed on stage 10, solving the tridiagonal stage equations by the Thomas algorithm, and wraps a secant on \(\ln x_{B}\) around it.
# A rating model of the ester column (fixed stages), then a design spec, a sensitivity table and case studies
alpha, N, NF = 2.5, 24, 10 # stages counted from the top (condenser = 0 is total), feed on stage NF
F = 63.8
def column(R, zF=0.591, D=38.2, alpha=alpha):
"""Binary, constant molar overflow, total condenser, partial reboiler = stage N. Returns xD, xB."""
B = F - D; L, V = R * D, (R + 1) * D; Ls = L + F
x = [zF] * (N + 1)
for _ in range(300):
K = [alpha / (1 + (alpha - 1) * xi) for xi in x]
# tridiagonal balance for the light component on stages 1..N (liquid mole fractions)
a, b, c, d = [0.0] * (N + 1), [0.0] * (N + 1), [0.0] * (N + 1), [0.0] * (N + 1)
for j in range(1, N + 1):
Lj = L if j < NF else Ls
if j == N: Lj = B
Lup = L if j - 1 < NF else Ls # liquid from the stage above
a[j] = Lup if j > 1 else 0.0 # x_{j-1}
b[j] = -(Lj + V * K[j])
c[j] = V * K[j + 1] if j < N else 0.0 # y_{j+1}
d[j] = -F * zF if j == NF else 0.0
# reflux liquid entering stage 1 = L * xD = L * K1 x1
b[1] = -(L + V * K[1]) + L * K[1]
# Thomas algorithm
cp, dp = [0.0] * (N + 1), [0.0] * (N + 1)
for j in range(1, N + 1):
m = b[j] - a[j] * cp[j - 1]
cp[j] = c[j] / m; dp[j] = (d[j] - a[j] * dp[j - 1]) / m
xn = [0.0] * (N + 1)
for j in range(N, 0, -1):
xn[j] = dp[j] - (cp[j] * xn[j + 1] if j < N else 0.0)
xn = [min(1.0, max(0.0, v)) for v in xn]
if max(abs(p - q) for p, q in zip(x[1:], xn[1:])) < 1e-10: x = xn; break
x = xn
xD = K[1] * x[1]; xB = x[N]
return xD, xB
# Design spec: find R so that the ester product contains 0.3 mol % light material (99.7 % ester)
target = 0.003
import math
# work with the logarithm of xB: the function is far straighter, so the secant method behaves
f = lambda R: math.log(column(R)[1]) - math.log(target)
R0, R1 = 1.2, 1.6
for it in range(1, 30):
f0, f1 = f(R0), f(R1)
R2 = R1 - f1 * (R1 - R0) / (f1 - f0)
print(f"secant iteration {it}: R = {R2:.4f}, xB = {column(R2)[1]:.5f}")
if abs(R2 - R1) < 1e-5: break
R0, R1 = R1, R2
Rspec = R2
print(f"design spec met at R = {Rspec:.3f}; reflux {Rspec * 38.2:.1f} kmol/h; xD = {column(Rspec)[0]:.4f}")
print()
print("sensitivity: reflux ratio -> ester purity (mol %)")
for R in (1.2, 1.3, 1.4, 1.5, 1.7, 2.0):
print(f" R = {R:.1f} purity {100 * (1 - column(R)[1]):.3f} %")
print()
print("case studies at the spec reflux")
cases = [("design feed", 0.591, alpha), ("lean feed, 55 % light", 0.55, alpha), ("rich feed, 63 % light", 0.63, alpha), ("alpha 10 % low", 0.591, alpha * 0.9)]
for name, zf, al in cases:
xD, xB = column(Rspec, zF=zf, alpha=al)
print(f" {name:24s} purity {100 * (1 - xB):7.3f} % distillate light {xD:.4f}")secant iteration 1: R = 1.2458, xB = 0.00195 secant iteration 2: R = 1.1933, xB = 0.00516 secant iteration 3: R = 1.2226, xB = 0.00308 secant iteration 4: R = 1.2240, xB = 0.00299 secant iteration 5: R = 1.2239, xB = 0.00300 secant iteration 6: R = 1.2239, xB = 0.00300 design spec met at R = 1.224; reflux 46.8 kmol/h; xD = 0.9851 sensitivity: reflux ratio -> ester purity (mol %) R = 1.2 purity 99.538 % R = 1.3 purity 99.922 % R = 1.4 purity 99.970 % R = 1.5 purity 99.984 % R = 1.7 purity 99.992 % R = 2.0 purity 99.996 % case studies at the spec reflux design feed purity 99.700 % distillate light 0.9851 lean feed, 55 % light purity 99.988 % distillate light 0.9185 rich feed, 63 % light purity 97.698 % distillate light 1.0000 alpha 10 % low purity 99.599 % distillate light 0.9844
The design specification converged in six iterations to a reflux ratio of 1.224, with a reflux flow of 46.8 kmol/h. That is lower than the 1.34 from the stage-by-stage design calculation in lesson 6, because 24 stages is more than the 21 needed at 1.34. With more stages, less reflux meets the same purity.
Sensitivity analysis
A sensitivity analysis varies one or more inputs over a range and tabulates or plots chosen outputs. It does not adjust anything to meet a target; it shows how the process responds. Most simulators let the user define the varied variable, its range and step, and the outputs to record, then run the cases automatically. It is the single most useful study for understanding a process and for explaining it to others.
The sensitivity shows that purity is very sensitive to reflux near the specification. A drop from 1.224 to 1.2, only 2 %, takes purity from 99.70 to 99.54 %, off specification. Above about 1.5, extra reflux buys almost nothing. Wren draws the operational conclusion at once: running at exactly the specification reflux leaves no margin for disturbances, and the plant will run with some margin. How much margin is an economic question, answered in lesson 12.
Worked problem
Reading a sensitivity table
From the table, estimate the reflux ratio needed for a purity of 99.9 %.
Show solution
- At R = 1.2 the purity is 99.538 %; at R = 1.3 it is 99.922 %.
- 99.9 % lies between them, much nearer 1.3.
- Linear interpolation: \(1.2 + 0.1 \times (99.9 - 99.538) / (99.922 - 99.538) = 1.2 + 0.1 \times 0.943 = 1.294\).
- Because the curve is concave, the true value is slightly below this.
Answer: About 1.29. For a more exact answer, set a design specification at 99.9 %.
Case studies
A case study runs the model for a set of discrete scenarios, each with its own inputs, and compares the results. Typical cases for a design are the design case, minimum and maximum throughput, summer and winter cooling water, fresh and aged catalyst, and feeds at the edges of their expected composition range. Each case uses the same model with different inputs. Simulators provide a case manager or scenario tool for this; Theo keeps a table of cases in the model log with the inputs for each.
The code runs four cases at the specification reflux. The lean feed, with 55 % light material instead of 59.1 %, gives higher purity, because there is less light material to remove. The rich feed, with 63 % light, gives 97.70 %, far off specification. The reason is instructive. The model holds the distillate rate fixed at its design value. A rich feed has more light material than that distillate can carry, so the excess must go to the bottoms, whatever the reflux. The distillate composition reaches pure light material and can do no more. This is a specification problem, not a stage or reflux problem: the plant needs to raise the distillate rate when the feed gets richer, which is what the composition control from CHE-374 does by adjusting the distillate-to-feed ratio.
The last case reduces the relative volatility by 10 %, to represent uncertainty in the thermodynamic model. The purity falls to 99.60 %, off specification. It tells Theo and Ingrid that the column has little design margin against thermodynamic uncertainty at the specification reflux. Combined with the sensitivity result, it supports designing the reflux system for a ratio well above 1.224.
| Study | Question answered | What it changes | Typical output |
|---|---|---|---|
| Design specification | What input meets this target? | One manipulated variable, automatically | The required value |
| Sensitivity analysis | How does the output respond to this input? | One or two inputs over a range | Table or plot |
| Case study | How does the process perform in these scenarios? | Sets of inputs, one set per case | Comparison table |
| Optimization | What inputs give the best objective? | Several inputs within constraints | Optimum point |
Specifications that cannot be met
A design specification can fail to converge for reasons that have nothing to do with the solver. The target may be unattainable within the bounds on the manipulated variable, as the rich-feed case shows: no reflux ratio achieves 99.7 % if the distillate rate is too small. The target may be attainable only at a value outside the bounds, which the solver will hit and stop. Or the relation may not be monotonic, with two or more inputs giving the same output. A quick sensitivity analysis over the range of the manipulated variable, before setting the specification, reveals all three. Theo makes it a habit: sensitivity first, then the specification.
Design specifications should also be on variables the plant can measure and control. A purity specification on the bottoms is measured by an online analyzer. A specification on a tray composition that no instrument measures may be fine for design but tells operators nothing. Where possible, Theo sets specifications that match the plant's control structure, so that the model behaves as the plant will.
Common mistakes
MistakeRunning a secant on a strongly curved target.
InsteadTransform the target, for example with a logarithm, to make it nearly linear.
MistakeSetting a specification without first checking that it is attainable.
InsteadRun a sensitivity over the manipulated variable's range first.
MistakeDesigning at exactly the specification with no margin.
InsteadUse sensitivity and uncertainty cases to set a design margin.
MistakeFixing a flow that should change with feed composition.
InsteadCheck which variables the control system will actually move.
Summary and key terms
- A design specification adjusts a manipulated variable until a target is met, trading one specification for another.
- For the ester column with 24 stages, the purity specification needs R = 1.224.
- Sensitivity analysis shows how outputs respond to inputs; purity is very sensitive just above the specification.
- Case studies compare discrete scenarios; a rich feed with fixed distillate rate cannot meet purity at any reflux.
- Check attainability by sensitivity before setting a specification, and set specifications on controllable variables.
- Design specification
- A target on a calculated variable met by adjusting a chosen input.
- Manipulated variable
- The input a design specification adjusts.
- Sensitivity analysis
- A study that varies inputs over a range and records the response of outputs.
- Case study
- A set of discrete scenarios run on the same model and compared.
- Thomas algorithm
- A direct method for solving tridiagonal linear systems, used in stage-by-stage column models.
- Design margin
- Capacity or performance provided beyond the nominal requirement to cover uncertainty and disturbances.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Why use the logarithm of xB as the target function?
Show answer
It is nearly linear in reflux, so the secant converges smoothly.
What reflux ratio meets 99.7 % with 24 stages?
Show answer
About 1.224.
Why is the 24-stage reflux lower than the lesson 6 value of 1.34?
Show answer
More stages need less reflux for the same purity.
What happens with a rich feed and fixed distillate rate?
Show answer
Excess light material must go to the bottoms; purity falls to 97.7 % regardless of reflux.
What does the α 10 % low case show?
Show answer
Little design margin against thermodynamic uncertainty at the specification reflux.
What should be done before setting a design specification?
Show answer
Run a sensitivity analysis to check that the target is attainable within bounds.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.