Skip to content

Drying: Vacuum Contact Dryer and Freeze Drying in Vials

In this tutorial you will dry two pharmaceutical products in batch dryers. In the first part, a Contact Dryer takes the n-heptane out of a wet ibuprofen cake in an agitated filter-dryer under vacuum, and a condenser recovers the solvent. In the second part, a Lyophilizer freezes a mannitol solution in vials and dries it by sublimation. You will see what data each block needs, how long each batch takes, and how far the product stays from the temperature it must not exceed.

What you will learn

  • How the Contact Dryer follows an agitated bed under vacuum, and which data of the dryer and of the cake it needs
  • Why the bed stays at the boiling temperature of the solvent while it is wet, and why the last tenths of a percent of solvent take the longest
  • How the Contact Dryer compares the solvent left in the product with the ICH Q3C limit
  • How the Lyophilizer follows one vial through freezing, primary drying and secondary drying
  • How the chamber pressure and the shelf temperature set the drying time and the margin to the collapse temperature

Prerequisites

Process Overview

After crystallization and filtration, an active ingredient leaves the filter as a cake that still holds 10 to 30 % of solvent. A vacuum contact dryer heats that cake through a jacket while an agitator turns it, and the vacuum lowers the boiling temperature of the solvent so that the product stays cool. Here the cake is ibuprofen from n-heptane, the solvent of the cooling crystallization tutorial. Ibuprofen melts at 76 °C, so the bed must stay under 60 °C.

A freeze dryer removes water from a product that can't be heated at all, such as a protein or an injectable in its final vial. The solution is frozen on the shelves, the chamber goes under deep vacuum, and the ice sublimes from the top of the cake down. The heat comes from the shelf through the bottom of the vial. The water left bound to the solid desorbs afterwards at a higher shelf temperature. The product must stay under its collapse temperature while it still holds ice, or the dried cake loses its structure.

Both dryers work in batches. In the flowsheet, each one is a single block, and its streams carry the average of the cycle: the feed that one dryer handles per hour, the dried product, the vapor and the heat.

graph LR
    W["Wet cake"] --> D["DRY-101<br/>contact dryer"]
    J["Jacket heat"] -.-> D
    D --> P["Dried ibuprofen"]
    D --> V["Heptane vapor"] --> C["C-101<br/>condenser"] --> R["Recovered heptane"]
    S["Mannitol solution"] --> L["LYO-101<br/>freeze dryer"]
    H["Shelf heat"] -.-> L
    L --> K["Dried cake"]
    L --> WV["Water vapor"]

Key Design Parameters

Parameter Value
Wet cake 160 kg/h at 5 °C, 15 wt % of n-heptane (17.6 % on the dry solid)
Contact dryer agitated filter-dryer, 8 m² of heated area, 1000 kg of dry solid per batch, 2 h to load and unload
Drying conditions jacket at 55 °C, chamber at 50 mbar, down to 0.1 % of heptane on the dry solid, product under 60 °C
Bed bulk density 450 kg/m³, thermal conductivity 0.12 W/(m·K), solid heat capacity 1500 J/(kg·K), particles of 50 µm, agitator at 8 rpm, mixing number 10
Mannitol solution 1.77 kg/h at 20 °C, 5 wt % of mannitol
Vials 20000 vials of the 6R size (22 mm outside, 20 mm inside), 2 mL each, 2 h to load and unload
Freezing shelves to -40 °C at 1 K/min, 2 h of hold
Primary drying shelves at -5 °C, chamber at 150 mTorr (20 Pa)
Secondary drying shelves to 40 °C at 0.2 K/min, down to 0.5 % of water on the dry solid
Formulation collapse temperature -5 °C; vial and cake parameters of Shivkumar et al. (2019) for 5 % mannitol in a 6R vial

Step-by-Step in the Classic UI

Part 1: Vacuum contact drying of an ibuprofen cake

1. Set up

