Teaching · Graduate · 2105603

Advanced Chemical Engineering Thermodynamics

Introduction to molecular thermodynamics, equations of state, equations for activity coefficients, thermodynamic property determination, multicomponent phase equilibrium, process analysis, and chemical equilibrium.

Code
2105603 · 3 (3-0-9)
Term
Semester 1 / 2026
Level
Graduate · M.Eng. and Ph.D. Chemical Engineering
Taught by
Chanon Pornrungroj · Soorathep Kheawhom
Department
Chemical Engineering, Faculty of Engineering, Chulalongkorn University

How the modules connect

The whole course is one criterion — at fixed temperature and pressure a system settles into the state of lowest Gibbs energy — applied under steadily weaker assumptions. The first three modules build the quantity that criterion needs. The last three apply it, each one dropping an assumption the module before it relied on.

Modules 1–3  —  building the quantity

Module 1 · Pure fluid

Equation of state

How pressure, volume and temperature are related for a real fluid. It says how the fluid responds — not, by itself, which phase it will be in.

Module 2 · The criterion

Fugacity

Equilibrium is governed by chemical potential, which has no absolute value and runs to minus infinity at zero pressure. Fugacity is constructed to replace it — and the equation of state is what computes it.

Module 3 · Mixtures

Solution thermodynamics

The same quantities for a mixture: partial molar properties, activity, excess Gibbs energy. Gibbs-Duhem then fixes what the last three can be, so the components cannot be modelled one at a time.

Modules 4–6  —  applying it

Module 4 · Two phases

Vapour-liquid equilibrium

Equal fugacity in both phases, with the model now fitted to measured data rather than derived. Where the course stops asking what the equations say and starts asking whether the data can be believed.

Module 5 · Any phases

Phase stability

A flash returns a solution to the equations it was handed, and that need not be the lowest-energy state. The tangent plane test asks the question a flash cannot: is this the global minimum?

Module 6 · Rearranged atoms

Chemical equilibrium

The same minimisation, constrained now by an element balance instead of by a phase split. Nothing new is introduced, and it ends at the calculation an equilibrium reactor block performs.

Start here

This page is the primary reference for the course. Work through it in module order — each one assumes the one before it. Modules 1 to 3 come before the midterm; Modules 4 to 6, from vapour-liquid equilibrium onwards, are the second half.

1 · Read

The deck first, in order

Slides open in the browser — nothing to download, and they work on a phone. Press F for full screen, E for a printable layout, ? for every shortcut. Every equation is live text, so it stays sharp at any zoom and can be copied.

2 · Run

Then the notebook, actually running

Each notebook opens in Google Colab in one click. Nothing to install, no Python on your own machine, and the course toolkit downloads itself in the first cell. Reading a notebook is not doing it — change a number and find out what breaks.

3 · Check

Answer before you look

Every module ends in a short set of questions. Write your answer down first, then open the model answer. A question you can only answer after reading the answer is a question you cannot answer.

4 · Verify

The rule of this course

Any number produced by a machine — your code, a library, or an AI assistant — must be reproduced by an independent route before you report it: from-scratch code, a reference implementation, or an analytical limit. An unverified result scores zero whether or not it happens to be right.

What you need beforehand. Undergraduate thermodynamics and enough Python to read a short script and change a number in it. You are not expected to be able to write the toolkit; you are expected to be able to read it, which is why every routine in it is short enough to read in one sitting. Bring questions about the code to class — they are not off-topic.

Modules

Slides open in the browser — no download, and they work on a phone. Press F for full screen, E for a printable layout, ? for every shortcut. Every equation is live text, so it stays sharp at any zoom.

Module 1 · Evolution of Equations of State

A physics-driven perspective

Fifty-six slides tracing one argument: every equation of state was written because the previous one omitted physics that turned out to matter. Ideal gas to van der Waals to the cubics to SAFT to electrolyte models, with the cost of each addition made explicit.

