Skip to content

Annexed Ethanol Distillery

In this tutorial you will take the juice and the final molasses of a cane mill to hydrated ethanol. The must is fermented in an Alcoholic Fermenter, the yeast is separated, and the wine is heated, degassed and stripped with live steam in column A. Column B rectifies the phlegm into hydrated ethanol and draws off the fusel oil where the higher alcohols build up. Along the way you read every stream in the terms of a Brazilian distillery: Brix, total reducing sugars (ART), °GL and °INPM.

What you will learn

  • How to set the juice and the molasses of a mill from the presets of the Sugar Stream Analysis
  • How the Alcoholic Fermenter turns the sugars of the must into ethanol, carbon dioxide and the by-products of the yeast
  • How column A strips the wine with live steam, and why the phlegm is degassed before column B
  • How three-phase stages and a side draw take the fusel oil out of column B
  • How to follow the ethanol from the fermenter to the hydrated ethanol, and what the distillery spends in steam

Prerequisites

  • Completed Raw Sugar Mill and Distillation Column
  • DWSIM 10.3.0 or later
  • The Sugar Solutions property package and the Alcoholic Fermenter are part of the Patreon edition (Premium+)

Process Overview

Most Brazilian mills have a distillery annexed to the sugar factory. Part of the clarified juice goes to the distillery, and the final molasses of the sugar factory, which still holds sugar that can't crystallize, goes there too. Together they make the must.

Fermentation: the yeast inverts the sucrose of the must and converts the glucose and the fructose into ethanol and carbon dioxide. A small part of the sugar becomes glycerol, new yeast, acetic acid, lactic acid from the bacteria that contaminate every fermentation, and higher alcohols. The fermentation releases heat, so the fermenters are cooled to keep the yeast at about 34 °C. A centrifuge takes the yeast out of the fermented wine, and the yeast goes back to the fermenters after an acid treatment.

Column A: the wine, at about 9 °GL, is heated and fed to the top of column A. Live steam enters under the bottom tray and strips the ethanol out of the wine. The vapour that leaves the top is the phlegm, at about 40 to 50 % of ethanol, and the bottoms are the vinasse, the stripped wine with everything that doesn't boil.

Column B: the phlegm is condensed and fed to column B, which rectifies it up to the hydrated ethanol at about 93 % by mass, just below the azeotrope of ethanol and water. The higher alcohols, mostly isoamyl alcohol, are heavier than ethanol but more volatile than water in a dilute solution, so they build up on the trays below the feed. They are drawn off there as the fusel oil. Where they build up, the liquid can split into two liquid phases, which is why those stages are three-phase stages. The bottoms of column B are the phlegm water.

graph LR
    J["Juice to distillery"] --> M["MIX-201<br/>E-201 32 °C"]
    ML["Final molasses"] --> M
    M --> F["FERM-201<br/>Alcoholic Fermenter"]
    N["Nutrients"] --> F
    F -- gas --> G["Fermentation gas"]
    F --> CF["CF-201<br/>yeast centrifuge"]
    CF -- yeast cream --> Y["Yeast cream"]
    CF -- wine --> WH["P-202, E-202 88 °C<br/>V-202, V-203"]
    WH --> A["Column A<br/>16 stages"]
    S["Live steam"] --> A
    A -- vinasse --> V["Vinasse"]
    A -- phlegm vapour --> PH["E-203, V-204<br/>P-203, E-204"]
    PH --> B["Column B<br/>34 stages"]
    B -- distillate --> HE["Hydrated ethanol"]
    B -- side draw --> FO["Fusel oil"]
    B -- bottoms --> PW["Phlegm water"]

Key Design Parameters

Parameter Value
Compounds Water, Sucrose, Glucose, Fructose, Ethanol, Carbon dioxide, Ammonia, Glycerol, Acetic acid, L-Lactic acid, Cane ash, Cane organic non-sugars, Biomass_Yeast, 3-Methyl-1-butanol
Property package Sugar Solutions (S-UNIFAC)
Juice to distillery 250 t/h, "Clarified juice" preset (Bx 14.5, purity 85.5), 95 °C, 3 bar
Final molasses 10 t/h, "Final molasses" preset (Bx 80, purity 55), 60 °C, 3 bar
Fermenter FERM-201 34 °C, 99.5 % of the ART consumed, 90 % of it to ethanol
Yeast centrifuge CF-201 98 % of the yeast and 2 % of the wine to the yeast cream
Wine heating 88 °C, then 1.6 bar in V-203
Column A 16 stages, 1.55 bar at the top, 0.15 bar of pressure drop, live steam 42 t/h at 2.5 bar
Phlegm to column B condensed at 85 °C, degassed, pumped to 2.5 bar, 90 °C
Column B 34 stages, 1.30 bar at the top, 0.20 bar of pressure drop, phlegm on Stage21, reflux ratio 3
Fusel oil draw 400 kg/h of liquid from Stage28; Stage21 to Stage33 are three-phase stages

