Skip to content

Cooling Crystallization with Measured Solubilities

In this tutorial you will crystallize ibuprofen from n-heptane by cooling. You start from five solubilities measured in the laboratory, fit the NRTL model to them, and use the fitted model in a Crystallizer that reads the solubility from the property package. The result is the yield, the cooling duty and the supersaturation of the feed, and a table of yield against the final temperature.

What you will learn

  • How the solubility of a solid follows from its melting point, its enthalpy of fusion and the activity coefficient of the liquid model
  • How to fit the NRTL parameters of a solute and a solvent to measured solubilities with the Solubility and Solvent Screening tool
  • How to set up a Crystallizer that takes the solubility from the property package
  • How to read the supersaturation ratio and the saturation temperature of a feed

Prerequisites

  • Completed Simple Flash Drum
  • DWSIM 10.3.0 or later
  • The Solubility and Solvent Screening tool is part of the Patreon edition (Premium+). Step 3 shows how to follow the tutorial without it.

Process Overview

Ibuprofen leaves its synthesis as a crude acid that is purified by crystallization. The crude is dissolved in warm n-heptane and the solution is cooled. Ibuprofen is much less soluble in cold heptane, so most of it comes out as crystals, and the impurities stay in the mother liquor.

The design question is how much product a given final temperature recovers. The answer depends on one curve, the solubility of ibuprofen in n-heptane against temperature. A simulator can predict that curve from group contributions, but the prediction is often off by a factor of two or more for a molecule like this one. A handful of measurements fixes that: the model is fitted to them and then describes the system inside the measured range.

graph LR
    F["Feed<br/>1000 kg/h, 35 °C<br/>4.8 mol % ibuprofen"] --> C["CRY-101<br/>cooling to 5 °C"]
    C --> X["Crystals"]
    C --> M["Mother liquor"]

Key Design Parameters

Parameter Value
Compounds Ibuprofen, N-heptane
Property Package NRTL
Fusion data of ibuprofen melting point 75.1 °C, enthalpy of fusion 26.42 kJ/mol (already in the compound)
Measured solubilities five points between 8.8 and 28.9 °C, see step 2
Feed 1000 kg/h, 35 °C, 1.01325 bar, mole fractions 0.048 ibuprofen and 0.952 n-heptane
Crystallizer cooling mode, solubility from the property package, 5 °C

The feed holds what a solution saturated near 28 °C holds. It enters at 35 °C, a few degrees above its saturation temperature, as a clear liquid.

Step-by-Step in the Classic UI

1. Set up

File > New Chemical Process Model: add Ibuprofen and N-heptane, choose NRTL as the property package and set the units you prefer. The values below are in °C, bar, kg/h and kW.

2. Type the measured solubilities

Open Utilities > Solubility and Solvent Screening. Select NRTL as the property package and Ibuprofen as the solute, and leave N-heptane checked in the list of solvents.

In Measured solubilities, type one point per line as the solvent, the temperature and the mole fraction of ibuprofen in the saturated solution. The decimal separator is the one of the operating system.

N-heptane; 8.76; 0.0100
N-heptane; 17.41; 0.0200
N-heptane; 22.41; 0.0299
N-heptane; 26.06; 0.0399
N-heptane; 28.92; 0.0500

Set the hot temperature to 30 and the cold temperature to 5, and press Run. The Solubility curves tab shows the curve of the model with the five measured points as markers, and the Measured tab compares them one by one. With the parameters the package estimated for this pair, the model gives two to four times the measured solubility.

Where the solubility comes from

At saturation the liquid and the pure solid are in equilibrium, which gives

ln(x γ) = -(ΔHfus / (R T)) (1 - T / Tf)

The right-hand side depends only on the solid: its melting point Tf and its enthalpy of fusion ΔHfus. The liquid model enters through the activity coefficient γ alone. A measured solubility x therefore tells you what γ is at that temperature, and that is what the fit uses.

3. Fit NRTL to the measured points

Press Fit NRTL to measured points. The Messages tab shows the result:

A12 (cal/mol) A21 (cal/mol) alpha
Before (estimated by the package) 266.0 387.3 0.2
After the fit -1145.2 3186.1 0.2

Compound 1 is ibuprofen and compound 2 is n-heptane. The same tab lists the solubility of the model at each measured temperature, before and after:

T (°C) Measured Before After
8.76 0.0100 0.0419 0.0114
17.41 0.0200 0.0631 0.0194
22.41 0.0299 0.0798 0.0276
26.06 0.0399 0.0948 0.0376
28.92 0.0500 0.1085 0.0523

Messages tab after the fit, with the parameters and the comparison point by point