Check yourself — 4 questions
  1. Van der Waals predicts Zc = 3/8 for every substance, while real values run from about 0.23 to 0.31. Which assumption forces a single number, and why did SRK and PR not repair it?
    Answer

    Both parameters are fixed by the critical point alone, so the equation carries nothing about molecular shape or polarity — the role the acentric factor was later invented for. SRK and PR did not repair it; they fix Zc at 1/3 and 0.307 instead. A cubic can be made to reproduce Zc only by giving up accuracy elsewhere, and vapour pressure was judged worth more.

  2. SRK and PR use the same mixing rules and the same critical constants. What did Peng and Robinson change, and which property improved?
    Answer

    The volume dependence of the attractive term: the denominator becomes v(v+b) + b(v−b) rather than v(v+b). Saturated liquid density improves substantially; vapour pressure barely moves. That is why PR became the standard wherever liquid density feeds equipment sizing.

  3. The virial equation is exact. Why is it still useless for a liquid?
    Answer

    It is exact as an infinite series in density. Truncated after B or C it is limited to densities where the neglected terms are small — roughly up to half the critical density. A liquid is far outside that, and the higher coefficients are neither known nor usefully convergent there.

  4. An equation of state reproduces vapour pressure to 1 per cent and saturated liquid density to 15 per cent. Name one design calculation it is fine for and one it will ruin.
    Answer

    Fine for stage-by-stage distillation, which is driven by K-values and therefore by vapour pressure. Ruinous for anything sized by volume — vessel and line sizing, relief capacity, storage inventory, or a level inferred from density.

Module 2 · Fugacity, Chemical Potential and the Equilibrium Criterion

Why pressure is not the driving force

Chemical potential is the true driving force, it is unusable in raw form, and fugacity is the quantity constructed to make it usable. The module ends by deriving the Maxwell equal-area construction — presented in Module 1 as a recipe to be accepted — from equality of fugacity.

Check yourself — 4 questions
  1. Chemical potential is the true driving force. Why can it not be used as the working variable?
    Answer

    It has no absolute value — only differences from a reference are defined — and for an ideal gas it runs to −∞ as pressure goes to zero. A quantity with no zero and an infinite limit cannot be tabulated or compared across substances.

  2. Fugacity has units of pressure and equals pressure for an ideal gas. Does that make it a corrected pressure?
    Answer

    No. It is defined by RT d ln f = dμ at constant T, with f/P → 1 as P → 0. The units and the ideal-gas limit follow from that choice of reference; they are not the meaning. Two phases in contact are at the same pressure whether or not they are at equilibrium — it is equal fugacity that identifies equilibrium.

  3. When does the Poynting factor matter, and what decides the answer?
    Answer

    The liquid molar volume. The exponent is vL(P − Psat)/RT, so a compact liquid such as water needs several times the pressure above saturation that a bulky one such as n-hexane does before the correction reaches 1 per cent. Negligible near saturation, never negligible at high pressure.

  4. Module 1 presented the Maxwell equal-area construction as a rule to accept. What makes it true?
    Answer

    Equality of fugacity between the two roots of the same isotherm. Write that condition out, integrate, and the equal-area statement drops out — the two are one equation reached from opposite ends, not two independent facts. The Module 2 notebook does this numerically and the two pressures agree to eleven figures.

Module 3 · Solution Thermodynamics

Partial molar properties, activity, and the constraint that ties them

The mixture toolkit with the rigour Module 1 applied to pure fluids: partial molar properties, fugacity in a mixture, excess properties, activity and its reference state, and the Gibbs-Duhem constraint that makes an activity coefficient model a choice of excess Gibbs energy rather than an item on a list to memorise.

Check yourself — 4 questions
  1. A partial molar volume can be negative. Is volume being destroyed?
    Answer

    No. It says that adding a mole of that species at fixed T, P and other amounts decreases the total volume, because the added species orders and compresses the solvent around it — electrostriction, for small ions. It is a derivative of a mixture property, not a property of the molecule.

  2. You fit ln γ1 and ln γ2 separately and each fits its own branch better than a single GE model does. What is wrong with that?
    Answer

    Gibbs-Duhem forbids it: at fixed T and P, x1 d ln γ1 + x2 d ln γ2 = 0, so choosing one fixes the other. A better pointwise fit that breaks the constraint is not a better model — it is a pair of curves that cannot both be true. Fit quality will never tell you this; only the residual will.

  3. The same fugacity data gives two different activity coefficients depending on the reference state. How are they related, and when would you choose Henry?
    Answer

    γ*(Henry) = γ(Lewis-Randall) / γ. Choose Henry when the pure liquid does not exist at the conditions of interest — a dissolved gas, or a solute above its critical temperature — because Lewis-Randall then needs a hypothetical reference state.

  4. GE is positive for a mixture. Does that mean the molecules dislike each other?
    Answer

    Not by itself. GE = HE − TSE, and the excess entropy term can carry all of it. Near room temperature ethanol/water has a positive GE with a negative HE — mixing releases heat — and the positive value comes entirely from −TSE. Separating them needs the temperature dependence.