File > New Chemical Process Model. Add Ibuprofen and N-heptane, and add the NRTL property package. In the package settings, set the pair Ibuprofen / N-heptane to A12 = -1145.2 cal/mol, A21 = 3186.1 cal/mol and alpha = 0.2, with ibuprofen as compound 1. These are the energies that the cooling crystallization tutorial fits to measured solubilities. Ibuprofen doesn't have a vapor pressure correlation, so it stays in the solid, and the package gives the boiling temperature and the heat of vaporization of the heptane.

2. Add the wet cake

Add a material stream Wet cake at 5 °C and 1.01325 bar with 160 kg/h, 85 % of ibuprofen and 15 % of n-heptane by mass. This is the feed that one dryer handles in an hour, averaged over its cycle.

3. Add the Contact Dryer

Add a Contact Dryer DRY-101. In the Connections tab, connect Wet cake to the feed port, a new energy stream Jacket heat to the wall heat port, and two new streams to the outlets: Dried ibuprofen and Heptane vapor. In the Parameters tab, enter:

  • Type: Agitated bed, mixing number from a Given value, and N-heptane as the solvent;
  • Dryer and batch: 8 m² of heated area in contact with the bed, 1000 kg of dry solid per batch, 2 h to load and unload;
  • Operation: wall at 55 °C, chamber at 0.05 bar, 0.1 wt % of solvent on the dry solid at the end, and 60 °C as the temperature limit of the product;
  • Bed: bulk density 450 kg/m³, thermal conductivity 0.12 W/(m·K), solid heat capacity 1500 J/(kg·K), particles of 50 µm;
  • Agitation: 8 rpm and a mixing number of 10.

Parameters of the Contact Dryer

The block follows the penetration model of Schlünder and Mollekopf (1984). The heat goes from the wall into the first layer of particles and then into the bed. After a number of turns of the agitator, which is the mixing number, the bed is mixed again and a new contact period starts. The heated area, the batch and the bed properties come from the dryer and from a sample of the cake. The mixing number depends on the dryer and its agitator. If you have a drying curve of the equipment, fit the mixing number to it; if you don't, the block can take it from the correlations of the paper for disc, drum and paddle dryers. The contact coefficient between the wall and the particles is calculated from the particle size and the chamber pressure unless you give one.

4. Condense the heptane

Add a Cooler C-101 with Heptane vapor as its inlet, an outlet Recovered heptane, and an energy stream Condenser duty. Set the outlet temperature to 5 °C and the pressure drop to zero, so that the heptane condenses at the chamber pressure.

5. Solve and read the results

Press Solve.

Contact drying flowsheet

The Results tab gives the cycle, the product, the heat transfer, the batch and the duties, and at the end it lists the solvents left in the product against the ICH Q3C limits:

Results of the Contact Dryer

Result Value
Boiling temperature of heptane at 50 mbar 21.3 °C
Heating to the boiling temperature 38 min
Drying time, heating included / cycle 5.12 h / 7.12 h
Heptane in the product 999 ppm (ICH Q3C limit 5000 ppm)
Bed temperature at the end 50.6 °C, under the 60 °C limit
Bed depth 278 mm
Contact coefficient / mean overall coefficient 2824 / 50 W/(m²·K)
Peak drying rate 15.5 kg/(m²·h), 124 kg/h of vapor for the batch
Batch 1176 kg of wet cake, 175 kg of heptane removed
Capacity of one dryer 165 kg/h of wet cake, 97 % used
Jacket heat, average of the cycle / peak 5.41 / 17.2 kW
Condenser C-101 2.68 kW

The Charts tab draws one batch. While the bed holds liquid, it stays at the boiling temperature of the heptane at the chamber pressure, and the drying rate is highest. As the bed dries, it warms toward the wall temperature, the difference that drives the heat falls, and the rate falls with it:

Drying curve of the Contact Dryer

Bed temperature of the Contact Dryer

The block's condenser duty (2.44 kW in the Results tab) condenses the heptane at its boiling temperature. C-101 takes 2.68 kW because it also cools the liquid down to 5 °C.