The fit runs on a private copy of the property package. Press Store in package to write the two energies to the package of the flowsheet, then Run again: the curve now passes through the markers.

Solubility curve of the fitted model with the measured points

Without the Solubility and Solvent Screening tool

Type the fitted values by hand. Open Settings > Thermodynamics, press Configure on the NRTL package and, in the grid of interaction parameters of the pair Ibuprofen / N-heptane, enter A12 = -1145.2, A21 = 3186.1 and alpha12 = 0.2, with ibuprofen as the first compound. The rest of the tutorial is the same.

4. Specify the feed

Add a material stream named Feed: 35 °C, 1.01325 bar, 1000 kg/h, mole fractions 0.048 for ibuprofen and 0.952 for n-heptane. It solves as a single liquid.

5. Add the crystallizer

From Bioprocess Ops in the palette, drag a Crystallizer onto the flowsheet and name it CRY-101. Add two material streams, Crystals and Mother liquor. In the Connections tab of the crystallizer, connect Feed to the Feed port, Crystals to the Crystals port and Mother liquor to the Mother Liquor port.

In the Parameters tab:

Parameter Value
Mode Cooling
Solubility Source PropertyPackage
Solute Compound Ibuprofen
Solvent Compound N-heptane
Operating Temperature 5 °C

With the property package as the solubility source, the coefficients A, B and C of the solubility correlation are left as they are; the block does not read them.

6. Solve and read the results

Press Solve. The Results tab of the crystallizer shows:

Result Value
Solute mole fraction at saturation 0.00918
Supersaturation ratio of the feed 5.44
Saturation temperature of the liquor 28.3 °C
Crystallized 76.8 kg/h
Crystallization Yield 81.6 %
Crystals in the slurry 7.7 wt %
Heat Duty -21.2 kW

Solved flowsheet with the feed, CRY-101, the crystals and the mother liquor

Results tab of the crystallizer

Saturation temperature: the feed becomes saturated at 28.3 °C. Crystals start to form when the solution is cooled below that temperature, and a crystallizer operated above it gives a yield of zero.

Supersaturation ratio: the feed carries 5.44 times the ibuprofen the liquor can hold at 5 °C. A ratio above one means crystals form; the larger it is, the larger the share of the solute that crystallizes.

Heat duty: the 21.2 kW cool the solution from 35 to 5 °C and remove the heat released by the 76.8 kg/h that crystallize. The Crystals stream leaves as a solid phase, so the heat of crystallization is part of the balance.

7. See how the yield changes with the final temperature

Change the Operating Temperature of the crystallizer and solve again, or run a Sensitivity Analysis with it as the independent variable and the Crystallization Yield as the dependent one:

Final temperature (°C) x at saturation Yield (%) Duty (kW)
25 0.03409 30.0 -7.2
20 0.02310 53.1 -11.1
15 0.01660 66.5 -14.6
10 0.01226 75.4 -18.0
5 0.00918 81.6 -21.2
0 0.00693 86.2 -24.3

The first 10 °C of cooling below saturation recover more than half of the product. Going from 5 to 0 °C adds 4.6 points of yield for 3 kW of refrigeration at a lower temperature level, which is the trade-off a designer weighs.

How Far to Trust the Fitted Model

Inside the measured range: the fitted model stays within 14 % of each of the five points, and within 8 % of four of them. The crystallizer of this tutorial works between 5 and 28 °C, close to that range; the point at 5 °C lies 4 °C below the coldest measurement.

Above the measured range: the measurements stop at 29 °C, and everything the model says above that temperature is an extrapolation. Size a dissolution step at 50 or 60 °C with measurements at those temperatures.

Number of points: two energies fitted to two points reproduce them exactly and say little about the rest of the curve. Five points over the range of the process is a sound minimum.

Fusion data: the fit takes the melting point and the enthalpy of fusion as given. Check them against a measurement (a DSC run) when the compound comes from a database.

Results and Validation

Expected results

After the fit the NRTL energies of ibuprofen (1) and n-heptane (2) are A12 = -1145.2 and A21 = 3186.1 cal/mol with alpha = 0.2. The crystallizer at 5 °C gives 76.8 kg/h of crystals, a yield of 81.6 %, a supersaturation ratio of 5.44 for the feed, a saturation temperature of 28.3 °C and a duty of -21.2 kW.

The measured solubilities are those of Hahnenkamp, Graubner and Gmehling (2010). The numbers of the tables come from the Python script below.

Automating This Tutorial

Files in this repository

The script writes the fitted energies into the NRTL package directly, so it runs in every edition. It then compares the model with the five measured points, solves the crystallizer and prints the table of step 7.