Module 4 · Vapour-Liquid Equilibrium of Mixtures

Building an activity coefficient model from data

Four descriptions of the same equilibrium; the four classes of binary solution — ideal, positive deviation, negative deviation and partial miscibility — with the criterion that decides which one you have; then the full working cycle — what a VLE apparatus measures and how well, whether a published dataset can be believed, which model fitted against which objective, and how that model is carried into an equation of state. The module where the course stops being about equations and starts being about evidence.

Slides Vapour-Liquid Equilibrium of Mixtures Opens in the browser Open → Examples Worked examples A notation card, then eight problems worked end to end with the arithmetic shown — gamma from one measured row, classifying a system, the area test by trapezoid, bubble and dew to convergence, a two-parameter fit by hand, K-values and Fenske, and a fugacity coefficient from Peng-Robinson. Every answer checked against vlekit. 34 pages. Download → Code vlekit The toolkit used from here to the end of the course — data reduction, five consistency tests, regression with bootstrap, UNIFAC, flash, stability, Peng-Robinson mixtures, the Huron-Vidal and Wong-Sandler mixing rules, five published VLE datasets and reaction equilibrium. 335 tests. Download → Colab Capstone notebook One dataset end to end, from measurement to a written domain of validity. Runs in Colab. Run it → Notebook Capstone notebook — the .ipynb file To run it on your own machine instead Download → Colab Case-study notebook Four published binaries worked as case studies — the four solution types derived rather than listed, both azeotropes located, all four bubble and dew calculations written from scratch, and the same model carried into Peng-Robinson by Huron-Vidal and Wong-Sandler. Runs in Colab. Run it → Notebook Case-study notebook — the .ipynb file To run it on your own machine instead Download → Notes EoS-GE mixing rules Huron-Vidal and Wong-Sandler, four pages. The algebra behind the lectured section, for reference. Download → Slides Slides as PDF For annotating or printing; the browser version is the primary one Download → Code Figure toolkit Every figure in the deck, with the Python that generates it Download →
Check yourself — 7 questions
  1. A published isothermal P-x-y set passes the area test and fails the point test. Which do you believe?
    Answer

    The point test. The area test integrates ln(γ12) across the whole range, so equal and opposite errors cancel and a systematically wrong dataset can pass. The point test looks at each residual and cannot cancel. Passing the integral while failing point by point means the errors have structure.

  2. Two models fit one dataset equally well but predict infinite-dilution activity coefficients differing by a factor of two. What went wrong?
    Answer

    Nothing in the fitting. The data do not constrain the dilute ends, and the disagreement is an honest measure of what they can support. Quoting γ from such a fit is extrapolation reported as a result.

  3. Why does the choice of objective function change the fitted parameters, and how do you decide which to use?
    Answer

    Each objective minimises a different residual — in P, in y, in γ, in ln γ — and so weights the composition range differently. Decide by what the model is for: fit in P if you will predict pressures. Never rank models across objectives by a single fit statistic, because the statistics are not measuring the same quantity.

  4. Two binaries both show positive deviation from Raoult's law. One azeotropes and one does not. What decides it?
    Answer

    The size of the deviation relative to the ratio of pure vapour pressures. An azeotrope needs γ12 = P2sat/P1sat to have a root between 0 and 1, so at the ends it is γ1 against P2sat/P1sat. If the components boil far enough apart, no achievable deviation closes the gap — which is why methanol/water does not azeotrope and ethanol/water does.

  5. On chloroform/2-butanone, classical van der Waals mixing with a fitted kij beats Huron-Vidal — 1.34 per cent against 2.08. So why use the GE mixing rules at all?
    Answer

    Because one binary at one temperature is not the claim. The GE rules carry a fitted activity model into the equation of state, so the same parameters work for strongly non-ideal and asymmetric mixtures where a single kij has no shape to give. Wong-Sandler additionally keeps the second virial coefficient quadratic in composition, which is what lets it extrapolate in temperature and pressure; Huron-Vidal violates that by 2.2 per cent of the excess second virial on this system and 22.9 per cent on ethanol/water.

  6. A process simulator asks you for binary interaction parameters and never asks for a ternary one, even for a ten-component column. Why is that enough?
    Answer

    Because the local-composition models — Wilson, NRTL, UNIQUAC — are built from pairwise interactions, so the N-component expression is assembled from the N(N−1)/2 binary parameter sets with nothing further fitted. Margules and van Laar have no such extension. It is the practical reason the local-composition forms displaced the empirical ones, and it is also a prediction: the ternary is not validated by the binary data it was built from.

  7. What does Barker's method use, and why would you prefer it?
    Answer

    Only T, P and x — the vapour composition is computed rather than measured. Prefer it because y is the hardest of the four to measure and carries the largest error, so a fit that never touches it can be more trustworthy than one that does.