6. How dry is dry enough?

Change the target solvent in the product and solve again for each value:

Heptane in the product, ppm Drying time, h Cycle, h Final bed temperature, °C Capacity, kg/h of wet cake
4975 4.12 6.12 47.0 192.1
1996 4.72 6.72 49.4 175.2
999 5.12 7.12 50.6 165.3
500 5.48 7.48 51.5 157.2
200 5.92 7.92 52.4 148.5

The ICH Q3C limit of 5000 ppm for this class 3 solvent is reached in 4.12 h. If you go from there down to 200 ppm, the drying time grows to 5.92 h. The last tenths of a percent are the slow part, because most of the heat that reaches the bed then warms the solid instead of evaporating liquid.

7. Read the operating map

The Operating Map tab solves the batch over a grid of chamber pressures and wall temperatures, and it marks in red the points where the bed goes above the temperature limit or where the cake doesn't dry:

Operating map of the Contact Dryer

The script prints the drying time to 0.1 % on a grid of its own, with the highest bed temperature in brackets:

Jacket, °C 20 mbar 50 mbar 100 mbar 150 mbar
45 4.29 h (39.6 °C) 5.91 h (42.1 °C) 9.50 h (44.0 °C) 41.17 h (45.0 °C)
55 3.99 h (47.9 °C) 5.12 h (50.6 °C) 6.90 h (52.7 °C) 9.40 h (53.9 °C)
60 3.88 h (52.1 °C) 4.85 h (54.8 °C) 6.26 h (57.0 °C) 7.91 h (58.3 °C)

When the pressure falls, heptane boils at a lower temperature and the difference to the jacket grows. In this range the vacuum matters more than the jacket temperature: at 150 mbar heptane boils between 40 and 45 °C, so a jacket at 45 °C barely dries the cake.

Part 2: Freeze drying of a mannitol solution in vials

8. Set up

Start a second flowsheet. Add Water and d-Mannitol, which comes from the food properties database of DWSIM, and add the NRTL property package. Set the pair Water / d-Mannitol to zero energies with alpha = 0.3, which makes the solution ideal. Keep the solids handling of the package off; otherwise the ideal solubility would precipitate the mannitol in the feed. The package only gives the density, the heat capacity and the enthalpies of the streams: the drying itself comes from the model of the block.

Add a material stream Mannitol solution at 20 °C and 1.01325 bar with 1.77 kg/h, 95 % of water and 5 % of d-Mannitol by mass.

9. Add the Lyophilizer

Add a Lyophilizer LYO-101. Connect Mannitol solution to the feed port, a new energy stream Shelf heat to the shelf heat port, and two new streams Dried cake and Water vapor to the outlets. In the Parameters tab, enter:

  • Vials and batch: 22 mm outside and 20 mm inside, 2 mL of fill, 20000 vials per batch, 2 h to load and unload;
  • Formulation: freezing temperature -0.5 °C, nucleation temperature -8 °C, collapse temperature -5 °C, 0.02 kg of bound water per kg of dry solid after primary drying, and 0.005 kg/kg at the end;
  • Freezing: shelves at -40 °C, 1 K/min, 2 h of hold;
  • Primary drying: shelves at -5 °C, 1 K/min, chamber at 150 mTorr, vial heat transfer KC = 11.51 W/(m²·K), KP = 0.28 W/(m²·K·Pa), KD = 0.00345 1/Pa, and dried layer resistance R0 = 67200 m/s, A1 = 7.68E+07 1/s, A2 = 0;
  • Secondary drying: shelves at 40 °C, 0.2 K/min, at the same chamber pressure.

Parameters of the Lyophilizer

The block follows one vial. In primary drying the heat that comes from the shelf through the vial bottom and the frozen layer equals, at each moment, the heat of sublimation of the vapor that leaves through the dried layer. Two sets of parameters carry that balance:

  • Vial heat transfer coefficient: Kv = KC + KP·P / (1 + KD·P). It depends on the vial and on the freeze dryer, and it grows with the chamber pressure because the gas between the shelf and the vial bottom carries more heat.
  • Dried layer resistance: Rp = R0 + A1·L / (1 + A2·L). It grows with the thickness L of the dried layer, and it depends on the formulation and on how it froze.