Step-by-Step in the Classic UI

1. Set up

File > New Chemical Process Model: add Water, Sucrose, Glucose, Fructose, Ethanol, Carbon dioxide, Ammonia, Glycerol, Acetic acid and L-Lactic acid from the databases. Cane ash, Cane organic non-sugars, Biomass_Yeast and 3-Methyl-1-butanol come with DWSIM in the additional compounds folder. 3-Methyl-1-butanol (isoamyl alcohol) stands for all the higher alcohols of the fusel oil.

Add the Sugar Solutions (S-UNIFAC) property package. It describes the sugars, the ash and the organic non-sugars of the juice with S-UNIFAC, and water, ethanol and the other volatile compounds with NRTL, so one package covers the must, the wine and the columns. The values below are in °C, bar, t/h (or kg/h) and MW.

2. Juice and molasses from the presets

Add two material streams, Juice to Distillery and Final Molasses. Open Utilities > Sugar Stream Analysis, pick the Juice to Distillery stream, choose the preset Clarified juice, type 250000 kg/h as the mass flow and click Apply to the stream. Do the same for Final Molasses with the preset Final molasses and 10000 kg/h. The presets are typical values of a Brazilian mill; replace them with the analyses of your own mill.

Set the juice at 95 °C and 3 bar, as it leaves the clarifier, and the molasses at 60 °C and 3 bar.

3. The must

Add a Mixer MIX-201 with the juice and the molasses, and a Cooler E-201 that takes the hot must to 32 °C, with its pressure drop set to zero. Connect an energy stream E-201 Duty to the cooler.

4. Fermentation and the yeast centrifuge

Add a material stream Nutrients at 32 °C and 1.01325 bar with 180 kg/h of water and 72 kg/h of ammonia. The ammonia feeds the growth of the yeast.

Add an Alcoholic Fermenter FERM-201 from the Plus unit operations. Connect the Must to its first inlet and the Nutrients to the second. The wine leaves from the first outlet, the fermentation gas from the second, and the heat removed by the cooling of the fermenter goes to an energy stream Fermentation Heat on the third outlet.

Keep the parameters of the fermenter at their defaults: 34 °C, all the sucrose inverted, 99.5 % of the total reducing sugars (ART) consumed, and 90 % of the consumed ART to ethanol, which is the fermentation efficiency. The rest goes to glycerol (4 %), yeast growth (1.5 %), acetic acid (0.4 %) and higher alcohols (0.3 %), and whatever is left over becomes lactic acid, here 3.8 %. Leave Higher Alcohol Compound as (automatic), and the block picks 3-Methyl-1-butanol.

Parameters of the Alcoholic Fermenter

Add a Component Separator CF-201 for the yeast centrifuge. Send 98 % of Biomass_Yeast and 2 % of every other compound to the second outlet, Yeast Cream, and the rest to the Wine. The 2 % stands for the wine that leaves with the yeast cream.

5. Wine heating and degassing

Pump the wine to 3 bar (Pump P-202, 70 % efficiency), heat it to 88 °C in a Heater E-202 with 0.5 bar of pressure drop, let it down to 1.6 bar in a Valve V-202 and separate the vapour in a Separator V-203. The Wine Degassing Vapour carries most of the carbon dioxide that stayed dissolved in the wine, and the liquid is the Wine to Column A.

6. Column A

Add a material stream Live Steam to A with 42000 kg/h of water at 2.5 bar and vapour fraction 1.

Add an Absorption Column A with 16 stages, 1.55 bar at the top and 0.15 bar of pressure drop. It doesn't have a condenser or a reboiler. Feed the Wine to Column A on Stage1 and the live steam on Stage16; the top product is the Phlegm Vapour and the bottoms are the Vinasse. Choose the Naphtali-Sandholm solver with 200 iterations.

7. Condense and degas the phlegm

