Raw Sugar Mill¶
In this tutorial you will build the process side of a raw sugar mill that crushes 100 t/h of cane. A diffuser extracts the juice, the juice is heated, flashed and clarified, a five-effect evaporator concentrates it to a syrup, and a three-boiling pan house crystallizes the sucrose, with the B and C sugars returned as seed. Along the way you read every stream the way a sugar technologist does: Brix, pol, purity, crystal content, supersaturation and boiling point elevation.
What you will learn
- How the Sugar Solutions property package describes cane juice, syrup, massecuite and molasses
- How to model a cane diffuser, juice heating, flashing and clarification with standard unit operations
- How a multiple-effect evaporator is built from coolers and falling film evaporators, and why the boiling point elevation grows effect after effect
- How vacuum pans, centrifugals and a massecuite cooler make a three-boiling scheme, and how the B and C sugar recycles close it
- How to read a stream with the Sugar Stream Analysis, and what the purity drop across the pan house means
Prerequisites
- Completed Recycle Loops
- DWSIM 10.3.0 or later
- The Sugar Solutions property package and the Falling Film Evaporator are part of the Patreon edition (Premium+)
Process Overview¶
Sugarcane is about 70 % water, 13 % fibre and 13 % sucrose, with small amounts of glucose, fructose, ash and organic non-sugars. The mill extracts the sucrose with the juice, concentrates the juice and crystallizes the sucrose from it. Everything that isn't sucrose stays in the liquid and leaves in the final molasses.
Extraction: in a diffuser, hot imbibition water washes the dissolved solids out of the shredded cane. The fibre leaves as bagasse, wet with about 50 % moisture and with a few percent of the sugar, and burns in the boiler.
Juice treatment: the mixed juice is heated above its boiling point and flashed to atmospheric pressure, which removes the air before the clarifier. The clarifier settles the mud, and a filter recovers most of the juice that leaves with the mud.
Evaporation: a train of five effects at falling pressures concentrates the clear juice from about Bx 15 to a syrup at Bx 65. Exhaust steam heats the first effect, and the vapour of each effect heats the next, so one kilogram of steam evaporates several kilograms of water.
Crystallization: a syrup with 87 % purity can't give all its sucrose in one crystallization, because the impurities raise the solubility of sucrose as they concentrate. The pan house boils three massecuites in a row. The A massecuite gives the commercial sugar, and its molasses is boiled again into a B massecuite and then into a C massecuite. The B and C sugars aren't sold; they go back as seed for the A and B massecuites, and the C molasses leaves as final molasses.
graph LR
C["Cane"] --> D["D-100<br/>diffuser"]
I["Imbibition water"] --> D
D -- bagasse --> BG["Bagasse"]
D -- mixed juice --> H["P-101, E-101<br/>V-101, V-102"]
H --> CL["C-101, F-101<br/>clarifier, mud filter"]
CL --> E["EV-1 to EV-5<br/>five effects"]
ST["Exhaust steam"] --> E
E -- syrup --> A["A pan"]
A --> CFA["CF-A"]
CFA -- A sugar --> P["Raw sugar"]
CFA -- A molasses --> B["B pan"]
B --> CFB["CF-B"]
CFB -- B sugar --> A
CFB -- B molasses --> CP["C pan + CR-C"]
CP --> CFC["CF-C"]
CFC -- C sugar --> B
CFC -- final molasses --> M["Final molasses"]
Key Design Parameters¶
| Parameter | Value |
|---|---|
| Compounds | Water, Sucrose, Glucose, Fructose, Sugarcane fibre, Cane ash, Cane organic non-sugars, Cane mud solids |
| Property package | Sugar Solutions (S-UNIFAC) |
| Cane | 100 t/h at 30 °C: fibre 13, sucrose 13.5, glucose 0.35, fructose 0.35, ash 0.5, organic non-sugars 0.8, mud 0.5 and water 71 % |
| Imbibition water | 30 t/h at 70 °C, 30 % on cane |
| Diffuser D-100 | 96.5 % of the dissolved solids extracted, bagasse at 50 % moisture |
| Juice heater E-101 | 103 °C at 3 bar, then flashed to 1 atm |
| Clarifier C-101 / mud filter F-101 | 90 % / 85 % of the liquid separated from the mud |
| Evaporator | five effects at 1.70, 1.25, 0.85, 0.50 and 0.16 bar, forward feed |
| Exhaust steam | 16.08 t/h at 2.2 bar |
| Pans A / B / C | 62 / 68 / 75 °C at 0.16 bar |
| C massecuite cooler CR-C | 45 °C |
| Centrifugals CF-A / CF-B / CF-C | 95 / 93 / 90 % of the mother liquor separated from the sugar |
Step-by-Step in the Classic UI¶
1. Set up¶
File > New Chemical Process Model: add Water, Sucrose, Glucose and Fructose, and then the four cane pseudo-compounds Sugarcane fibre, Cane ash, Cane organic non-sugars and Cane mud solids. They come with DWSIM in the additional compounds folder, with the tag Sugar. Fibre and mud are always solid; ash and organic non-sugars are dissolved solids that always stay in the liquid.
Add the property package Sugar Solutions (S-UNIFAC). It computes the activity coefficients of the sugars with S-UNIFAC (Spiliotis and Tassios, 2000), with terms fitted to the solubility of sucrose, to the boiling point elevation of cane syrups and to the saturation coefficient of impure solutions. Sucrose can crystallize; glucose and fructose stay dissolved. The values below are in °C, bar, t/h and kW.
Turn the Inspector off
The Inspector records every flash step. On a flowsheet with solids it makes a solve several times slower, so turn it off in the settings before you solve this one.
2. Cane, imbibition and the diffuser¶
Add two material streams:
| Stream | T (°C) | P (bar) | Composition |
|---|---|---|---|
Cane |
30 | 1.01325 | 100 t/h with the composition of the table above |
Imbibition Water |
70 | 1.01325 | 30 t/h of water |
Join them in the mixer MIX-100 into Cane and Imbibition. The diffuser is a Compound Separator D-100 with Mixed Juice on outlet 1 and Bagasse on outlet 2. Specify the separation factors for outlet 2, as the percentage of each compound of the inlet that leaves with the bagasse:
| Compound | % of the inlet to the bagasse |
|---|---|
| Sugarcane fibre | 100 |
| Cane mud solids | 10 |
| Sucrose, Glucose, Fructose, Cane ash, Cane organic non-sugars | 3.5 |
| Water | 13.458 |