Both are measured with the vial and the formulation. The values above are the ones that Shivkumar et al. (2019) give for 5 % mannitol in a 6R vial. The collapse temperature is a property of the formulation too: mannitol crystallizes, and the study takes -5 °C as its limit.

10. Solve and read the results

Press Solve.

Freeze drying flowsheet

Results of the Lyophilizer

Result Value
Frozen layer 6.99 mm
Freezing (ramp and hold) / product frozen after 3.00 h / 1.00 h
Primary drying / secondary drying 12.84 h / 4.10 h
Cycle, with loading and unloading 21.9 h
Highest product temperature in primary drying -21.4 °C, 16.4 K under the collapse temperature
Mean temperature of the sublimation front -25.2 °C
Peak sublimation rate 0.199 g/h per vial, 3.97 kg/h for the batch
Batch 41.1 kg of solution, 2.06 kg of cake with 0.50 % of water
Capacity of one freeze dryer 1.87 kg/h of solution
Shelf heat / freezing / condenser, average of the cycle 1.327 / 0.236 / 1.325 kW (condenser 3.13 kW at the peak)

The Charts tab shows the cycle of one vial. The solution supercools to -8 °C, freezes at -0.5 °C and cools down to the shelf. In primary drying the product at the vial bottom stays far below the shelf, because the sublimation takes the heat away, and it warms slowly as the dried layer grows and slows the vapor down. When the ice is gone, the product follows the shelf up to 40 °C:

Cycle temperatures of the Lyophilizer

The sublimation rate peaks when the shelves reach -5 °C and falls as the dried layer grows:

Drying rate and moisture of the Lyophilizer

11. Compare the primary drying with the measured times

Change the chamber pressure of primary and secondary drying, solve again for each value, and compare the primary drying time with the times that Shivkumar et al. (2019) measured with the shelves at -5 °C:

Chamber pressure, mTorr Measured, h DWSIM, h Difference, % Highest product temperature, °C
100 12.82 13.25 +3.3 -22.48
150 12.62 12.84 +1.7 -21.36
300 11.62 12.12 +4.3 -18.79
1500 15.84 16.51 +4.2 -10.07

The pressure has two effects that pull in opposite directions. More gas in the chamber carries more heat to the vial, but it also takes away part of the pressure difference that moves the vapor out of the cake. That is why the drying time falls from 100 to 300 mTorr and rises again at 1500 mTorr. DWSIM is 2 to 4 % above the measurements. Its primary drying includes the ramp of the shelves from -40 °C, and its frozen layer follows the density that the property package gives the solution.

Results and Validation

Expected results

The contact dryer dries the batch to 999 ppm of heptane in 5.12 h, with a cycle of 7.12 h and a bed that ends at 50.6 °C. The freeze dryer needs 12.84 h of primary drying and a cycle of 21.9 h, and the product stays 16.4 K under its collapse temperature.

The equations of the Contact Dryer were checked term by term against the paper of Schlünder and Mollekopf (1984), and the block reproduces the published simulation of an industrial indirect dryer. The primary drying times of the Lyophilizer are within 2 to 4 % of the measured ones at four chamber pressures, as the table of step 11 shows. The parameters of freezing and secondary drying (the freezing heat transfer coefficient, the bound water and the desorption rate) were chosen for this example, so the times of those two steps are illustrative. The DWSIM User Guide has the equations and the checks of both blocks.

The Case Library has both flowsheets with their charts and studies: Vacuum contact drying of an ibuprofen cake wet with n-heptane (cases/separation-processes/ibuprofen-cake-vacuum-contact-drying) and Freeze drying of a 5 % mannitol solution in vials (cases/separation-processes/freeze-drying-mannitol-solution-vials). A third case dries a sucrose solution, whose collapse temperature is near -32 °C.