The phlegm vapour still carries carbon dioxide and ammonia. A total condenser on column B can't take them, so they leave before the column:

  • a Cooler E-203 condenses the phlegm at 85 °C, with 0.1 bar of pressure drop;
  • a Component Separator V-204 sends all of the carbon dioxide and the ammonia to the Phlegm Degassing Vent and the rest to Phlegm, Degassed; it stands for the degasser of the phlegm;
  • a Pump P-203 takes the phlegm to 2.5 bar, and a Heater E-204 brings it to 90 °C with 0.3 bar of pressure drop, as the Phlegm to Column B.

Solve the flowsheet now. The front end takes about 12 s, and the phlegm comes to 1745.5 kmol/h with 381.6 kmol/h of ethanol.

8. Column B

Add a Distillation Column B with 34 stages, 1.30 bar at the top and 0.20 bar of pressure drop. Stage1 is the total condenser and Stage34 the reboiler.

  • Feed: the Phlegm to Column B on Stage21, so 12 trays strip the liquid below it.
  • Products: the distillate is the Hydrated Ethanol and the bottoms are the Phlegm Water.
  • Side draw: the Fusel Oil, liquid, from Stage28, at 13.33 kmol/h (400 kg/h at about 30 g/mol).
  • Condenser: total, reflux ratio 3.
  • Reboiler: product molar flow rate 1278.8 kmol/h.
  • Solver: Wang-Henke, with 300 iterations.
  • Three-phase stages (VLLE), in the General tab: 21-33.

The bottoms rate comes from an ethanol balance: the phlegm, less the fusel draw, less a distillate that takes 99.8 % of the ethanol of the phlegm at 84 mol % of ethanol. If you change the phlegm, work it out again.

On a three-phase stage, the solver tests the liquid for a split into two liquids. If it splits, the solver uses the K-values of the whole liquid, so the column still sees one liquid per stage. Below the feed the liquid is nearly water, and the isoamyl alcohol, which is only partly soluble in water, can form a second liquid there.

Why Wang-Henke, with a bottoms rate

With fourteen compounds on every stage, Naphtali-Sandholm solves this column too, but it took several minutes in our tests. Wang-Henke solves it in about a minute with a reflux ratio and a product rate. It needs about 180 iterations, so the limit is raised from 200 to 300. When the ethanol left in the phlegm water was the specification instead of the bottoms rate, the solve took much longer still. The case of the Case Library keeps that specification, and it starts Naphtali-Sandholm from a converged profile of the column.

9. Solve and read the results

Solve the flowsheet. With column B, the solve takes a little over a minute.

The annexed distillery

Stream t/h °C Bx ART, % Ethanol, % m/m °GL Isoamyl alcohol, kg/h
Juice to distillery 250.00 95.0 14.50 13.63 0 0 0
Final molasses 10.00 60.0 80.00 59.82 0 0 0
Must 260.00 32.0 17.02 15.41 0 0 0
Wine 236.57 34.0 2.85 0.08 7.46 9.42 45.16
Fermentation gas 18.41 34.0 1.86 0.72
Phlegm vapour 42.31 105.9 41.56 45.00
Vinasse 235.92 115.4 2.63 0.08 0.00 0 0
Phlegm to column B 42.21 90.0 41.65 49.17 45.00
Hydrated ethanol 18.83 85.0 92.97 95.38 0.00
Fusel oil 0.32 97.6 24.50 28.97 44.98
Phlegm water 23.06 111.4 0.00 0 0.02

The °GL is the ethanol by volume at 20 °C of the liquid, so the table leaves it out for the vapour streams.

The must has 15.41 % of ART, and the Alcoholic Fermenter consumes 39.85 of the 40.05 t/h of ART it receives. It makes 18.34 t/h of ethanol, 89.6 % of the 20.48 t/h that the stoichiometry allows, and the wine leaves at 7.46 % by mass (9.42 °GL) with 0.08 % of ART left. The fermentation releases 4.72 MW, which the cooling of the fermenters takes away, about 427 kJ per kg of ART consumed.

Results of the Alcoholic Fermenter

The Charts tab of the fermenter shows where the consumed sugar goes. The scale is logarithmic, so the small shares stay visible next to the 90 % that becomes ethanol.

Destination of the consumed sugars

Column A leaves 0.2 kg/h of ethanol in the 235.92 t/h of vinasse, and its top vapour, the phlegm, has 41.56 % of ethanol by mass. Column B makes 18.83 t/h of hydrated ethanol at 92.97 °INPM (% by mass) and 95.38 °GL, inside the 92.5 to 94.6 °INPM of the Brazilian specification, or 23.2 m³/h at 20 °C. The fusel draw takes 44.98 of the 45.00 kg/h of isoamyl alcohol that reach the column, and the phlegm water leaves with 0.2 kg/h of ethanol.