The water factor gives a bagasse with 50 % moisture: the bagasse takes as much water as fibre, plus the water of the sugar and the mud that stay in it, out of the 101 t/h of water that enter.
3. Juice heating, flash and clarification¶
The pump P-101 takes Mixed Juice to 3.5 bar, and the heater E-101 heats Pumped Juice to 103 °C with a pressure drop of 0.5 bar. At 3 bar the juice doesn't boil in the heater. The valve V-101 lets Heated Juice down to 1.01325 bar, and the separator V-102 takes the Flash Vapour off the top, as the flash tank of a mill does.
The clarifier and the mud filter are two Solids Separators. C-101 sends all the solids and 10 % of the liquid of Juice to Clarifier to Mud (liquid separation efficiency 90 %), and F-101 returns 85 % of the liquid of the mud as Filtrate, so the Filter Cake takes the mud with the rest. The mixer MIX-101 joins Clarified Juice and Filtrate into Clear Juice.
4. The five-effect evaporator¶
Add the material stream Exhaust Steam: 16.08 t/h of water at 2.2 bar and a vapour fraction of 1.
Each effect is a pair of blocks. The cooler CD-n condenses the heating vapour of the effect to saturated liquid (outlet vapour fraction 0, pressure drop 0), and its duty goes out through the energy stream Calandria n Duty. The Falling Film Evaporator EV-n takes that energy stream as its heat input, boils the juice at the pressure of the effect, and splits it into Vapour n and the concentrated juice. The vapour of one effect is the heating vapour of the next.
| Effect | Heating vapour | Juice in | Pressure (bar) | Pressure drop of EV-n (bar) | Concentrated juice |
|---|---|---|---|---|---|
| 1 | Exhaust Steam |
Clear Juice |
1.70 | -0.68675 | Juice 1 |
| 2 | Vapour 1 |
Juice 1 |
1.25 | 0.45 | Juice 2 |
| 3 | Vapour 2 |
Juice 2 |
0.85 | 0.40 | Juice 3 |
| 4 | Vapour 3 |
Juice 3 |
0.50 | 0.35 | Juice 4 |
| 5 | Vapour 4 |
Juice 4 |
0.16 | 0.34 | Syrup |
Set every EV-n to the Energy Stream calculation type, with 5 steps for its evaporation profile.

Why a cooler and an evaporator, and not a heat exchanger
In a forward-feed train the vapour and the juice leave each effect at the same temperature, so the next effect receives a heating vapour exactly as hot as its own juice was in the previous effect. A heat exchanger that picks its hot side by comparing the inlet temperatures can swap the sides on that tie. The cooler condenses the vapour on its own, and the energy stream hands its latent heat to the evaporator, which avoids the comparison.
The first effect works at 1.70 bar, above the clear juice at 1 atm, so its pressure drop is negative: the evaporator takes the juice up to the pressure of the effect, as the pump between the flash tank and the evaporator of a mill does.
The exhaust steam flow sets the Brix of the syrup. In the Case Library case it was found with an Adjust on the syrup Brix and then fixed at 16.08 t/h, because each iteration of an Adjust re-solves the whole pan house below it.
5. The pan house¶
A vacuum pan is three blocks: a mixer for the feeds, a heater at the boiling temperature of the massecuite and a separator for the pan vapour. All three pans work at 0.16 bar.
| Pan | Feeds | Heater, outlet T (°C) | Separator | Massecuite |
|---|---|---|---|---|
| A | Syrup, B Sugar Return |
PAN-A, 62 |
VP-A |
A Massecuite |
| B | A Molasses, C Sugar Return |
PAN-B, 68 |
VP-B |
B Massecuite |
| C | B Molasses |
PAN-C, 75 |
VP-C |
C Massecuite |