Automating This Tutorial

Files in this repository

The script needs DWSIM Plus: set DWSIM_PATRON_KEY to your Patreon key, or run it where the Plus license is activated. It builds and solves both flowsheets with the FluentAPI and prints the results of steps 5, 6, 7, 10 and 11. If DWSIM_SAVE_TO is set to a folder, it saves the two flowsheets there.

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))
for a in ("DWSIM.Automation", "DWSIM.Automation.FluentAPI", "DWSIM.Thermodynamics",
          "DWSIM.UnitOperations.ContactDryer", "DWSIM.UnitOperations.Lyophilizer"):
    clr.AddReference(a)

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

# --- license ---------------------------------------------------------------------------------------------------------
if not License.IsActivated:
    key = os.environ.get("DWSIM_PATRON_KEY")
    if not key or not License.CheckLicense(key):
        raise SystemExit("The Contact Dryer and the Lyophilizer are part of DWSIM Plus: set DWSIM_PATRON_KEY to your "
                         "Patreon key.")

MBAR, MTORR = 100.0, 101325.0 / 760000.0     # Pa per mbar and per mTorr
OUT = os.environ.get("DWSIM_SAVE_TO")


def nrtl(fs, c1, c2, a12, a21, alpha):
    """Puts one NRTL pair (cal/mol) into the package of the flowsheet and returns the package."""
    pp = list(fs.Inner.PropertyPackages.Values)[0]
    pp = getattr(pp, "__implementation__", pp)
    pair = NRTL_IPData()
    pair.ID1, pair.ID2, pair.A12, pair.A21, pair.alpha12 = c1, c2, a12, a21, alpha
    table = pp.m_uni.InteractionParameters
    if table.ContainsKey(c2):
        table[c2].Remove(c1)
    if not table.ContainsKey(c1):
        table[c1] = Dictionary[String, NRTL_IPData]()
    table[c1][c2] = pair
    return pp


def link(fs, a, b, out_port, in_port):
    fs.Inner.ConnectObjects(a.GraphicObject, b.GraphicObject, out_port, in_port)


def save(fs, name):
    if OUT:
        os.makedirs(OUT, exist_ok=True)
        path = os.path.join(OUT, name)
        fs.OrthogonalLayout()
        fs.Save(path)
        fs.SaveScreenshot(os.path.splitext(path)[0] + ".png")
        print("saved", path)


# =====================================================================================================================
# Part 1: vacuum contact drying of an ibuprofen cake wet with n-heptane
# =====================================================================================================================
fs1 = Flowsheet.Create("Vacuum contact drying of an ibuprofen cake").WithCompounds(Array[String](["Ibuprofen", "N-heptane"]))
fs1 = fs1.WithPropertyPackage(PropertyPackages.NRTL)
# ibuprofen (1) / n-heptane (2), fitted to the measured solubilities of Hahnenkamp et al. (2010), as in tutorial A10
nrtl(fs1, "Ibuprofen", "N-heptane", -1145.2, 3186.1, 0.2)

# 160 kg/h of filter cake at 5 C with 15 wt % of n-heptane (17.6 % on the dry solid)
cake = fs1.AddMaterialStream("Wet cake").At(Q.Celsius(5.0), Q.Pascal(101325.0))
cake.SetCompoundMassFlow("Ibuprofen", 160.0 * 0.85 / 3600.0).SetCompoundMassFlow("N-heptane", 160.0 * 0.15 / 3600.0)
product = fs1.AddMaterialStream("Dried ibuprofen")
vapor = fs1.AddMaterialStream("Heptane vapor")
recovered = fs1.AddMaterialStream("Recovered heptane")
jacket = fs1.AddEnergyStream("Jacket heat")

