An open, friendly chemical process simulator. Draw a flowsheet in the browser, pick your compounds from a database of ~76,000, and get rigorous phase-equilibrium results, with error messages that tell you what to do next.
Status: early prototype. Sequential-modular steady state, with reactors, columns and vapor–liquid–liquid equilibrium, plus dynamic simulation with hold-ups and PID controllers. Good for learning and conceptual design; not yet a replacement for commercial simulators.
The example in the screenshot, examples/methanol_plant.json,
puts it all together: syngas reacts to methanol in an equilibrium reactor, the unconverted gas
is recompressed and recycled with a purge, and a rigorous column splits the crude into 99.8 %
methanol and water.
Commercial process simulators are powerful but hard to learn, expensive, and closed. Open alternatives exist, but most are either libraries for programmers or desktop apps with dated interfaces. Fluxsheet aims for both: a modern editor and a clean Python core.
| Guides you through property methods | Picks a thermodynamic model for your components and explains why (e.g. "water and ethanol are polar, so the liquid is non-ideal, use UNIFAC"), and warns when your manual choice looks wrong. |
| Explains every error | Each error names the unit or stream, says what went wrong, and suggests a fix: "Valve V1: outlet pressure is above inlet pressure. Hint: a valve can only reduce pressure; use a pump or compressor." |
| Values with units | Type 80 degC, 1.5 bar, 10 kmol/h anywhere, in the editor or in files. |
| Files you can diff | Flowsheets are plain, readable JSON. Put them in Git, review changes in pull requests. |
| Recycles just work | Tear streams are found automatically and converged with Wegstein acceleration. |
| Scriptable | The editor is a thin client over a Python package you can use directly. |
Install it locally:
pip install "fluxsheet[server]" # Python ≥ 3.14
fluxsheet serve # open http://127.0.0.1:8000or run the container: docker build -t fluxsheet . && docker run -p 8000:8000 -e FLUXSHEET_DEMO=0 fluxsheet.
From source (for development; the editor needs Node.js ≥ 18):
git clone https://github.com/almi2000/fluxsheet.git
cd fluxsheet
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[server,dev]"Run a flowsheet from the command line
fluxsheet run examples/ethanol_flash.jsonProperty method: unifac
(water, ethanol are polar, so the liquid is likely non-ideal. ...)
Stream T [°C] P [bar] Vap. frac. Flow [kmol/h] Flow [kg/h]
---------------------------------------------------------------
S1 25.00 1.2 0.0000 100 2363
S2 92.00 1.1 0.5052 100 2363
S3 92.00 1.1 1.0000 50.52 1396
S4 92.00 1.1 0.0000 49.48 966.4
HEATER: duty 733.5 kW
Start the web editor
cd web && npm install && npm run build && cd ..
fluxsheet serve # open http://127.0.0.1:8000For editor development, run fluxsheet serve and npm run dev (in web/) side by side,
then open http://localhost:5173.
In the editor, Ctrl/⌘ Z and Ctrl/⌘ Shift Z undo and redo every change, Ctrl/⌘ C / V / D copy,
paste and duplicate the selected units (shift-click or shift-drag to select several; copies also
paste into another editor tab as Fluxsheet JSON, together with the definitions of user-defined
compounds they use; a name the target flowsheet already defines differently keeps its own
meaning, and the editor says so), and Arrange lays the flowsheet out left to right. Press ?
for all shortcuts.
The editor autosaves the open flowsheet in the browser: after a reload or a crash it comes back with a "Restored your last session" notice (Discard starts over). Open also lists the last flowsheets you opened or saved. These copies live only in this browser; Save writes the file. With the editor open in several tabs, a tab never silently overwrites the autosave of another tab's newer changes: it stops autosaving and offers to load the other tab's version or to autosave its own instead.
Reports. Export: Excel / Printable report in the results bar, or from the command line:
fluxsheet report examples/benzene_toluene_purity.json --xlsx report.xlsx --html report.htmlThe Excel workbook has sheets for the summary (components, property method and why, binary
parameter sources, warnings, convergence), the stream table, unit results, column and reactor
profiles, design specs and, with a costing section, the costs (summary and per unit), all in
the editor's units (°C, bar, kmol/h, kg/h, kW) with the unit named on every row or column.
Sensitivity studies (one table per study), optimizations (optimum, variables with bounds,
constraints and whether they are active, iteration history) and the time series of a dynamic
run are added when they were run in the editor and the flowsheet has not changed since; the
time series go to the Excel workbook only (with dynamic run next to the buttons). From the
command line, --with-runs runs all studies, optimizations and the dynamic run for the report.
The HTML report is a self-contained page with print styles: print it to PDF from the browser.
Excel output needs openpyxl (included in [server], or pip install "fluxsheet[report]");
the HTTP API is POST /api/report?format=xlsx|html with the flowsheet as the body, or
{"model": ..., "runs": {"sensitivity": [...], "optimizations": [...], "dynamics": {...}}}
with results as the API returned them.
Use it from Python
from fluxsheet import FlowsheetModel, solve
result = solve(FlowsheetModel.load("examples/gas_recycle.json"))
print(result.streams["NGL-OUT"]["mass_flow"] * 3600, "kg/h"){
"format": "fluxsheet/1",
"name": "Ethanol-water flash",
"components": ["water", "ethanol"],
"property_method": "auto",
"units": [
{"id": "FEED", "type": "Feed",
"params": {"T": "25 degC", "P": "1.2 bar",
"flows": {"water": "80 kmol/h", "ethanol": "20 kmol/h"}}},
{"id": "HEATER", "type": "Heater", "params": {"T": "92 degC", "dP": "0.1 bar"}},
{"id": "DRUM", "type": "Flash"}
],
"streams": [
{"id": "S1", "from": "FEED.out", "to": "HEATER.in"},
{"id": "S2", "from": "HEATER.out", "to": "DRUM.in"},
{"id": "S3", "from": "DRUM.vapor"},
{"id": "S4", "from": "DRUM.liquid"}
]
}Plain numbers are SI (K, Pa, mol/s, W). A stream without to leaves the process.
property_method at the top is the default for every unit. A unit can override it with its
own property_method, the way commercial simulators use property sections. In
examples/methanol_plant.json the high-pressure synthesis loop runs on Peng-Robinson, while
the degasser and the methanol/water column use NRTL:
{"id": "COLUMN", "type": "DistillationColumn", "property_method": "nrtl", "params": {...}}We chose a per-unit field over named sections because it keeps the file flat and each unit says what it does where it is defined; a "section" is simply the units that share a method. Products without an override follow the unit that feeds them.
- Each unit calculates (flashes and energy balance) with its own method.
- Where a stream passes from one method to another, its component flows, temperature and
pressure are kept and it is flashed again at that T and P with the receiving unit's
method. Mass is conserved exactly; the enthalpy may jump by the difference between the two
methods' departure functions. The result lists every such crossing
(
property_crossings, with the vapor fraction on both sides and the enthalpy change) and warns when a crossing changes the phase noticeably: put the boundary on a stream that is clearly one phase. - The result reports the method each unit used, and for separation units a suggestion based on what that unit actually sees (its feed composition without traces, and its pressure).
- In the editor, the unit inspector has a Property method select with that suggestion, and nodes carry a colored method tag whenever the flowsheet mixes methods.
In the activity-coefficient methods (NRTL, UNIQUAC, UNIFAC, Wilson) light gases such as H2,
N2, O2, CO, CO2, CH4 and ethane have no meaningful vapor pressure at process temperatures.
They are therefore Henry components: their liquid fugacity is x_i H_i with a Henry
constant measured in the solvent, and their activity coefficient is 1 (ideal dilute
solution). The heat of solution follows from the temperature dependence of H_i, so energy
balances stay consistent. Automatic choice: every component with a critical temperature
below 310 K, as long as a solvent is present and a Henry constant exists. Override it:
"henry_components": ["carbon dioxide", "hydrogen sulfide"]([] turns Henry's law off). Constants for gases in water come from IAPWS G7-04 (valid to
250 °C), otherwise from the Sander (2015) and ChemSep compilations, and for organic solvents
from Peng-Robinson predictions shipped with thermo; for a solvent without any constant the
gas's solubility comes from the other solvents' constants (with a warning). Each result lists the source per gas and solvent, and warns where the
model is stretched (more than 3 % gas in a liquid, or above 20 bar).
Compounds the database lacks (or your own version of one it has) are defined in the
flowsheet and then used by name in components:
"custom_compounds": [
{"name": "my-ester", "formula": "C5H10O2", "smiles": "CCCC(=O)OC",
"joback_groups": {"-CH3": 2, "-CH2-": 2, "-COO- (ester)": 1},
"unifac_groups": {"CH3": 2, "CH2": 1, "CH2COO": 1},
"constants": {"Tb": "102.7 degC"},
"antoine": {"A": 9.321, "B": 1389.0, "C": -54.0}}
]Give what you know (constants: MW, Tb, Tm, Tc, Pc, Vc, omega, Hf, Gf, dipole, r, q, with
units as anywhere else; antoine: log10(P/Pa) = A - B/(T/K + C)). The rest is estimated:
Tb, Tc, Pc, Vc, Hf, Gf and the ideal-gas heat capacity by Joback group contribution, omega
and the vapor pressure by Lee-Kesler (or "vapor_pressure": "ambrose-walton"), the liquid
volume by COSTALD. Joback groups can come from the SMILES when RDKit is installed
(pip install "fluxsheet[estimation]"). Every estimate appears in the result's
parameter_sources and warnings. Equations of state and the ideal method need nothing more;
UNIFAC needs unifac_groups (Dortmund subgroups), UNIQUAC those or r and q; NRTL and
Wilson fit missing pairs to UNIFAC when groups are given. In the editor, + Custom
compound in the components section opens a form for this; clicking a custom compound edits
it, and renaming it there updates every reference (feed flows, key components, reactions,
specs, studies, calculators, dynamics and optimizations).
Reactions are defined once per flowsheet and picked by id in a reactor. Each is checked for element balance against the compound database; kinetics and an equilibrium constant are optional:
"reactions": [
{"id": "EST",
"stoichiometry": {"acetic acid": -1, "ethanol": -1, "ethyl acetate": 1, "water": 1},
"kinetics": {"k0": 2e-7, "Ea": "50 kJ/mol", "T_ref": "70 degC",
"orders": {"acetic acid": 1, "ethanol": 1}, "equilibrium_limited": true},
"keq": {"A": 1.386}}
]| Reactor | Model |
|---|---|
| Stoichiometric | Given conversion of a key component per reaction, sequential or parallel |
| Yield | Given product mass yields, scaled to conserve mass |
| Equilibrium | Chosen reactions at equilibrium; K(T) from ΔG°f, ΔH°f and ideal-gas Cp (van 't Hoff), or ln K = A + B/T + C ln T + D T |
| Gibbs | Minimum Gibbs energy of an ideal-gas mixture under element balances; no reactions needed |
| CSTR | Power-law kinetics, gas or liquid, solved for the outlet extents (and temperature) |
| Plug flow | Power-law kinetics integrated along volume or length, with conversion, temperature and composition profiles |
| Batch | One batch cycle integrated over time (stiff BDF with stop events); the product leaves as the average stream per cycle |
All reactors run isothermal, adiabatic, at a given duty, or cooled/heated through a jacket
or coil (see utilities below), with an optional pressure drop.
The energy balance uses enthalpies that include formation enthalpies, so heats of reaction
need no separate input. See examples/steam_reforming.json and
examples/ethyl_acetate.json, and reactions.py for units
and conventions.
The Batch Reactor works like Aspen Plus' RBatch: the continuous feed is collected into
charges (charge = feed × cycle time). Each cycle the vessel is filled (charge_time), reacts
until a stop criterion is met, and is emptied and cleaned (down_time). The product leaves
as the average stream over the cycle, so mass balances against the feed and the unit fits
into continuous flowsheets.
- Cycle: give the
cycle_timeor thechargeper batch. With neither, one vessel runs back to back. When a batch occupies the vessel longer than the cycle, the unit reports how many vessels are needed in turn. - Stop criteria: stop after
batch_time(always required; with another criterion it is the upper limit), or at a conversion of the key component, a mole fraction of a component, or a temperature. A target that is not reached within the batch time is reported as an error. - Vessel:
- Constant pressure: the contents are flashed, and vapor that forms stays in the vessel.
- Constant pressure with
vent: "yes"(liquid phase only): the liquid boils at its bubble point once it gets there, and the vapor goes to theventoutlet as it forms. - Constant volume (
vessel: "constant_volume", gas phase only): a closed, rigid vessel in which the pressure follows the moles and the temperature.
- Energy: isothermal, adiabatic, a fixed duty, a temperature program (
T_profile, a table of time and temperature), or a jacket with a utility (U, area). The jacket's heat follows the contents' temperature through the batch. - Results:
- Time profiles of temperature, pressure, conversion, duty, contents volume and composition.
- Cycle time and charge.
- Heat per batch and peak duty.
- Productivity: the production rate of the product component.
- Vented amount and the largest contents volume (for sizing).
{"id": "BATCH", "type": "BatchReactor",
"params": {"reactions": ["EST"], "phase": "liquid", "key": "acetic acid",
"batch_time": "8 h", "stop_conversion": 0.6, "cycle_time": "3 h",
"charge_time": "30 min", "down_time": "1 h",
"area": "3 m2", "U": "400 W/m2K", "utility": "CW", "utility_flow": "1 kg/s"}}See examples/ethyl_acetate_batch.json: a preheated esterification batch, cooled by
cooling water in the jacket.
The Heat Exchanger passes heat between two process streams (hot_in → hot_out,
cold_in → cold_out), countercurrent or cocurrent. Give one of: either outlet temperature,
the duty, the minimum approach temperature, or UA (rating). Both temperature-duty curves are
followed through phase changes (zone analysis), so an internal pinch, e.g. where a vapor starts
to condense, is found; a temperature cross is reported together with the largest feasible duty.
Results: duty, UA, mean temperature difference (LMTD) and minimum approach, plus the
temperature profile along the exchanger. See examples/feed_effluent_exchanger.json.
Utilities (cooling water, chilled water, steam, thermal oil, ...) are defined once per flowsheet and chosen on any unit with an energy balance: heaters, flash drums, decanters and reactors. The unit then reports the utility it uses and the UA (or, with U, the area) its duty needs. Give U and the area of a jacket or coil instead of a temperature or duty, and the duty follows from Q = UA·LMTD, solved together with the unit's energy balance: a cooled reactor settles where the heat of reaction and the jacket balance. Stirred vessels and drums are treated as well mixed; a heater's stream runs counter- or cocurrent to the utility. Steam condenses at its saturation temperature, with the latent heat from IAPWS-95; a fluid warms up or cools down between its inlet and outlet temperature, or at a flow the unit fixes.
"utilities": [
{"id": "CW", "type": "fluid", "T_in": "25 degC", "T_out": "35 degC", "cp": "4.18 kJ/kgK"},
{"id": "LPS", "type": "steam", "P": "3 bar"}
]A design spec reaches a target by adjusting one unit parameter between bounds; it is solved by an outer loop (secant steps, then Brent's method once the target is bracketed) around the flowsheet solver:
"design_specs": [
{"id": "PURITY",
"target": {"stream": "DIST", "property": "mole_fraction", "component": "benzene"},
"value": 0.995,
"vary": {"unit": "COLUMN", "param": "reflux_ratio", "lower": 1.2, "upper": 5}}
]Targets are stream properties (T, P, vapor_fraction, molar_flow, mass_flow,
enthalpy_flow, mole_fraction, component_flow) or unit results such as duty. A
sensitivity study solves the flowsheet over a range of one or two parameters and records
outputs given the same way:
"sensitivity": [
{"id": "REFLUX",
"vary": [{"unit": "COLUMN", "param": "reflux_ratio", "lower": 1.4, "upper": 3.4, "points": 9}],
"outputs": [{"stream": "DIST", "property": "mole_fraction", "component": "benzene"},
{"unit": "COLUMN", "property": "reboiler_duty"}]}
]Run it from the Sensitivity tab of the editor (chart, table, CSV export) or with
fluxsheet sensitivity examples/benzene_toluene_purity.json --csv reflux.csv. Both are edited
in the flowsheet settings; see examples/benzene_toluene_purity.json.
A calculator sets unit parameters from formulas over flowsheet values, e.g. a make-up
flow that follows what the purge loses. Variables are stream properties and unit results (as
in design specs) or the current value of a parameter; expressions are plain arithmetic with
min, max, sqrt, exp, log, ... and a if cond else b, in SI units. They are parsed,
never run as code. Assignments that read results are repeated with the flowsheet solve until
they settle.
"calculators": [
{"id": "MAKEUP",
"variables": {"lost": {"stream": "PURGE", "property": "component_flow", "component": "methanol"}},
"assign": [{"unit": "FEED2", "param": "flows", "component": "methanol", "expression": "lost"}]}
]Recycle loops converge by Wegstein's method by default; "solver": {"acceleration": "broyden"}
switches to Broyden's quasi-Newton method, which handles strongly coupled loops better.
With a "costing" section every solve also prices the plant: Turton's purchased-cost
correlations scaled by the CEPCI, bare-module factors for installation, material (carbon or
stainless steel) and pressure. Sizes come from the solution. Column diameters come from the
vapor load (F-factor) and their height from the trays. Drums are sized for 5 min of liquid,
exchanger areas from |Q| / (U LMTD), pumps and compressors from their power. Utilities are
charged per GJ; without a price, the cheapest steam level, cooling water or refrigerant that
is hot or cold enough is chosen. The total annualized cost is
TAC = operating cost + CRF × 1.18 Σ bare-module cost. Every unit then reports
bare_module_cost and operating_cost. {"property": "tac"} (also capital_cost and
operating_cost) reads the totals in design specs, sensitivity studies and optimizations.
The estimate is of study grade (±30 %); set your own prices.
An optimization maximizes or minimizes an expression over named variables (as in
calculators) by varying unit parameters between bounds, with <=, >= or = constraints.
Each trial point is a full solve, including design specs. It uses SLSQP on scaled variables
with finite differences. If a trial flowsheet fails, it continues with COBYLA from the best
feasible point. It reports the history per iteration, the optimum, which constraints are
active, and the solution there:
"costing": {"cepci": 800, "hours_per_year": 8000, "interest_rate": 0.1, "plant_life": 10},
"optimizations": [
{"id": "MARGIN",
"variables": {"ea": {"stream": "S3", "property": "component_flow", "component": "ethyl acetate"},
"tac": {"property": "tac"},
"T": {"unit": "CSTR", "param": "T"}},
"objective": "0.25 * ea * 0.08811 * 3600 * 8000 - tac", "sense": "maximize",
"vary": [{"unit": "CSTR", "param": "V", "lower": "1 m3", "upper": "30 m3"},
{"unit": "CSTR", "param": "T", "lower": "50 degC", "upper": "95 degC"}],
"constraints": [{"expression": "T", "relation": "<=", "value": 358.15}]}
]fluxsheet optimize examples/ethyl_acetate_optimization.jsonIn the editor, costing and optimizations are edited in the flowsheet settings. They run from the Costing and Optimization tabs of the results, and Use optimum writes the optimal parameters back into the flowsheet (only while the flowsheet is still the one the optimization ran on; after a change, run it again).
From the steady state, Fluxsheet integrates how the plant moves over time, like a flow-driven dynamic simulator: vessels and reactors hold up material, PID controllers act, and feeds or setpoints change as steps or ramps.
| Unit | Dynamic model |
|---|---|
| Flash drum, Mixing tank | Component and energy hold-up of the contents at the vessel pressure; liquid level from the vessel diameter; liquid leaves at a set flow (moved by a level controller) or by gravity, vapor as it forms |
| CSTR | Full of the reacting phase; kinetics and heat of reaction in the balances, the outflow keeps the volume; duty from the steady state, a controller, or a jacket with a utility |
| Heater / Cooler | Outlet enthalpy follows with a first-order time constant (the exchanger's thermal mass) |
Every other unit is recalculated from its inlets at each instant. Controllers work in percent of range (gain, integral and derivative time, a sensor lag, back-calculation anti-windup) and start bumpless at the steady state. The stiff BDF integrator restarts at every event; its Jacobian is sparse, since each hold-up only feels the units upstream of it.
"dynamics": {
"t_end": "2 h", "points": 121,
"units": {"REACTOR": {}, "BUFFER": {"diameter": "1.2 m", "height": "2.5 m"}},
"controllers": [
{"id": "LC1", "measure": {"unit": "BUFFER", "property": "level"},
"manipulate": {"unit": "BUFFER", "param": "liquid_flow"}, "action": "direct",
"gain": 1.5, "integral_time": "10 min", "op_range": ["0 kmol/h", "50 kmol/h"]}
],
"events": [{"time": "10 min", "unit": "FEED", "param": "flows", "component": "ethanol",
"value": "12 kmol/h"}]
}Set it up in the flowsheet settings and run it from the Dynamics tab of the results
(charts per quantity, CSV export), or with
fluxsheet dynamic examples/esterification_control.json --csv run.csv.
fluxsheet import-dwsim plant.dwxmz -o plant.json
fluxsheet run plant.jsonReads a DWSIM simulation (.dwxml, or the zipped .dwxmz) and writes the equivalent
flowsheet: the compounds (by CAS number or name), the property method, the feeds at their
temperature, pressure and flows, the units with their main specs, the connections and
DWSIM's layout. In Python: model, warnings = fluxsheet.importers.import_dwsim(path);
over HTTP: POST /api/import/dwsim with the file as the body.
| DWSIM | Fluxsheet |
|---|---|
| Mixer, Splitter (three outlets: two splitters), Tank | Mixer, Splitter, Mixer |
| Heater, Cooler | Heater (outlet T, duty, vapor fraction) |
| Pump, Compressor, Expander, Valve | Pump, Compressor, Turbine, Valve |
| Gas-liquid separator (with a second liquid: Decanter) | Flash, Decanter |
| Heat exchanger (hot side by inlet temperature) | HeatExchanger (outlet T, duty, UA, approach) |
| Shortcut column, compound separator | ShortcutColumn, ComponentSplitter |
| Conversion reactor (with its reactions), Gibbs reactor | StoichiometricReactor, GibbsReactor |
| Peng-Robinson (and PR78, PRSV2), SRK, NRTL, UNIQUAC, Wilson, UNIFAC variants, Raoult's law | peng-robinson, srk, nrtl, uniquac, wilson, unifac, ideal |
Everything else is listed as a warning, never dropped silently: energy streams, logical
blocks (adjust, spec, controllers), DWSIM's interaction parameters and package options,
other property packages (then auto), and units without a counterpart (rigorous and
absorption columns, equilibrium, CSTR and PFR reactors, pipes, ...). Such a unit is left
out and the streams around it become products and feeds at the state DWSIM stored, so the
rest still solves. Recycle blocks are dropped since Fluxsheet tears recycles itself, and a
spec Fluxsheet cannot express (energy-stream or curve modes) is replaced by the outlet
state DWSIM computed, with a warning. XML is parsed with defusedxml; files are
size-limited and zip archives checked against zip bombs.
Other packages can add unit operations, property methods, compounds and dynamic models.
They declare entry points in their pyproject.toml:
[project.entry-points."fluxsheet.units"]
my_units = "my_package.units" # UnitOperation subclasses
[project.entry-points."fluxsheet.property_methods"]
regular = "my_package.thermo:REGULAR" # fluxsheet.plugins.ActivityMethod / EquationOfState
[project.entry-points."fluxsheet.components"]
cuts = "my_package.compounds:COMPOUNDS" # custom-compound definitions
[project.entry-points."fluxsheet.dynamic_models"]
lags = "my_package.dynamics:MODELS" # {unit type: DynamicModel subclass}A plug-in unit can price its own equipment with a method estimate_cost(c), using Turton's
correlations through fluxsheet.costing.UnitCosting; an activity method with henry=True
treats light gases as Henry components, as NRTL does.
Once the package is installed, its units appear in the editor's palette and its methods in
the property-method lists. fluxsheet plugins shows what each plug-in added, and why one
failed to load. A plug-in cannot replace a built-in unit, method or compound; one that
fails is skipped. Set FLUXSHEET_DISABLE_PLUGINS=1 to load none. Plug-ins run inside
Fluxsheet, so install only packages you trust. examples/plugin/ is a
complete plug-in, and docs/architecture.md
describes the interfaces.
Unit operations: Feed, Product, Mixer, Splitter, Mixing tank, Heater/Cooler, Heat Exchanger, Flash drum, Decanter (liquid-liquid), Thin-film evaporator, Component splitter, Valve, Pump, Compressor, Multistage compressor, Turbine/expander, Pipe; logic blocks Multiplier, Duplicator and Selector.
| Unit | Model |
|---|---|
| Pump | To a pressure, or on its head curve (affinity laws at another speed); NPSH available from the inlet's bubble point, warning below NPSH required |
| Compressor | To a pressure, or on a polytropic or isentropic head curve (fan laws at another speed); surge and stonewall warnings |
| Multiplier, Duplicator, Selector | Scale a stream's flows, copy it to up to four outlets, or pass one of several inlets through; the mass balance treats them as boundaries |
| Mixing tank | Blends any number of feeds, vents vapor; jacket heating or cooling; residence time from the liquid volume |
| Thin-film evaporator | Wiped or falling film in plug flow along the heated wall: sensible heating, then evaporation with the vapor drawn off as it forms (differential evaporation), so it separates better than one flash; usual under vacuum |
| Multistage compressor | Stages of equal pressure ratio that make up the coolers' pressure drops, intercoolers with condensate drain, optional aftercooler |
| Turbine / expander | Isentropic expansion with efficiency; gas, steam (wet outlet allowed) or liquid |
| Pipe | Darcy-Weisbach with laminar or Swamee-Jain friction factor, height change, acceleration of an expanding gas (outlet Mach number, error when the flow chokes), heat loss; homogeneous two-phase flow; viscosities from thermo |
| Extraction column | Countercurrent liquid-liquid stages at constant temperature (VLLE flash per stage), feed at stage 1, solvent at the last stage |
Most units take several feeds on one inlet; they are mixed adiabatically before they enter.
Pump and compressor curves are tables of points at the rated speed, against the actual inlet volumetric flow; the efficiency column is optional. They are interpolated with a monotone cubic (PCHIP) and continue as straight lines beyond the last points, with a warning:
{"id": "P1", "type": "Pump", "params": {
"curve": {"flow_unit": "m3/h", "head_unit": "m",
"points": [[0, 60, 0], [20, 57, 0.55], [40, 48, 0.72], [60, 33, 0.68]]},
"speed": 1300, "rated_speed": 1450, "NPSH_required": "3 m"}}Columns: shortcut distillation design (Fenske, Underwood, Gilliland/Molokanov, Kirkbride); rigorous distillation on equilibrium stages (MESH equations solved together by Newton's method, Naphtali-Sandholm) with total, partial or no condenser, optional reboiler, stage pressure drop and Murphree efficiency, any number of feeds on their own stages, up to four liquid or vapor side draws (flow or fraction of the stage outflow; they leave through the outlets Side draw 1, 2, ... in table order, and the editor flags a connected side outlet without a draw), pumparounds (flow or fraction, cooled or heated by a duty or to a return temperature), side heaters and coolers on single stages, and kinetic reactive stages (liquid hold-up per stage, rates from the flowsheet's reactions, heat of reaction from formation enthalpies); absorber/stripper on the same stage model; liquid-liquid extraction column. Stage profiles (temperature, flows, compositions) show up in the inspector.
Property methods:
| Method | Use for |
|---|---|
| Peng-Robinson | Hydrocarbons, light gases, high pressure (ChemSep binary parameters) |
| Soave-Redlich-Kwong | Same territory, common in gas processing |
| UNIFAC (Dortmund) | Polar, non-ideal liquids at low/moderate pressure (water, alcohols, ketones…) |
| NRTL | Non-ideal liquids, azeotropes and liquid-liquid splits; binary parameters fitted to NIST ThermoML data, else ChemSep |
| UNIQUAC | Same territory as NRTL; ThermoML-fitted or ChemSep parameters, size/surface from UNIFAC groups |
| Wilson | Miscible polar mixtures (cannot represent a liquid-liquid split) |
| Ideal (Raoult) | Similar molecules at low pressure; single compounds |
NRTL, UNIQUAC and UNIFAC flashes find a second liquid phase when there is one (vapor-liquid-
liquid equilibrium). NRTL and UNIQUAC use Fluxsheet's own parameters regressed to measured
data from the NIST ThermoML Archive where they exist (fluxsheet fit-binary water ethanol
refits a pair), then ChemSep's; pairs without data are estimated by fitting to UNIFAC. Every
solve lists the source of each binary pair, and says so in its warnings when one is estimated. The Phase diagram view in the
results panel plots T-xy and P-xy diagrams of any two components (with azeotropes and
liquid-liquid regions) and phase envelopes of mixtures with an equation of state.
Enthalpies and volumes: the activity-coefficient methods take the liquid enthalpy from each compound's heat of vaporization correlation (ideal-gas enthalpy minus the heat of vaporization, plus the excess enthalpy) and the liquid volume from its density correlation; their vapor is an ideal gas. The volumes of the equations of state carry a Peneloux volume translation fitted to each compound's liquid density, which corrects liquid volumes without changing any phase equilibrium.
Carboxylic acids dimerize in the vapor (about 75 % of the acetic acid molecules in its saturated vapor at 1 atm). The activity-coefficient methods describe this for acetic, formic and propionic acid by chemical theory: the vapor is an ideal gas of monomers and acid dimers in equilibrium, an acid's fugacity is that of its monomer, and the liquid lies below the monomer gas by the heat of vaporization plus the dimers' bond enthalpy. Boiling points, heats of vaporization, vapor densities and liquid-phase heats of reaction (from the formation enthalpies) then agree with the data at once, and acid/water mixtures behave as measured: acetic acid/water boils without the spurious azeotrope an ideal monomer vapor gives, and formic acid/water has its maximum-boiling azeotrope near 107 °C. Cross dimers between different acids and acid-water complexes are not described. Other carboxylic acids, and every acid with an equation of state, keep a monomer vapor and are flagged with a warning.
Thermodynamics and compound data come from the excellent MIT-licensed
thermo and
chemicals libraries by Caleb Bell. See
docs/data-sources.md for where the data comes from and how we plan to
extend it.
- Distillation: shortcut column (Fenske–Underwood–Gilliland), then rigorous MESH column
- Reactors: stoichiometric, yield, equilibrium, Gibbs, CSTR/PFR with kinetics
- NRTL / UNIQUAC / Wilson with regressed (ChemSep) binary parameters, UNIFAC estimates for gaps
- NRTL/UNIQUAC parameter fitting from NIST ThermoML data (
fluxsheet fit-binary), seed set of common pairs - Vapor–liquid–liquid equilibrium (decanters, three-phase flash)
- Heat exchanger (two-sided), design specs, sensitivity studies
- Phase envelopes, T-xy / P-xy diagrams in the editor
- Undo/redo, copy/paste, auto-layout in the editor
- Utilities with jacket/coil heat transfer (U·A) on heaters, drums and reactors
- Calculator blocks; Broyden recycle convergence
- Dynamic simulation: vessel, CSTR and heater hold-ups, PID controllers, steps and ramps
- Batch reactor (RBatch-like): stop criteria, vent, jacket, cycle-time averaging
- Dynamic columns (tray hold-ups)
- Pressure-driven dynamics
- Optimization around the flowsheet (objective and constraints as formulas), equipment costing
- Columns with side draws, pumparounds and reactive stages; pump and compressor curves
- Reports (Excel, HTML); plug-ins for units, property methods and compounds
- Cooled plug flow reactor with co-/countercurrent coolant profile; process streams as jacket media
- U from film coefficients (geometry, Reynolds/Nusselt, fouling)
- CAPE-OPEN interoperability
src/fluxsheet/ Python core: compounds, thermo, reactions, units, column solver, CLI, HTTP API
web/ React + React Flow editor
examples/ Example flowsheets (also loadable in the editor)
tests/ pytest suite
docs/ Architecture and data-source notes
More in docs/architecture.md. Contributions are welcome, see CONTRIBUTING.md.
MIT. Fluxsheet is an independent project, not affiliated with or derived from any commercial simulator.