At 0.16 bar and 62 °C the heater evaporates water until the mother liquor is saturated in sucrose, and the sucrose above saturation comes out as crystals. The separator takes the pan vapour off, and the massecuite leaves from the bottom.
The centrifugals are Solids Separators with all the solids to the sugar and a liquid separation efficiency below 100 %, so each sugar keeps a film of its mother liquor:
| Centrifugal | Feed | Liquid separation (%) | Molasses (outlet 1) | Sugar (outlet 2) |
|---|---|---|---|---|
CF-A |
A Massecuite |
95 | A Molasses |
A Sugar |
CF-B |
B Massecuite |
93 | B Molasses |
B Sugar |
CF-C |
C Massecuite Cooled |
90 | Final Molasses |
C Sugar |

Before its centrifugal, the C massecuite is cooled to 45 °C in the cooler CR-C. Its mother liquor is the most impure of the mill, so the sucrose crystallizes slowly, and in a real mill the massecuite cools in crystallizers for a day or more. The cooler takes it to the equilibrium of that cooling.
6. The B and C sugars go back as seed¶
Add the material streams B Sugar Return (68 °C) and C Sugar Return (45 °C), both at 0.16 bar, and connect them to MIX-A and MIX-B. Give them a first estimate close to the answer:
| Stream | Sucrose | Water | Glucose | Fructose | Cane ash | Cane organic non-sugars |
|---|---|---|---|---|---|---|
B Sugar Return (t/h) |
4.026 | 0.0403 | 0.0263 | 0.0263 | 0.0375 | 0.0600 |
C Sugar Return (t/h) |
0.711 | 0.0296 | 0.0349 | 0.0349 | 0.0499 | 0.0798 |
Then add the recycle blocks REC-B, from B Sugar to B Sugar Return, and REC-C, from C Sugar to C Sugar Return. In each, choose Wegstein in the Acceleration list and set the Relative (-) mass flow tolerance to 0.001.

Why a looser tolerance
The sugar returns carry crystals and a film of molasses, and every solid-liquid flash moves their split a little (about 2e-4 kg/s here). The default tolerance of a new recycle, 0.01 % of the flow, is below that noise, and the B recycle would cycle until it ran out of iterations. A tolerance of 0.1 % is still far below what a sugar balance needs.
7. Solve and read the results¶
Press Solve. The flowsheet converges in about 30 s, with REC-B in 2 iterations and REC-C in 1.

| Result | Value |
|---|---|
| Mixed juice | 102.8 t/h, Bx 14.6, purity 87.1 |
| Bagasse | 27.2 t/h |
| Clear juice | 100.3 t/h at 100.2 °C, Bx 14.7 |
| Syrup | 22.7 t/h at 58.4 °C, Bx 65.0 |
| Water evaporated | 77.7 t/h, 4.83 kg per kg of exhaust steam |
| A sugar | 12.32 t/h, 98.22 % sucrose, 0.94 % water |
| Final molasses | 2.86 t/h, Bx 88.7, purity 29.0 |
| B / C sugar returned | 5.25 / 1.01 t/h |
| Sucrose recovered in the A sugar | 89.6 % of the sucrose in the cane |
| Juice heater E-101 | 6896 kW |
| Pans A / B / C | 3667 / 1052 / 140 kW |
8. Read the streams with the Sugar Stream Analysis¶
Open Utilities > Sugar Stream Analysis, select Syrup and press Analyze. The window gives the quantities of a sugar laboratory for the liquid of the stream, and the crystal content for the whole stream.