# agitated filter-dryer: 8 m2 of heated area, 1000 kg of dry solid per batch, 2 h to load and unload;
# jacket at 55 C, chamber at 50 mbar, down to 0.1 % of heptane on the dry solid; the product must stay under 60 C
dry = fs1.AddContactDryer("DRY-101")
dry.WithAgitatedBed(8.0 / 60.0, 10.0).WithBatch(8.0, 1000.0, 2.0 * 3600.0)
dry.WithOperation(55.0 + 273.15, 50.0 * MBAR).WithTargetSolvent(0.001).WithProductTemperatureLimit(60.0 + 273.15)
dry.WithBed(450.0, 0.12, 1500.0, 50.0e-6).WithSolvents(Array[String](["N-heptane"]))
dry.ConnectFeed(cake, 0).ConnectProduct(product, 0).ConnectProduct(vapor, 1)
dryer = dry.Object
link(fs1, jacket.Object, dryer, 0, 1)

# the heptane vapor condenses at 5 C, at the chamber pressure
cond = fs1.AddCooler("C-101").WithOutletTemperature(Q.Celsius(5.0)).WithPressureDrop(Q.Pascal(0.0))
cond.ConnectFeed(vapor, 0).ConnectProduct(recovered, 0).ConnectEnergyProduct(fs1.AddEnergyStream("Condenser duty"), 0)
fs1.Solve()
if dryer.ErrorMessage:
    raise SystemExit("DRY-101: " + dryer.ErrorMessage)

h = 3600.0
print("Contact dryer DRY-101, jacket 55 C, 50 mbar")
print("  heptane boils at %.1f C; heating to it takes %.0f min" % (dryer.Result_BoilingTemperature - 273.15,
                                                                  dryer.Result_HeatingTime / 60.0))
print("  drying time %.2f h, cycle %.2f h; heptane in the product %.0f ppm (ICH Q3C limit %.0f ppm)" % (
    dryer.Result_DryingTime / h, dryer.Result_CycleTime / h, dryer.ResidualSolvents[0].Ppm,
    dryer.ResidualSolvents[0].LimitPpm))
print("  bed temperature at the end %.1f C (limit 60 C); bed depth %.0f mm" % (
    dryer.Result_FinalBedTemperature - 273.15, dryer.Result_BedDepth * 1000.0))
print("  contact coefficient %.0f W/(m2.K), mean overall coefficient %.0f W/(m2.K)" % (
    dryer.Result_ContactCoefficient, dryer.Result_MeanOverallCoefficient))
print("  peak drying rate %.1f kg/(m2.h), %.0f kg/h of vapor for the batch" % (
    dryer.Result_PeakDryingRate * h, dryer.Result_PeakVaporLoad * h))
print("  batch %.0f kg of wet cake, %.0f kg of heptane removed; one dryer handles %.0f kg/h (%.0f %% used)" % (
    dryer.Result_BatchCharge, dryer.Result_BatchSolventRemoved, dryer.Result_Capacity * h,
    dryer.Result_Utilization * 100.0))
print("  jacket heat %.2f kW on average, %.1f kW at the peak; condenser C-101 %.2f kW" % (
    dryer.Result_HeatingDuty / 1000.0, dryer.Result_PeakHeatingDuty / 1000.0, cond.Object.DeltaQ))

# how long the batch stays in the dryer for each level of heptane in the product
print("\n  heptane target, ppm | drying time, h | cycle, h | final bed, C | capacity, kg/h of wet cake")
for target in (0.005, 0.002, 0.001, 0.0005, 0.0002):
    dryer.TargetResidualSolvent = target
    fs1.Solve()
    print("  %19.0f | %14.2f | %8.2f | %12.1f | %6.1f" % (
        dryer.ResidualSolvents[0].Ppm, dryer.Result_DryingTime / h, dryer.Result_CycleTime / h,
        dryer.Result_FinalBedTemperature - 273.15, dryer.Result_Capacity * h))
dryer.TargetResidualSolvent = 0.001
fs1.Solve()