Results of column B

The temperature profile of column B shows the three zones of the column. Above the feed, the rectifying trays stay between 85 and 89 °C, close to the azeotrope. Below the feed, the temperature stays near 90 °C down to Stage25. Over the next six stages, past the fusel draw on Stage28, it climbs to about 110 °C, as the ethanol runs out and the liquid becomes water.

Temperature and pressure profiles of column B

10. Read the streams with the Sugar Stream Analysis

Open Utilities > Sugar Stream Analysis again and pick a stream. For the must, it gives the Brix (17.02), the true purity (79.99) and the total reducing sugars (15.41 % of the liquid, 40054 kg/h), and the theoretical ethanol that the ART can give, 20485 kg/h.

Sugar Stream Analysis of the must

For the hydrated ethanol, the same window gives the strength in the Brazilian units: 92.965 °INPM and 95.385 °GL.

Sugar Stream Analysis of the hydrated ethanol

With the Sugar Solutions package, the Brix, the ART, the °INPM and the °GL are also stream properties (Sugar: ...), so an Adjust, a specification or the spreadsheet can use them.

11. Where the ethanol goes, and what the distillery spends

Of the 18 343 kg/h of ethanol the yeast makes, 17 501 kg/h (95.4 %) reach the hydrated ethanol. The rest goes to:

Where Ethanol, kg/h
Yeast cream (2 % of the wine) 360
Fermentation gas 342
Fusel oil 80
Wine degassing vapour 61
Vinasse 0.2
Phlegm water 0.2

The two columns lose less than 1 kg/h, so the losses come from the fermentation and the yeast separation. A scrubber that washes the fermentation gas with water, and a wash of the yeast cream, would bring most of that ethanol back.

Duty MW
E-201, must cooler 17.20
Fermentation heat 4.72
E-202, wine heater 14.34
E-203, phlegm condenser 20.13
E-204, phlegm heater 0.23
Column B condenser 19.53
Column B reboiler 20.04

The distillery uses 42 000 kg/h of live steam in column A, and the reboiler of column B needs about 33 058 kg/h of 2.5 bar steam (latent heat 2182 kJ/kg). That is 3.23 kg of steam per litre of hydrated ethanol, in the usual range of a distillery without heat integration. The wine heater, the phlegm condenser and the condenser of column B aren't integrated here, and in a real distillery they exchange heat with each other.

Results and Validation

Expected results

The must has Bx 17.02 and 15.41 % of ART. The fermenter makes 18.34 t/h of ethanol, 89.6 % of the theoretical, and the wine leaves at 9.42 °GL. Column B gives 18.83 t/h of hydrated ethanol at 92.97 °INPM (23.2 m³/h at 20 °C), and the fusel oil takes 44.98 of the 45.00 kg/h of isoamyl alcohol. 95.4 % of the ethanol made reaches the hydrated ethanol, and the distillery uses 3.23 kg of steam per litre. The mass balance closes, with 302.252 t/h in and 302.253 t/h out.

The flowsheet is the distillery of the Sugarcane mill with an annexed distillery case of the Case Library (cases/bioprocesses/sugarcane-mill-annexed-distillery), and the case goes further in three ways:

  • it builds the whole mill, from the cane through the diffuser and the juice treatment to the split of the clear juice, so the juice to the distillery comes from the mill;
  • its column B has 60 real trays with a Murphree efficiency of 0.6, and the ethanol left in the phlegm water is a specification, with Naphtali-Sandholm started from a converged profile;
  • it makes 19.43 t/h of hydrated ethanol at 93.24 % by mass from a wine at 9.75 °GL.

With the column specified that way, the ethanol and the fusel oil leave the columns much as they do here. In the case, 95.5 % of the ethanol made reaches the hydrated ethanol, and the distillery spends about 3.2 kg of steam per litre. The juice and molasses presets and the column geometry are typical values for a Brazilian mill, chosen for the tutorial; they don't come from a plant. The numbers of the tables come from the Python script below.

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 the flowsheet with the FluentAPI, solves the front end, adds column B, solves the whole flowsheet and prints the tables of steps 9 and 11. If DWSIM_SAVE_TO is set to a file name, it saves the flowsheet there.

import os
import sys
import time

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",
          "DWSIM.Extensions.PropertyPackages.Sugar"):
    clr.AddReference(a)