The syrup is far from saturation: its sucrose to water ratio is 1.62, and the impure liquid would hold 2.71 at 58 °C, so the supersaturation is 0.60. The solubility coefficient of 0.97 says that its impurities lower the solubility of sucrose by 3 % against pure water.
Select the other streams in turn. The script prints the same table:
| Stream | t/h | T (°C) | Bx | Pol | Purity | Crystals (%) | Supersaturation | BPE (K) |
|---|---|---|---|---|---|---|---|---|
| Mixed juice | 102.82 | 40.8 | 14.6 | 12.5 | 87.1 | 0.0 | 0.064 | 0.22 |
| Clear juice | 100.33 | 100.2 | 14.7 | 12.6 | 87.1 | 0.0 | 0.030 | 0.22 |
| Syrup | 22.67 | 58.4 | 65.0 | 55.7 | 87.1 | 0.0 | 0.597 | 3.11 |
| A massecuite | 22.27 | 62.0 | 77.8 | 56.2 | 74.8 | 53.0 | 1.000 | 6.72 |
| A molasses | 9.95 | 62.0 | 77.8 | 56.2 | 74.8 | 0.0 | 1.000 | 6.72 |
| B massecuite | 9.32 | 68.0 | 86.3 | 32.0 | 43.1 | 53.1 | 1.000 | 12.72 |
| B molasses | 4.07 | 68.0 | 86.3 | 32.0 | 43.1 | 0.0 | 1.000 | 12.72 |
| C massecuite, cooled | 3.87 | 45.0 | 88.7 | 19.1 | 29.0 | 18.0 | 1.000 | 18.72 |
| Final molasses | 2.86 | 45.0 | 88.7 | 19.1 | 29.0 | 0.0 | 1.000 | 18.72 |
| A sugar | 12.32 | 62.0 | 77.8 | 56.2 | 74.8 | 95.7 | 1.000 | 6.72 |
Brix, pol, purity, supersaturation and boiling point elevation (BPE) belong to the liquid of the stream. For a massecuite or a sugar, they are those of the mother liquor, and the crystal content tells how much of the stream is crystals. That is why the A sugar shows the Brix and the purity of the A molasses: its liquid is the molasses film the centrifugal leaves on the crystals.