# the drying time over jacket temperatures and chamber pressures (the Operating map tab of the editor)
walls = [45.0, 55.0, 60.0]
pressures = [20.0, 50.0, 100.0, 150.0]
grid = {(round(p.WallTemperature - 273.15), round(p.ChamberPressure / MBAR)): p
        for p in dryer.GetOperatingMap(Array[Double]([t + 273.15 for t in walls]),
                                       Array[Double]([p * MBAR for p in pressures]))}
print("\n  drying time to 0.1 %, h (highest bed temperature, C)")
print("  jacket, C | " + " | ".join("%9.0f mbar" % p for p in pressures))
for t in walls:
    cells = []
    for p in pressures:
        pt = grid[(round(t), round(p))]
        cells.append("%6.2f (%4.1f)" % (pt.DryingTime / h, pt.MaxBedTemperature - 273.15) if pt.Dries
                     else "%14s" % "doesn't dry")
    print("  %9.0f | " % t + " | ".join(cells))
save(fs1, "contact_drying.dwxmz")

# =====================================================================================================================
# Part 2: freeze drying of a 5 % mannitol solution in 6R vials
# =====================================================================================================================
fs2 = Flowsheet.Create("Freeze drying of a mannitol solution in vials").WithCompounds(Array[String](["Water", "d-Mannitol"]))
fs2 = fs2.WithPropertyPackage(PropertyPackages.NRTL)
nrtl(fs2, "Water", "d-Mannitol", 0.0, 0.0, 0.3)      # an ideal pair: the package gives densities and enthalpies only

# 1.77 kg/h of solution at 20 C with 5 wt % of mannitol (the average of the batches over the cycle)
solution = fs2.AddMaterialStream("Mannitol solution").At(Q.Celsius(20.0), Q.Pascal(101325.0))
solution.SetCompoundMassFlow("Water", 1.77 * 0.95 / 3600.0).SetCompoundMassFlow("d-Mannitol", 1.77 * 0.05 / 3600.0)
cake2 = fs2.AddMaterialStream("Dried cake")
water = fs2.AddMaterialStream("Water vapor")
shelf = fs2.AddEnergyStream("Shelf heat")

# 20000 vials of the 6R size (22/20 mm), 2 mL each; 2 h to load and unload
# freezing: shelves to -40 C at 1 K/min, 2 h of hold; primary drying: shelves at -5 C, 150 mTorr;
# secondary drying: shelves to 40 C at 0.2 K/min, down to 0.5 % of water on the dry solid
# vial and cake parameters for 5 % mannitol in a 6R vial: Shivkumar et al., AAPS PharmSciTech 20 (2019) 328
lyo = fs2.AddLyophilizer("LYO-101")
lyo.WithVial(0.022, 0.020, 2.0e-6).WithBatch(20000.0, 2.0 * 3600.0)
lyo.WithFreezing(-40.0 + 273.15, 1.0 / 60.0, 2.0 * 3600.0)
lyo.WithPrimaryDrying(-5.0 + 273.15, 150.0 * MTORR, 1.0 / 60.0)
lyo.WithSecondaryDrying(40.0 + 273.15, 150.0 * MTORR, 0.2 / 60.0)
lyo.WithVialHeatTransfer(11.51, 0.28, 0.00345).WithDriedLayerResistance(6.72e4, 7.68e7, 0.0)
lyo.WithCollapseTemperature(-5.0 + 273.15).WithMoisture(0.02, 0.005)
lyo.ConnectFeed(solution, 0).ConnectProduct(cake2, 0).ConnectProduct(water, 1)
fd = lyo.Object
fd.FreezingTemperature = -0.5 + 273.15        # the solution freezes at -0.5 C
fd.NucleationTemperature = -8.0 + 273.15      # after it supercools to -8 C
link(fs2, shelf.Object, fd, 0, 1)
fs2.Solve()
if fd.ErrorMessage:
    raise SystemExit("LYO-101: " + fd.ErrorMessage)

print("\nLyophilizer LYO-101, shelves at -5 C, 150 mTorr")
print("  frozen layer %.2f mm; freezing %.2f h, the product is frozen after %.2f h" % (
    fd.Result_FrozenLayerThickness * 1000.0, fd.Result_FreezingTime / h, fd.Result_SolidificationTime / h))