from System import Array, String  # noqa: E402
from DWSIM.Automation.FluentAPI import CompoundExtensions, Flowsheet, License, Q  # noqa: E402
from DWSIM.Extensions.PropertyPackages.Sugar import (SugarStreamAnalysis, SugarStreamComposer,  # noqa: E402
                                                     SugarStreamPresets, SugarStreamSpec)

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

W, SUC, GLU, FRU, ETOH, CO2, NH3 = "Water", "Sucrose", "Glucose", "Fructose", "Ethanol", "Carbon dioxide", "Ammonia"
GLY, ACE, LAC = "Glycerol", "Acetic acid", "L-Lactic acid"
ASH, ORG, YEAST, AMYL = "Cane ash", "Cane organic non-sugars", "Biomass_Yeast", "3-Methyl-1-butanol"
H = 3600.0


def val(x):
    """A DWSIM nullable value as a float (pythonnet hands a set value over as a float already)."""
    return x if isinstance(x, (int, float)) else x.GetValueOrDefault()


# --- 1. Compounds and the Sugar Solutions package ------------------------------------------------------------------
fs = Flowsheet.Create("Annexed ethanol distillery")
fs = fs.WithCompounds(Array[String]([W, SUC, GLU, FRU, ETOH, CO2, NH3, GLY, ACE, LAC]))
for name in (ASH, ORG, YEAST, AMYL):
    fs = CompoundExtensions.WithCompoundFromJson(fs, os.path.join(DWSIM_BIN, "addcomps", name + ".json"))
fs = fs.WithPropertyPackage("Sugar Solutions (S-UNIFAC)")
YEAST = [k for k in fs.Inner.SelectedCompounds.Keys if k.startswith("Biomass_Yeast")][0]    # name in the JSON file
ALL = [W, SUC, GLU, FRU, ETOH, CO2, NH3, GLY, ACE, LAC, ASH, ORG, YEAST, AMYL]


def stream(tag, t_c=None, p_bar=None, kg_h=None):
    s = fs.AddMaterialStream(tag)
    if t_c is not None:
        s.At(Q.Celsius(t_c), Q.Bar(p_bar))
    if kg_h is not None:
        for c in ALL:
            s.SetCompoundMassFlow(c, kg_h.get(c, 0.0) / H)
    return s


E = {}


def energy(tag):
    E[tag] = fs.AddEnergyStream(tag)
    return E[tag]


def preset(tag, name, t_h, t_c, p_bar):
    """A stream set from a Sugar Stream Analysis preset, as Utilities > Sugar Stream Analysis does it."""
    s = stream(tag, t_c, p_bar)
    spec = SugarStreamSpec()
    spec.MassFlow = t_h * 1000.0 / H
    [p for p in SugarStreamPresets.All if p.Name.startswith(name)][0].ApplyTo(spec)
    SugarStreamComposer.Apply(s.Object, spec)
    return s


# --- 2. The must: clarified juice and final molasses ---------------------------------------------------------------
# 250 t/h of clarified juice from the clarifier and 10 t/h of final molasses from the sugar factory, both from the
# presets of the Sugar Stream Analysis; the must is cooled to 32 C before the fermentation
juice = preset("Juice to Distillery", "Clarified juice", 250.0, 95.0, 3.0)
molasses = preset("Final Molasses", "Final molasses", 10.0, 60.0, 3.0)
must_hot = stream("Must, Hot")
fs.AddMixer("MIX-201").ConnectFeed(juice, 0).ConnectFeed(molasses, 1).ConnectProduct(must_hot, 0)
must = stream("Must")
fs.AddCooler("E-201").WithOutletTemperature(Q.Celsius(32.0)).WithPressureDrop(Q.Bar(0.0)) \
    .ConnectFeed(must_hot, 0).ConnectProduct(must, 0).ConnectEnergyProduct(energy("E-201 Duty"), 0)

# --- 3. Fermentation and the yeast centrifuge ----------------------------------------------------------------------
# the ammonia of the nutrients feeds the yeast growth; the fermenter writes the heat it removes to an energy stream
nutrients = stream("Nutrients", 32.0, 1.01325, {W: 180.0, NH3: 72.0})
wine0, gas, q_ferm = stream("Fermented Wine"), stream("Fermentation Gas"), energy("Fermentation Heat")
ferm = fs.AddExternalUnitOperation("Alcoholic Fermenter", "FERM-201").ConnectFeed(must, 0).ConnectFeed(nutrients, 1) \
    .ConnectProduct(wine0, 0).ConnectProduct(gas, 1)