import os
import sys

import pythonnet
pythonnet.load("netfx")              # DWSIM is a .NET Framework application
import clr  # noqa: E402

DWSIM_BIN = os.environ.get("DWSIM_BIN")
if not DWSIM_BIN:
    raise SystemExit("Set DWSIM_BIN to the DWSIM installation folder before running.")
for sub in ("", "unitops", "ppacks", "extenders"):
    sys.path.append(os.path.join(DWSIM_BIN, sub))
clr.AddReference("DWSIM.Automation")
clr.AddReference("DWSIM.Automation.FluentAPI")
clr.AddReference("DWSIM.Thermodynamics")
clr.AddReference("DWSIM.UnitOperations")

from System import Array, Double, String  # noqa: E402
from System.Collections.Generic import Dictionary  # noqa: E402
from DWSIM.Automation.FluentAPI import Flowsheet, PropertyPackages, Q  # noqa: E402
from DWSIM.Thermodynamics.PropertyPackages.Auxiliary import NRTL_IPData, SolidSolubility  # noqa: E402
from DWSIM.UnitOperations.UnitOperations import CrystallizerMode, CrystallizerSolubilitySource  # noqa: E402

SOLUTE, SOLVENT = "Ibuprofen", "N-heptane"
P = 101325.0

# Measured solubility of ibuprofen in n-heptane: temperature (K) and mole fraction of ibuprofen
# (Hahnenkamp, Graubner and Gmehling, Int. J. Pharm. 388 (2010) 73, Table 2)
MEASURED = [(281.91, 0.0100), (290.56, 0.0200), (295.56, 0.0299), (299.21, 0.0399), (302.07, 0.0500)]

# NRTL energies of ibuprofen (1) / n-heptane (2) fitted to those points, cal/mol
A12, A21, ALPHA = -1145.2, 3186.1, 0.2

# --- 1. Compounds and property package ---------------------------------------------------------
fs = Flowsheet.Create("CoolingCrystallization").WithCompounds(Array[String]([SOLUTE, SOLVENT]))
fs = fs.WithPropertyPackage(PropertyPackages.NRTL)
package = list(fs.Inner.PropertyPackages.Values)[0]
package = getattr(package, "__implementation__", package)   # the NRTL package itself, past its interface

# --- 2. The fitted pair goes into the package ----------------------------------------------------
pair = NRTL_IPData()
pair.ID1, pair.ID2 = SOLUTE, SOLVENT
pair.A12, pair.A21, pair.alpha12 = A12, A21, ALPHA
pair.comment = "Fitted to five measured solubilities"
pairs = package.m_uni.InteractionParameters
if pairs.ContainsKey(SOLVENT):
    pairs[SOLVENT].Remove(SOLUTE)
if not pairs.ContainsKey(SOLUTE):
    pairs[SOLUTE] = Dictionary[String, NRTL_IPData]()
pairs[SOLUTE][SOLVENT] = pair

# --- 3. Feed: 1000 kg/h of solution saturated near 28 C, held at 35 C ----------------------------
X_FEED = 0.048                                 # mole fraction of ibuprofen
MW = {SOLUTE: 206.281, SOLVENT: 100.202}
mass = {SOLUTE: X_FEED * MW[SOLUTE], SOLVENT: (1.0 - X_FEED) * MW[SOLVENT]}
total = sum(mass.values())
feed = fs.AddMaterialStream("Feed").At(Q.Kelvin(35.0 + 273.15), Q.Pascal(P))
for name in (SOLUTE, SOLVENT):
    feed.SetCompoundMassFlow(name, 1000.0 / 3600.0 * mass[name] / total)

crystals = fs.AddMaterialStream("Crystals")
liquor = fs.AddMaterialStream("Mother liquor")

# --- 4. Crystallizer: cooling to 5 C, solubility from the property package -----------------------
cry = fs.AddCrystallizer("CRY-101")
cry.WithMode(CrystallizerMode.Cooling).WithSoluteCompound(SOLUTE).WithSolventCompound(SOLVENT)
cry.WithSolubilitySource(CrystallizerSolubilitySource.PropertyPackage)
cry.WithOperatingTemperature(Q.Kelvin(5.0 + 273.15))
cry.ConnectFeed(feed, 0).ConnectProduct(crystals, 0).ConnectProduct(liquor, 1)
fs.Solve()

# --- 5. The model against the measured points ----------------------------------------------------
package.CurrentMaterialStream = feed.Object
names = list(package.RET_VNAMES())
i_solute = names.index(SOLUTE)
solvent = [0.0] * len(names)
solvent[names.index(SOLVENT)] = 1.0
solvent = Array[Double](solvent)

