Home / Science / Engineering / Chemical engineering / Mass and energy balance solverTool #664

Mass and energy balance solver: flowsheet with mixers, splitters, separators, reactors and recycle, degrees of freedom and stream table

Describe a process flowsheet in a few lines (mixers, splitters, separators with split fractions, reactors with a conversion) and its feeds, and get every stream's component flows, a degrees-of-freedom check, a stream table and, with heat capacities, the temperatures and heat duties. Recycle loops are solved directly as one linear system.

Keep it one tap away for everyday use.

Bookmark Mass and energy balance solver?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Components
  2. Flowsheet
  3. Solve
  4. Streams
Nothing is uploadedWorks offline once open

Components

Heat capacities are taken as constant; the example values are rounded, made-up averages. Use values for your own temperature range.

Units

  • mixer: any inlets into one outlet.
  • splitter: one inlet into outlets of the same make-up; give the fraction to each outlet but the last (here 5 % to S6, the purge).
  • separator: one inlet, two outlets; give the fraction of each component that goes to the first outlet (unlisted components: 0).
  • reactor: one inlet and outlet; give the reaction, the key reactant and its conversion (fraction reacted), and for the energy balance the heat of reaction dH in kJ per kmol of reaction as written (negative = gives out heat).
  • Add T 25 to a reactor or separator to fix its outlet temperature (°C); the tool then works out the heat duty. Without it, reactors and mixers are adiabatic and separators and splitters keep the inlet temperature.

Feeds and other specifications

Flows are molar (kmol/h); unlisted feed components are zero, and "H2 ?" leaves a feed flow unknown so that another specification can fix it. Heat duties are reported in kW. The example flowsheet, an ammonia-style synthesis loop with a purge, is made up for illustration.

Balance

Stream table

Download

What it does

Material balances are the first calculation in any chemical process: what goes in must come out, or be made or used up by reaction. This tool solves the balances for a whole flowsheet at once.

You describe the plant as units joined by streams:

  • Mixer: several streams join into one.
  • Splitter: one stream divides into branches with the same make-up (for example a purge and a recycle).
  • Separator: one stream divides into two, with a split fraction for each component (a condenser, a column, a membrane).
  • Reactor: one reaction, with the conversion of a key reactant.

Every balance is linear in the component molar flows, so the tool writes all of them as one matrix and solves it in a single step. That handles recycle loops directly, with no guessing and iterating of “tear streams” as in a sequential solution. Before solving it does a degrees-of-freedom analysis: it counts the unknown flows and the independent equations, and tells you if the problem is fully specified, needs more information (and which flows are still free) or has conflicting specifications.

Add a molar mass for each component to get mass flows and a mass closure check on every unit. Add heat capacities and feed temperatures to get the energy balance: the outlet temperature of adiabatic mixers and reactors (with the heat of reaction), and the heat duty of any reactor or separator whose outlet temperature you fix.

How to use it

  1. List the components with their molar mass and, if you want an energy balance, a constant cp.
  2. Write one line per unit, for example separator SEP: S3 -> S4 + S5 | NH3 0.95 | T 25.
  3. Give the feeds, for example S1: N2 100, H2 300, Ar 1 | T 150. To fix a different stream instead, write H2 ? in the feed and add a line such as S6 total 50 or S6 H2 39.
  4. Read the result and stream table. Switch between flows, mole fractions and mass flows; download the table.

Worked example

A made-up ammonia-style loop: 100 kmol/h of N2, 300 of H2 and 1 of argon at 150 °C join the recycle (M1), 25 % of the N2 reacts (N2 + 3 H2 → 2 NH3), a condenser at 25 °C takes 95 % of the ammonia out as product, and 5 % of the remaining gas is purged to stop the argon building up. There are 28 unknown flows and 28 independent equations: 0 degrees of freedom. The extent of reaction is 86.96 kmol/h, so the product stream S4 carries 173.46 kmol/h of NH3 (2,954 kg/h) and the purge S6 carries all the argon that comes in, 1 kmol/h. With the example heat capacities the mixer outlet is 60.37 °C, the adiabatic reactor outlet 280.62 °C, and the condenser must remove 2,624 kW.

Tips

  • If the result says “under-specified”, the list of free flows shows where information is missing.
  • A purge fraction that is too small makes inerts build up: try 0.01 and watch the argon in the recycle.
  • Units with no recycle can be checked by hand one at a time; recycle problems are where the matrix method saves time.

FAQ

Why molar flows? Reactions are written in moles, so molar flows keep every balance linear. Mass flows follow from the molar masses.

Can it do several reactions or equilibrium? Not yet: one reaction per reactor, with a set conversion. Use the equilibrium solver for equilibrium conversions, then enter the conversion here.

Where the numbers come from

  • Steady-state material balances, degrees-of-freedom analysis, extent of reaction, recycle and purge, and sensible-heat energy balances with constant heat capacity: standard chemical engineering, for example Felder, Rousseau and Bullard, Elementary Principles of Chemical Processes, and Himmelblau and Riggs, Basic Principles and Calculations in Chemical Engineering (methods only).
  • Molar masses are general facts from standard atomic weights. The heat capacities and heat of reaction in the example are rounded, made-up values for illustration; the example flowsheet is made up.
  • Checked against an independent NumPy calculation (numpy.linalg.solve on the hand-written balance equations) written for the tests.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Molar mass calculator #78 Type any formula, including brackets, hydrates, isotope labels and charges, for its molar mass, exact mass, percentage of each element, and a grams, moles and particles converter. Equilibrium solver #89 Type any reaction and K: the exact ICE table, Q and which way it goes, conversion, Kp ↔ Kc and pH for acids and bases; then add or remove a species, squeeze the volume or change the temperature and watch the equilibrium shift. Thermochemistry calculator #95 Type a balanced reaction and get its standard enthalpy, entropy and Gibbs energy change, the equilibrium constant, ΔG and K at other temperatures, and the temperature where the reaction turns spontaneous. Values for 38 common substances fill in by themselves; type your own for anything else. Inverse kinematics for 2 and 3 link arms #637 Find the joint angles that put a planar 2-link arm's tip, or a 3-link arm's tool at a given angle, on a target point. Both elbow-up and elbow-down solutions, a reach check that says why a point is out of reach, optional joint limits, a drawing of the arm and its workspace, and a batch of targets to CSV. Steam tables and Rankine cycle #661 Look up water and steam properties from pressure and temperature, saturation by pressure or temperature, or from pressure with enthalpy, entropy or quality, using the IAPWS-IF97 industrial formulation. Then work out a simple or reheat Rankine power cycle: turbine and pump work, heat in, thermal efficiency, exit quality, steam rate and a temperature-entropy diagram. Reactor design: CSTR, PFR and batch #665 Size an isothermal CSTR, plug flow reactor, train of equal CSTRs or batch reactor for a target conversion, or find the conversion a given size reaches. n-th order, reversible first-order and saturating rate laws, an Arrhenius rate constant, gas-phase volume change, a Levenspiel plot and conversion-volume curves.