fs.Inner.ConnectObjects(ferm.Object.GraphicObject, q_ferm.Object.GraphicObject, 2, 0)
FERM = ferm.Object.__implementation__
# the yeast centrifuge sends 98 % of the yeast and 2 % of everything else to the yeast cream
wine, cream = stream("Wine"), stream("Yeast Cream")
cf = fs.AddComponentSeparator("CF-201").WithSpecifiedOutlet(1).ConnectFeed(wine0, 0).ConnectProduct(wine, 0) \
    .ConnectProduct(cream, 1)
for c in ALL:
    cf.WithMassPercent(c, 98.0 if c == YEAST else 2.0)

# --- 4. Wine heating, degassing and column A -----------------------------------------------------------------------
wine_p, wine_h, wine_f = stream("Wine, Pumped"), stream("Wine, Heated"), stream("Wine, Flashed")
fs.AddPump("P-202").WithOutletPressure(Q.Bar(3.0)).WithEfficiencyPercent(70.0).ConnectFeed(wine, 0) \
    .ConnectProduct(wine_p, 0).ConnectEnergyFeed(energy("P-202 Power"), 1)
fs.AddHeater("E-202").WithOutletTemperature(Q.Celsius(88.0)).WithPressureDrop(Q.Bar(0.5)).ConnectFeed(wine_p, 0) \
    .ConnectProduct(wine_h, 0).ConnectEnergyFeed(energy("E-202 Duty"), 1)
fs.AddValve("V-202").WithOutletPressure(Q.Bar(1.6)).ConnectFeed(wine_h, 0).ConnectProduct(wine_f, 0)
degas, wine_a = stream("Wine Degassing Vapour"), stream("Wine to Column A")
fs.AddSeparator("V-203").ConnectFeed(wine_f, 0).ConnectProduct(degas, 0).ConnectProduct(wine_a, 1)
# column A: 16 stages without condenser or reboiler; the wine enters on Stage1 and the live steam under Stage16
steam_a = stream("Live Steam to A", 128.0, 2.5, {W: 42000.0}).WithVaporFraction(1.0)
phlegm_v, vinasse = stream("Phlegm Vapour"), stream("Vinasse")
NA = 16
col_a = fs.AddAbsorptionColumn("A").WithNumberOfStages(NA).WithSolvingMethod("Naphtali-Sandholm") \
    .WithMaxIterations(200).WithTopPressure(Q.Bar(1.55)).WithColumnPressureDrop(Q.Bar(0.15)) \
    .WithFeed(wine_a, 0).WithFeed(steam_a, NA - 1).WithTopProduct(phlegm_v).WithBottoms(vinasse)

# --- 5. Phlegm condensing and degassing ----------------------------------------------------------------------------
phlegm_l, vent, phlegm_d = stream("Phlegm, Condensed"), stream("Phlegm Degassing Vent"), stream("Phlegm, Degassed")
fs.AddCooler("E-203").WithOutletTemperature(Q.Celsius(85.0)).WithPressureDrop(Q.Bar(0.1)).ConnectFeed(phlegm_v, 0) \
    .ConnectProduct(phlegm_l, 0).ConnectEnergyProduct(energy("E-203 Duty"), 0)
# V-204 stands for the degassing of the phlegm: it vents the carbon dioxide and the ammonia, which a total condenser
# on column B can't take
dg = fs.AddComponentSeparator("V-204").WithSpecifiedOutlet(0).ConnectFeed(phlegm_l, 0).ConnectProduct(vent, 0) \
    .ConnectProduct(phlegm_d, 1)
for c in ALL:
    dg.WithMassPercent(c, 100.0 if c in (CO2, NH3) else 0.0)
phlegm_p, phlegm_b = stream("Phlegm, Pumped"), stream("Phlegm to Column B")
fs.AddPump("P-203").WithOutletPressure(Q.Bar(2.5)).WithEfficiencyPercent(70.0).ConnectFeed(phlegm_d, 0) \
    .ConnectProduct(phlegm_p, 0).ConnectEnergyFeed(energy("P-203 Power"), 1)
fs.AddHeater("E-204").WithOutletTemperature(Q.Celsius(90.0)).WithPressureDrop(Q.Bar(0.3)).ConnectFeed(phlegm_p, 0) \
    .ConnectProduct(phlegm_b, 0).ConnectEnergyFeed(energy("E-204 Duty"), 1)

# --- 6. Solve the front end, from the must to the phlegm ------------------------------------------------------------
t0 = time.time()
errs = fs.TrySolve()
if errs.Count > 0:
    raise SystemExit("front end: " + errs[0].Message)
print("Front end solved in %.0f s" % (time.time() - t0))