print("  primary drying %.2f h, secondary drying %.2f h, cycle %.1f h" % (
    fd.Result_PrimaryDryingTime / h, fd.Result_SecondaryDryingTime / h, fd.Result_CycleTime / h))
print("  product at most %.1f C, %.1f K under the collapse temperature; sublimation front at %.1f C on average" % (
    fd.Result_MaxProductTemperature - 273.15, fd.Result_CollapseMargin, fd.Result_MeanSublimationTemperature - 273.15))
print("  peak sublimation rate %.3f g/h per vial, %.2f kg/h for the batch" % (
    fd.Result_MaxSublimationRate * 1000.0 * h, fd.Result_PeakVaporLoad * h))
print("  batch %.1f kg of solution, %.2f kg of cake with %.2f wt %% of water; one freeze dryer handles %.2f kg/h" % (
    fd.Result_BatchCharge, fd.Result_BatchProduct, fd.Result_ProductWaterContent * 100.0, fd.Result_Capacity * h))
print("  shelf heat %.3f kW, freezing %.3f kW, condenser %.3f kW on average (%.2f kW at the peak)" % (
    (fd.Result_PrimaryHeatingDuty + fd.Result_SecondaryHeatingDuty) / 1000.0, fd.Result_FreezingDuty / 1000.0,
    fd.Result_CondenserDuty / 1000.0, fd.Result_PeakCondenserDuty / 1000.0))

# primary drying at four chamber pressures against the measured times (Shivkumar et al. 2019), shelves at -5 C
print("\n  pressure, mTorr | measured, h | DWSIM, h | difference, % | highest product temperature, C")
for p_mtorr, measured in ((100.0, 12.82), (150.0, 12.62), (300.0, 11.62), (1500.0, 15.84)):
    fd.PrimaryChamberPressure = fd.SecondaryChamberPressure = p_mtorr * MTORR
    fs2.Solve()
    t = fd.Result_PrimaryDryingTime / h
    print("  %15.0f | %11.2f | %8.2f | %+13.1f | %6.2f" % (p_mtorr, measured, t, (t / measured - 1.0) * 100.0,
                                                          fd.Result_MaxProductTemperature - 273.15))
fd.PrimaryChamberPressure = fd.SecondaryChamberPressure = 150.0 * MTORR
fs2.Solve()
save(fs2, "freeze_drying.dwxmz")

Exercises

  1. Lower the chamber of the contact dryer to 20 mbar and the jacket to 45 °C. Is the drying time shorter or longer than at 50 mbar and 55 °C, and how much cooler does the bed stay?
  2. Set the mixing number of the contact dryer to 5 and then to 20. How much does the drying time change, and why is it worth fitting this number to a drying curve of the plant?
  3. Raise the primary drying shelves of the freeze dryer to 10 °C. How much shorter is primary drying, and how much margin to the collapse temperature is left?
  4. A sucrose solution collapses near -32 °C. Set the collapse temperature to -32 °C and solve. Which warning does the block give, and which shelf temperature keeps the product under the limit at 150 mTorr?

Further Reading

  • Schlünder E.-U., Mollekopf N. (1984). Vacuum contact drying of free flowing mechanically agitated particulate material. Chem. Eng. Process. 18, 93-111
  • Shivkumar G., Kazarin P.S., Strongrich A.D., Alexeenko A.A. (2019). LyoPRONTO: an open-source lyophilization process optimization tool. AAPS PharmSciTech 20, 328
  • ICH Q3C(R9) (2024). Impurities: guideline for residual solvents
  • DWSIM User Guide: the parts on the Contact Dryer and the Lyophilizer

Next Steps

You now know how DWSIM sizes the two batch dryers of a pharmaceutical plant and how to read their cycles. Open the drying cases of the Case Library to see their operating maps as charts, or go back to the Pharmaceutical Processes track.