print("Solubility of ibuprofen in n-heptane, mole fraction")
print(f"{'T (C)':>8}{'measured':>11}{'model':>9}{'dev %':>8}")
for t, x in MEASURED:
    package.CurrentMaterialStream = feed.Object
    model = SolidSolubility.Saturation(package, i_solute, solvent, t, P).MoleFraction
    print(f"{t - 273.15:8.2f}{x:11.4f}{model:9.4f}{(model / x - 1.0) * 100.0:8.1f}")

# --- 6. Results of the crystallizer ---------------------------------------------------------------
c = cry.Object
print("\nCrystallizer CRY-101 at 5 C")
print(f"  Saturation mole fraction      {c.Result_SaturationMoleFraction:.5f}")
print(f"  Supersaturation of the feed   {c.Result_Supersaturation:.2f}")
print(f"  Saturation temperature        {c.Result_SaturationT_K - 273.15:.1f} C")
print(f"  Crystals                      {c.Result_Cryst_kgs * 3600.0:.1f} kg/h")
print(f"  Yield                         {c.Result_Yield * 100.0:.1f} %")
print(f"  Crystals in the slurry        {c.Result_SolidsInSlurry * 100.0:.1f} wt %")
print(f"  Cooling duty                  {c.Result_Duty_kW:.2f} kW")

# --- 7. Yield against the final temperature --------------------------------------------------------
print("\nFinal temperature against yield")
print(f"{'T (C)':>8}{'x(sat)':>10}{'yield %':>9}{'duty kW':>9}")
for t_c in (25.0, 20.0, 15.0, 10.0, 5.0, 0.0):
    c.OperatingT_K = t_c + 273.15
    fs.Solve()
    print(f"{t_c:8.1f}{c.Result_SaturationMoleFraction:10.5f}{c.Result_Yield * 100.0:9.1f}{c.Result_Duty_kW:9.2f}")

# leave the flowsheet at the design point
c.OperatingT_K = 5.0 + 273.15
fs.Solve()

Output may vary

Results depend on the LLM's reasoning quality and tool-use accuracy. Always verify the simulation matches your intent before relying on the numbers.

In the DWSIM Assistant, build the following simulation:

- Compounds Ibuprofen and N-heptane, property package NRTL
- NRTL interaction parameters of Ibuprofen (1) / N-heptane (2):
  A12 = -1145.2 cal/mol, A21 = 3186.1 cal/mol, alpha12 = 0.2
- A stream "Feed" at 35 °C and 1.01325 bar, 1000 kg/h, mole fractions
  0.048 ibuprofen and 0.952 n-heptane
- A Crystallizer "CRY-101" in cooling mode, solubility source set to
  the property package, solute Ibuprofen, solvent N-heptane, operating
  temperature 5 °C, with outlet streams "Crystals" and "Mother liquor"
- Solve and report the crystallization yield, the mass flow of
  crystals, the supersaturation ratio of the feed, the saturation
  temperature of the liquor and the heat duty
- Then repeat for operating temperatures of 25, 20, 15, 10 and 0 °C
  and tabulate the yield and the duty

Exercises

  1. Fit the model with only the first and the last measured points. How do the parameters change, and how far is the fitted curve from the three points you left out?
  2. The feed is diluted to a mole fraction of 0.03 with the same total flow. What are the new saturation temperature and the yield at 5 °C?
  3. Find the final temperature that recovers 75 % of the ibuprofen. Check it with an Adjust block that moves the operating temperature of the crystallizer.
  4. Switch the property package to Modified UNIFAC (NIST), which predicts the solubility without measurements, and compare the yield at 5 °C with the one of the fitted NRTL.

Further Reading

  • I. Hahnenkamp, G. Graubner and J. Gmehling. (2010). Measurement and prediction of solubilities of active pharmaceutical ingredients. International Journal of Pharmaceutics, 388, 73-81
  • J. M. Prausnitz, R. N. Lichtenthaler and E. G. de Azevedo. (1999). Molecular Thermodynamics of Fluid-Phase Equilibria, 3rd ed. Prentice Hall, chapter 11 (solubility of solids in liquids)
  • A. S. Myerson, D. Erdemir and A. Y. Lee. (2019). Handbook of Industrial Crystallization, 3rd ed. Cambridge University Press
  • DWSIM User Guide: the Solubility and Solvent Screening tool and the Crystallizer

Next Steps

You now know how to turn a few laboratory measurements into a model the flowsheet can use, and how to read what a cooling crystallizer does with it. Continue with the Features Track to explore TEA, LCA, and the AI Assistant.