# --- 7. Column B with three-phase stages and the fusel oil draw ----------------------------------------------------
# 34 stages (condenser, 32 trays as equilibrium stages, reboiler); the phlegm on Stage21, 13 stages below it; the fusel
# oil drawn as liquid on Stage28, where the isoamyl alcohol builds up; Stage21 to Stage33 are three-phase stages.
# Wang-Henke converges this column in about 180 iterations, so the limit is raised to 300
NB, FEED_B, FUSEL_B, REFLUX_B = 34, 20, 27, 3.0
FUSEL_MOL = 400.0 / H / 0.030        # 400 kg/h of draw, given in mol/s at about 30 g/mol
hydrated, water_b, fusel = stream("Hydrated Ethanol"), stream("Phlegm Water"), stream("Fusel Oil")
q_cond, q_reb = energy("B Condenser Duty"), energy("B Reboiler Duty")

# the bottoms rate: the phlegm minus the fusel draw and a distillate that takes 99.8 % of the ethanol at 84 mol %
n_feed = val(phlegm_b.Object.Phases[0].Properties.molarflow)
n_etoh = val(phlegm_b.Object.Phases[0].Compounds[ETOH].MolarFlow)
n_bot = n_feed - 0.998 * n_etoh / 0.84 - FUSEL_MOL
col_b = fs.AddDistillationColumn("B").WithNumberOfStages(NB).WithSolvingMethod("Wang-Henke (Bubble Point)") \
    .WithMaxIterations(300).WithTopPressure(Q.Bar(1.30)).WithColumnPressureDrop(Q.Bar(0.20)) \
    .WithFeed(phlegm_b, FEED_B).WithDistillate(hydrated).WithBottoms(water_b) \
    .WithSideDraw(fusel, FUSEL_B, Q.MolPerSecond(FUSEL_MOL)) \
    .WithCondenserDuty(q_cond).WithReboilerDuty(q_reb) \
    .WithCondenserSpec("Reflux Ratio", REFLUX_B, "") \
    .WithReboilerSpec("Product Molar Flow Rate", n_bot, "mol/s")
B = col_b.Object
B.ThreePhaseStages = "%d-%d" % (FEED_B + 1, NB - 1)
print("Column B: phlegm %.1f kmol/h with %.1f kmol/h of ethanol; phlegm water set to %.1f kmol/h" % (
    n_feed * 3.6, n_etoh * 3.6, n_bot * 3.6))
t0 = time.time()
errs = fs.TrySolve()
if errs.Count > 0:
    raise SystemExit("column B: " + errs[0].Message)
print("Whole flowsheet solved in %.0f s" % (time.time() - t0))


# --- 8. Results ------------------------------------------------------------------------------------------------------
def an(s):
    return SugarStreamAnalysis.Analyze(s.Object, False)


def mflow(s):
    return val(s.Object.Phases[0].Properties.massflow) * H


def mc(s, c):
    return val(s.Object.Phases[0].Compounds[c].MassFlow) * H


def temp(s):
    return val(s.Object.Phases[0].Properties.temperature) - 273.15


def duty(e):
    """Energy stream flow in MW (DWSIM keeps it in kW)."""
    return abs(val(e.Object.EnergyFlow)) / 1000.0


print("\nStream                 t/h       C     Bx   ART %  ethanol % m/m    GL   isoamyl kg/h")
for tag, s in (("Juice to distillery", juice), ("Final molasses", molasses), ("Must", must), ("Wine", wine),
               ("Fermentation gas", gas), ("Wine degassing", degas), ("Phlegm vapour", phlegm_v), ("Vinasse", vinasse),
               ("Phlegm to column B", phlegm_b), ("Hydrated ethanol", hydrated), ("Fusel oil", fusel),
               ("Phlegm water", water_b)):
    r = an(s)
    print("%-20s %7.2f %7.1f %6.2f %7.2f %10.2f %9.2f %10.2f" % (
        tag, mflow(s) / 1000.0, temp(s), r.Brix, r.TotalReducingSugars, mc(s, ETOH) / mflow(s) * 100.0,
        r.EthanolVolumePercent, abs(mc(s, AMYL))))

print("\nFERM-201: ART fed %.2f t/h, consumed %.2f t/h; ethanol made %.2f t/h, %.1f %% of the theoretical; heat removed "
      "%.2f MW; CO2 %.2f t/h" % (FERM.Result_ArtFed * 3.6, FERM.Result_ArtConsumed * 3.6, FERM.Result_EthanolProduced * 3.6,
                                FERM.Result_FermentationYield * 100.0, FERM.Result_CoolingDuty / 1000.0,
                                FERM.Result_CarbonDioxide * 3.6))