Module 5 · Phase Stability and Complex Equilibria

The question a flash calculation cannot ask

A flash solves the equilibrium equations it was given, and those equations have solutions that are not the global minimum. This module supplies the missing test — the tangent plane criterion — and then follows it into liquid-liquid equilibrium, distillation boundaries and retrograde condensation.

Check yourself — 4 questions
  1. A flash converges cleanly and reports two phases. What has it not checked?
    Answer

    Whether that answer is the global minimum of the Gibbs energy. The equations have several solutions and the flash finds whichever lies near its initial guess. A local minimum converges just as cleanly, with no warning.

  2. State the tangent plane criterion, and say what makes it a criterion rather than one more equation to solve.
    Answer

    The feed is stable if and only if TPD(w) ≥ 0 for every trial composition w. It quantifies over all w rather than solving for a particular one — which is also why the difficulty lies in the search, not in the formula.

  3. Binodal and spinodal both mark a miscibility gap. What is the difference, and which region traps a flash?
    Answer

    The binodal is where two compositions share a common tangent — equal chemical potentials. The spinodal is where the curvature of G changes sign. Between them the mixture is metastable: stable against small perturbations, unstable against large ones. That is the region where a flash returns a locally sound, globally wrong answer.

  4. Retrograde condensation forms liquid as pressure falls. Which feature of the phase envelope permits it?
    Answer

    The stretch between the critical point and the cricondentherm, where the dew-point branch turns back on itself so an isothermal path crosses it twice. It follows from the shape of the envelope, not from anomalous fluid behaviour.

Module 6 · Chemical Equilibrium

The same criterion, under a different constraint

Nothing new is introduced. The equilibrium criterion, the fugacity coefficient and the activity coefficient from the earlier modules are applied to a new constraint, and the module ends where the whole course has been heading: one constrained minimisation of the Gibbs energy, which is what an equilibrium reactor block in a process simulator solves.

Check yourself — 4 questions
  1. Reaction extent and Gibbs energy minimisation must agree. What does each need that the other does not?
    Answer

    Extent needs you to have written the reactions: the stoichiometry is your input, and a product you did not think of cannot appear. Minimisation needs only a species list and an element balance, and will find products you did not anticipate — which is exactly why a simulator's equilibrium reactor uses it.

  2. Why can you not take carbon from a property database when you mean graphite?
    Answer

    Because the name resolves to a different allotrope, with a different standard entropy and no defined formation enthalpy. Graphite is the reference state with ΔHf = 0 by definition, and the substitution shifts every ΔG in which solid carbon appears. The Module 6 notebook makes you check this against the Boudouard reaction.

  3. In the Debye-Hückel limiting law γ± falls monotonically, but real electrolytes show a minimum and then rise. What is missing?
    Answer

    Everything except long-range electrostatics. The rise comes from short-range ion-ion repulsion and from the loss of free solvent as ions are hydrated — the terms Pitzer's virial-like expansion adds on top of the Debye-Hückel core.

  4. A cell voltage computed from standard potentials disagrees with the measurement. Which two corrections do you apply first?
    Answer

    Activity instead of concentration inside the Nernst term, and the temperature dependence of E° through ΔS. At practical concentrations both are larger than the measurement error.

Generative AI. Permitted and expected on homework, notebooks and the project: for code, for checking a derivation, for reading around a topic. Not permitted in the midterm or the final, which are closed resource. Every submission carries a short AI-use statement, and any machine-produced number must be reproduced by an independent route — from-scratch code, a reference library, or an analytical limit. An unverified result scores zero whether or not it happens to be right.