The purity falls step by step: the syrup enters the pan house at purity 87.1. The A massecuite crystallizes 65.9 % of its sucrose, so the A molasses comes out at 74.8. The B boiling takes it to 43.1, and the C boiling with the cooling to 29.0, which is a typical final molasses. Each boiling makes the mother liquor more impure, and at a purity near 30 the sucrose that is left can't be recovered at a reasonable cost.
Supersaturation 1.000 in every massecuite: the pans, the cooler and the centrifugals are equilibrium stages, so the mother liquor leaves each pan exactly saturated. In a real pan it leaves supersaturated, between about 1.05 and 1.3, because crystal growth needs a driving force. The molasses purities here are therefore the lower bound of what a pan house reaches.
Boiling point elevation: at 0.16 bar water boils at 55.3 °C, and the syrup boils 3.1 K above it. The A massecuite boils 6.7 K above water, the B 12.7 K and the C 18.7 K, because the dissolved solids in their mother liquors grow. This is why the C pan boils at 75 °C at the same pressure as the A pan at 62 °C.
9. The evaporator, effect by effect¶
| Effect | P (bar) | T (°C) | Bx out | BPE (K) | Duty (kW) | Evaporated (t/h) |
|---|---|---|---|---|---|---|
| 1 | 1.70 | 115.5 | 16.9 | 0.28 | 9859 | 13.22 |
| 2 | 1.25 | 106.3 | 20.3 | 0.34 | 8178 | 14.49 |
| 3 | 0.85 | 95.6 | 25.9 | 0.46 | 9051 | 15.65 |
| 4 | 0.50 | 82.1 | 36.6 | 0.79 | 9889 | 16.66 |
| 5 | 0.16 | 58.4 | 65.0 | 3.11 | 10690 | 17.64 |
The 16.08 t/h of exhaust steam evaporate 77.7 t/h of water, 4.83 kg per kg of steam, close to the five that a five-effect train gives in theory. Each effect evaporates more water than the one before it, because the juice arrives hotter than the boiling point of the next effect and part of it flashes. The boiling point elevation stays below 1 K until the juice passes Bx 40, and then it grows quickly: the last effect, which takes the juice from Bx 36.6 to 65, loses 3.1 K of its temperature difference to it.
10. Where the sucrose goes¶
| Sucrose | t/h | % of the cane |
|---|---|---|
| In the cane | 13.50 | 100.0 |
| In the A sugar | 12.10 | 89.6 |
| In the bagasse | 0.47 | 3.5 |
| In the filter cake | 0.20 | 1.5 |
| In the final molasses | 0.73 | 5.4 |
The mass balance of the whole flowsheet closes: 146.080 t/h enter as cane, imbibition water and exhaust steam, and 146.080 t/h leave. The final molasses is the largest sucrose loss of the factory, which is why the C boiling is pushed to the lowest purity the mill can exhaust.
Results and Validation¶
Expected results
The diffuser gives 102.8 t/h of mixed juice at Bx 14.6 and purity 87.1. The five effects take the clear juice to a syrup at Bx 65.0 with 16.08 t/h of exhaust steam, 4.83 kg of water per kg of steam. The pan house makes 12.32 t/h of A sugar with 98.2 % sucrose and 2.86 t/h of final molasses at purity 29.0, and the A sugar takes 89.6 % of the sucrose of the cane.
The flowsheet is the process side of the Raw sugar mill case of the Case Library (cases/other/raw-sugar-mill), without its sugar dryer and its bagasse boiler and turbine, and the script reproduces its juice, syrup, massecuite and molasses results. In the case, the dryer takes the A sugar to 99.1 % sucrose and 0.056 % moisture. The cane composition and the operating conditions are typical values for a raw sugar mill, chosen for the case; 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
- Python script:
examples/sugar-ethanol/01_raw_sugar_mill.py - Pre-built flowsheet:
examples/saved/raw_sugar_mill.dwxmz
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 the flowsheet with the FluentAPI in about 30 s, and prints the tables of steps 7 to 10 with the Sugar Stream Analysis. If DWSIM_SAVE_TO is set, it saves the solved 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.UnitOperations.ExtensionPack", "DWSIM.Interfaces", "DWSIM.GlobalSettings",
"DWSIM.Extensions.PropertyPackages.Sugar"):
clr.AddReference(a)
from DWSIM.Automation.FluentAPI import CompoundExtensions, Flowsheet, License, Q # noqa: E402
from DWSIM.Extensions.PropertyPackages.Sugar import SugarStreamAnalysis # noqa: E402
from DWSIM.GlobalSettings import Settings # noqa: E402
from DWSIM.Interfaces.Enums import AccelMethod # noqa: E402
from DWSIM.Interfaces.Enums.GraphicObjects import ObjectType # noqa: E402
from DWSIM.UnitOperations.ExtensionPack import FallingFilmEvaporator # 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 Sugar Solutions package and the Falling Film Evaporator are part of DWSIM Plus: set "
"DWSIM_PATRON_KEY to your Patreon key.")
# the Inspector records every flash step; on a flowsheet with solids it makes a solve several times slower
Settings.InspectorEnabled = False
# --- 1. Compounds and the Sugar Solutions package -----------------------------------------------------------------------
W, S, G, F = "Water", "Sucrose", "Glucose", "Fructose"
ASH, ORG, FIB, MUD = "Cane ash", "Cane organic non-sugars", "Sugarcane fibre", "Cane mud solids"
ALL = [W, S, G, F, ASH, ORG, FIB, MUD]
ADDCOMPS = os.environ.get("DWSIM_ADDCOMPS", os.path.join(DWSIM_BIN, "addcomps"))
fs = Flowsheet.Create("Raw sugar mill").WithCompounds(W, S, G, F)
for name in (ASH, ORG, FIB, MUD):
fs = CompoundExtensions.WithCompoundFromJson(fs, os.path.join(ADDCOMPS, name + ".json"))
fs = fs.WithPropertyPackage("Sugar Solutions (S-UNIFAC)")
CANE = 100.0 / 3.6 # kg/s of cane
IMBIBITION = 30.0 / 3.6 # kg/s of imbibition water, 30 % on cane
EXHAUST_STEAM = 16.08 / 3.6 # kg/s of exhaust steam to the evaporator; gives a syrup at Bx 65
PAN_P = 0.16 # bar, the pan house
CANE_PCT = {FIB: 13.0, S: 13.5, G: 0.35, F: 0.35, ASH: 0.5, ORG: 0.8, MUD: 0.5, W: 71.0} # % of cane
def stream(tag, t_c, p_bar, flows=None):
s = fs.AddMaterialStream(tag).At(Q.Celsius(t_c), Q.Bar(p_bar))
for name in ALL:
s = s.SetCompoundMassFlow(name, (flows or {}).get(name, 0.0))
return s
def th(s, name=None):
"""Mass flow of a stream (or of one compound in it) in t/h."""
ph = s.Object.Phases[0]
return float((ph.Compounds[name].MassFlow if name else ph.Properties.massflow) or 0.0) * 3.6
def kw(e):
return float(e.Object.EnergyFlow or 0.0)
def celsius(s):
return float(s.Object.Phases[0].Properties.temperature or 0.0) - 273.15
# --- 2. Extraction: the diffuser ---------------------------------------------------------------------------------------
cane = stream("Cane", 30.0, 1.01325, {k: v / 100.0 * CANE for k, v in CANE_PCT.items()})
imbibition = stream("Imbibition Water", 70.0, 1.01325, {W: IMBIBITION})
dif_in = fs.AddMaterialStream("Cane and Imbibition")
fs.AddMixer("MIX-100").ConnectFeed(cane, 0).ConnectFeed(imbibition, 1).ConnectProduct(dif_in, 0)
mixed = fs.AddMaterialStream("Mixed Juice")
bagasse = fs.AddMaterialStream("Bagasse")
DS_LOSS = 0.035 # 3.5 % of the dissolved solids stay in the bagasse
water_total = CANE_PCT[W] + IMBIBITION / CANE * 100.0
water_bagasse = CANE_PCT[FIB] + DS_LOSS * sum(CANE_PCT[c] for c in (S, G, F, ASH, ORG)) + 0.1 * CANE_PCT[MUD] # 50 % moisture
dif = fs.AddComponentSeparator("D-100").WithSpecifiedOutlet(1).ConnectFeed(dif_in, 0) \
.ConnectProduct(mixed, 0).ConnectProduct(bagasse, 1)
dif = dif.WithMassPercent(FIB, 100.0).WithMassPercent(MUD, 10.0).WithMassPercent(W, 100.0 * water_bagasse / water_total)
for c in (S, G, F, ASH, ORG):
dif = dif.WithMassPercent(c, 100.0 * DS_LOSS)
# --- 3. Juice heating, flash and clarification ---------------------------------------------------------------------
pumped = fs.AddMaterialStream("Pumped Juice")
fs.AddPump("P-101").WithOutletPressure(Q.Bar(3.5)).WithEfficiencyPercent(70.0).ConnectFeed(mixed, 0) \
.ConnectProduct(pumped, 0).ConnectEnergyFeed(fs.AddEnergyStream("P-101 Power"), 1)
heated = fs.AddMaterialStream("Heated Juice")
q_heater = fs.AddEnergyStream("E-101 Duty")
fs.AddHeater("E-101").WithOutletTemperature(Q.Celsius(103.0)).WithPressureDrop(Q.Bar(0.5)).ConnectFeed(pumped, 0) \
.ConnectProduct(heated, 0).ConnectEnergyFeed(q_heater, 1)
flashed = fs.AddMaterialStream("Flashed Juice")
fs.AddValve("V-101").WithOutletPressure(Q.Bar(1.01325)).ConnectFeed(heated, 0).ConnectProduct(flashed, 0)
flash_vapour = fs.AddMaterialStream("Flash Vapour")
to_clarifier = fs.AddMaterialStream("Juice to Clarifier")
fs.AddSeparator("V-102").ConnectFeed(flashed, 0).ConnectProduct(flash_vapour, 0).ConnectProduct(to_clarifier, 1)
clarified = fs.AddMaterialStream("Clarified Juice")
mud = fs.AddMaterialStream("Mud")
fs.AddSolidsSeparator("C-101").WithSolidsSeparationEfficiency(100.0).WithLiquidSeparationEfficiency(90.0) \
.ConnectFeed(to_clarifier, 0).ConnectProduct(clarified, 0).ConnectProduct(mud, 1)
filtrate = fs.AddMaterialStream("Filtrate")
cake = fs.AddMaterialStream("Filter Cake")
fs.AddSolidsSeparator("F-101").WithSolidsSeparationEfficiency(100.0).WithLiquidSeparationEfficiency(85.0) \
.ConnectFeed(mud, 0).ConnectProduct(filtrate, 0).ConnectProduct(cake, 1)
clear = fs.AddMaterialStream("Clear Juice")
fs.AddMixer("MIX-101").ConnectFeed(clarified, 0).ConnectFeed(filtrate, 1).ConnectProduct(clear, 0)
# --- 4. Five-effect evaporator, forward feed ---------------------------------------------------------------------------
# In each effect the heating vapour condenses to saturated liquid in the cooler CD-n, and its latent heat goes through
# an energy stream to the falling film evaporator EV-n, where the juice boils at the pressure of the effect.
steam = stream("Exhaust Steam", 125.0, 2.2, {W: EXHAUST_STEAM}).WithVaporFraction(1.0)
PRESSURES = [1.70, 1.25, 0.85, 0.50, 0.16] # bar
heating, juice, p_prev = steam, clear, 1.01325
effects = []
for k, p in enumerate(PRESSURES, start=1):
condensate = fs.AddMaterialStream(f"Condensate {k}")
q = fs.AddEnergyStream(f"Calandria {k} Duty")
fs.AddCooler(f"CD-{k}").WithOutletVaporFraction(0.0).WithPressureDrop(Q.Bar(0.0)).ConnectFeed(heating, 0) \
.ConnectProduct(condensate, 0).ConnectEnergyProduct(q, 1)
vapour = fs.AddMaterialStream(f"Vapour {k}")
concentrate = fs.AddMaterialStream(f"Juice {k}" if k < len(PRESSURES) else "Syrup")
fs.AddFallingFilmEvaporator(f"EV-{k}").WithCalculationMode(FallingFilmEvaporator.CalcMode.EnergyStream) \
.WithPressureDrop(Q.Bar(p_prev - p)).WithIncrementSteps(5) \
.ConnectFeed(juice, 0).ConnectProduct(vapour, 0).ConnectProduct(concentrate, 1).ConnectEnergyFeed(q, 1)
effects.append((p, condensate, q, vapour, concentrate))
heating, juice, p_prev = vapour, concentrate, p
syrup, last_vapour = juice, heating
# --- 5. Three-boiling pan house at 0.16 bar -----------------------------------------------------------------------------
# The B and C sugar returns start near a converged run (crystals plus the molasses film), in t/h.
b_return = stream("B Sugar Return", 68.0, PAN_P, {S: 4.026 / 3.6, W: 0.0403 / 3.6, G: 0.0263 / 3.6, F: 0.0263 / 3.6,
ASH: 0.0375 / 3.6, ORG: 0.0600 / 3.6})
c_return = stream("C Sugar Return", 45.0, PAN_P, {S: 0.711 / 3.6, W: 0.0296 / 3.6, G: 0.0349 / 3.6, F: 0.0349 / 3.6,
ASH: 0.0499 / 3.6, ORG: 0.0798 / 3.6})
pan_duties = {}
def pan(tag, t_boil, *feeds):
"""A vacuum pan: a mixer, a heater at the boiling temperature and a separator for the pan vapour."""
pan_feed = fs.AddMaterialStream(f"{tag} Pan Feed")
mx = fs.AddMixer(f"MIX-{tag}").ConnectProduct(pan_feed, 0)
for i, f in enumerate(feeds):
mx = mx.ConnectFeed(f, i)
boiled = fs.AddMaterialStream(f"{tag} Boiled")
pan_duties[tag] = fs.AddEnergyStream(f"PAN-{tag} Duty")
fs.AddHeater(f"PAN-{tag}").WithOutletTemperature(Q.Celsius(t_boil)).WithPressureDrop(Q.Bar(0.0)) \
.ConnectFeed(pan_feed, 0).ConnectProduct(boiled, 0).ConnectEnergyFeed(pan_duties[tag], 1)
vapour = fs.AddMaterialStream(f"{tag} Pan Vapour")
massecuite = fs.AddMaterialStream(f"{tag} Massecuite")
fs.AddSeparator(f"VP-{tag}").ConnectFeed(boiled, 0).ConnectProduct(vapour, 0).ConnectProduct(massecuite, 1)
return massecuite, vapour
def centrifugal(tag, massecuite, liquid_separation):
"""A centrifugal: all the crystals go to the sugar, with the mother liquor that the separation leaves on them."""
molasses = fs.AddMaterialStream("Final Molasses" if tag == "C" else f"{tag} Molasses")
sugar = fs.AddMaterialStream(f"{tag} Sugar")
fs.AddSolidsSeparator(f"CF-{tag}").WithSolidsSeparationEfficiency(100.0) \
.WithLiquidSeparationEfficiency(liquid_separation).ConnectFeed(massecuite, 0) \
.ConnectProduct(molasses, 0).ConnectProduct(sugar, 1)
return sugar, molasses
a_mc, a_vap = pan("A", 62.0, syrup, b_return)
a_sugar, a_mol = centrifugal("A", a_mc, 95.0)
b_mc, b_vap = pan("B", 68.0, a_mol, c_return)
b_sugar, b_mol = centrifugal("B", b_mc, 93.0)
c_mc, c_vap = pan("C", 75.0, b_mol)
c_cooled = fs.AddMaterialStream("C Massecuite Cooled")
q_cryst = fs.AddEnergyStream("CR-C Duty")
fs.AddCooler("CR-C").WithOutletTemperature(Q.Celsius(45.0)).WithPressureDrop(Q.Bar(0.0)).ConnectFeed(c_mc, 0) \
.ConnectProduct(c_cooled, 0).ConnectEnergyProduct(q_cryst, 1)
c_sugar, final_molasses = centrifugal("C", c_cooled, 90.0)
# --- 6. The B and C sugars go back as seed: two recycles -----------------------------------------------------------------
recycles = []
for tag, frm, to in (("REC-B", b_sugar, b_return), ("REC-C", c_sugar, c_return)):
rec = fs.AddUnitOperation(ObjectType.OT_Recycle, tag).ConnectFeed(frm, 0).ConnectProduct(to, 0).Object
rec = rec.__implementation__
rec.ConvergenceParameters.VazaoMassicaRelativa = 1e-3 # 0.1 % of the recycled flow
rec.AccelerationMethod = AccelMethod.Wegstein
recycles.append(rec)
# --- 7. Solve ------------------------------------------------------------------------------------------------------------
t0 = time.time()
errors = fs.TrySolve()
print(f"Solved in {time.time() - t0:.0f} s, {errors.Count} error(s)")
if errors.Count:
raise SystemExit(errors[0].Message)
for rec in recycles:
print(f"{rec.GraphicObject.Tag}: converged {rec.Converged} in {rec.IterationsTaken} iteration(s)")
# --- 8. Sugar Stream Analysis of the main streams ------------------------------------------------------------------------
print("\nStream t/h T C Bx pol purity crystals supersat. BPE K")
for tag, s in (("Mixed juice", mixed), ("Clear juice", clear), ("Syrup", syrup), ("A massecuite", a_mc),
("A molasses", a_mol), ("B massecuite", b_mc), ("B molasses", b_mol), ("C massecuite", c_cooled),
("Final molasses", final_molasses), ("A sugar", a_sugar)):
r = SugarStreamAnalysis.Analyze(s.Object)
print(f"{tag:20}{th(s):8.2f}{celsius(s):8.1f}{r.Brix:7.1f}{r.Pol:7.1f}{r.TruePurity:8.1f}{r.CrystalContent:9.1f}"
f"{r.Supersaturation:10.3f}{r.BoilingPointElevation:8.2f}")
syrup_r = SugarStreamAnalysis.Analyze(syrup.Object)
# --- 9. The evaporator, effect by effect -----------------------------------------------------------------------------------
print("\nEffect P bar T C Bx BPE K duty kW evaporated t/h")
evaporated = 0.0
for k, (p, condensate, q, vapour, concentrate) in enumerate(effects, start=1):
r = SugarStreamAnalysis.Analyze(concentrate.Object)
evaporated += th(vapour)
print(f"{k:6}{p:8.2f}{celsius(concentrate):8.1f}{r.Brix:7.1f}{r.BoilingPointElevation:8.2f}{kw(q):10.0f}{th(vapour):12.2f}")
print(f"Evaporated {evaporated:.2f} t/h with {EXHAUST_STEAM * 3.6:.2f} t/h of exhaust steam: "
f"{evaporated / (EXHAUST_STEAM * 3.6):.2f} kg of water per kg of steam")
# --- 10. Sugar, molasses and recovery ------------------------------------------------------------------------------------
sucrose_cane = th(cane, S)
sugar_r = SugarStreamAnalysis.Analyze(a_sugar.Object)
print(f"\nMixed juice {th(mixed):.1f} t/h, bagasse {th(bagasse):.1f} t/h, filter cake {th(cake):.2f} t/h")
print(f"A sugar {th(a_sugar):.2f} t/h, {100.0 * th(a_sugar, S) / th(a_sugar):.2f} % sucrose, "
f"{100.0 * th(a_sugar, W) / th(a_sugar):.2f} % water")
print(f"Final molasses {th(final_molasses):.2f} t/h; B and C sugars returned {th(b_sugar):.2f} / {th(c_sugar):.2f} t/h")
print(f"Sucrose: {sucrose_cane:.2f} t/h in the cane, {th(a_sugar, S):.2f} in the sugar "
f"({100.0 * th(a_sugar, S) / sucrose_cane:.1f} %), {th(bagasse, S):.2f} in the bagasse, "
f"{th(cake, S):.2f} in the filter cake, {th(final_molasses, S):.2f} in the final molasses")
print(f"Duties: juice heater {kw(q_heater):.0f} kW, pans A / B / C {kw(pan_duties['A']):.0f} / "
f"{kw(pan_duties['B']):.0f} / {kw(pan_duties['C']):.0f} kW, C massecuite cooler {kw(q_cryst):.0f} kW")
ins = th(cane) + th(imbibition) + th(steam)
outs = sum(th(s) for s in (bagasse, flash_vapour, cake, last_vapour, a_vap, b_vap, c_vap, final_molasses, a_sugar)) \
+ sum(th(e[1]) for e in effects)
print(f"Mass balance: {ins:.3f} t/h in, {outs:.3f} t/h out")
out = os.environ.get("DWSIM_SAVE_TO")
if out:
fs.OrthogonalLayout(True) # rows read left to right, so the drawing fits a page
fs.Save(out)
fs.SaveScreenshot(os.path.splitext(out)[0] + ".png")
print("saved", out)
Exercises
- Raise the exhaust steam to 17 t/h and solve. Which Brix does the syrup reach, and what happens to the A massecuite?
- Lower the liquid separation of
CF-Ato 90 %. How much does the sucrose of the A sugar fall, and how much more B sugar returns to the A pan? - Read the
C Massecuite(before the cooler) with the Sugar Stream Analysis. How many crystals does it have at 75 °C, and how many does the cooling to 45 °C add? - Change the boiling temperature of the C pan to 80 °C and solve. How do the two recycles behave? (In the Case Library case they alternate between two states and don't converge.)
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
- DWSIM User Guide: the Sugar Solutions property package and the Sugar Stream Analysis
Next Steps¶
You now know how a raw sugar mill extracts, concentrates and crystallizes the sucrose of the cane, and how to follow it with the Brix, the purity and the supersaturation of each stream. Open the Raw sugar mill case of the Case Library to see the dryer and the bagasse boiler added to the same flowsheet, or continue with the next tutorial of the sugar and ethanol section, where the juice and the molasses go to an ethanol distillery.