made = FERM.Result_EthanolProduced * H
h = an(hydrated)
rho20 = SugarStreamAnalysis.EthanolWaterDensity20(h.EthanolMassPercent)
litres = mflow(hydrated) / rho20 * 1000.0
print("Hydrated ethanol: %.2f t/h at %.2f INPM and %.2f GL, %.1f m3/h at 20 C" % (
    mflow(hydrated) / 1000.0, h.EthanolMassPercent, h.EthanolVolumePercent, litres / 1000.0))
print("Where the ethanol made goes, kg/h: hydrated %.0f (%.1f %%), fermentation gas %.0f, yeast cream %.0f, wine degassing "
      "%.0f, fusel oil %.0f, vinasse %.1f, phlegm water %.1f" % (
          mc(hydrated, ETOH), mc(hydrated, ETOH) / made * 100.0, mc(gas, ETOH), mc(cream, ETOH), mc(degas, ETOH),
          mc(fusel, ETOH), mc(vinasse, ETOH), mc(water_b, ETOH)))
print("Isoamyl alcohol, kg/h: made %.1f, in the fusel oil %.1f, in the hydrated ethanol %.2f, in the phlegm water %.2f" % (
    FERM.Result_HigherAlcohol * H, mc(fusel, AMYL), mc(hydrated, AMYL), mc(water_b, AMYL)))
print("Duties, MW: E-201 %.2f, E-202 %.2f, E-203 %.2f, E-204 %.2f, B condenser %.2f, B reboiler %.2f" % tuple(
    duty(e) for e in (E["E-201 Duty"], E["E-202 Duty"], E["E-203 Duty"], E["E-204 Duty"], q_cond, q_reb)))
reb_steam = duty(q_reb) * 1000.0 / 2182.0 * H        # kg/h of 2.5 bar steam (latent heat 2182 kJ/kg)
print("Steam: %.0f kg/h live steam to A + %.0f kg/h to the B reboiler = %.2f kg per litre of hydrated ethanol" % (
    mflow(steam_a), reb_steam, (mflow(steam_a) + reb_steam) / litres))
ins = sum(mflow(x) for x in (juice, molasses, nutrients, steam_a))
outs = sum(mflow(x) for x in (gas, cream, degas, vinasse, vent, hydrated, fusel, water_b))
print("Mass balance: in %.3f t/h, out %.3f t/h" % (ins / 1000.0, outs / 1000.0))

# --- 9. Save ---------------------------------------------------------------------------------------------------------
OUT = os.environ.get("DWSIM_SAVE_TO")
if OUT:
    fs.OrthogonalLayout(True)
    fs.Save(OUT)
    fs.SaveScreenshot(os.path.splitext(OUT)[0] + ".png")
    print("saved", OUT)

Exercises

  1. Raise the fermentation efficiency (the ethanol share of the consumed ART) from 90 to 92 %. How much more hydrated ethanol does the distillery make, and where does the sugar for it come from?
  2. Cut the live steam to column A from 42 to 36 t/h. How much ethanol does the vinasse carry now, and what happens to the strength of the phlegm?
  3. Raise the reflux ratio of column B to 3.5. How do the °INPM of the hydrated ethanol and the reboiler duty change?
  4. Move the fusel draw up to Stage25. Where does the isoamyl alcohol go, and how much ethanol leaves with the fusel oil?

Further Reading

  • E. Hugot. (1986). Handbook of Cane Sugar Engineering, 3rd ed. Elsevier
  • P. Rein. (2007). Cane Sugar Engineering. Bartens
  • N. Spiliotis and D. Tassios. (2000). A UNIFAC model for phase equilibrium calculations in aqueous and nonaqueous sugar solutions. Fluid Phase Equilibria, 173, 39-55
  • Agência Nacional do Petróleo, Gás Natural e Biocombustíveis (ANP). Resolução nº 907/2022, specifications of ethanol fuel
  • DWSIM User Guide: the Sugar Solutions property package, the Sugar Stream Analysis and the Alcoholic Fermenter

Next Steps

You now know how an annexed distillery turns the juice and the molasses of a mill into hydrated ethanol, how the fermenter, the two columns and the fusel draw share the work, and how to follow the ethanol and the steam through them. Open the Sugarcane mill with an annexed distillery case of the Case Library to see the same distillery fed by the whole mill, or go back to the sugar and ethanol section.