top of page

29. maj 2025

||

By Humzaa Imtiaz Ullah

Simulating a Mixer using Loop

In the previous post, we explored how to perform a simple material balance on a mixing tank with just two incoming streams. While that works for fixed scenarios, real-world applications often involve multiple incoming streams, each with different flow rates and concentrations.

In this improved version, we use a for loop in Python so that the user can define any number of incoming streams. This makes the script far more flexible — you don’t need to modify the code each time you add or remove a stream. The program will handle it all dynamically.

This script prompts the user to input the number of streams, then loops through each one to collect flow and concentration data, finally computing the total outlet flow rate and overall outlet concentration.

📺 Want to see it in action? Watch the tutorial below.



We are always looking for feedback!
So if you wish to see something added or improved, then do reach out to us!

ChemEnggLife - Main Logo - white background.png

Chemical Engineering Life

ChemEnggLife

Discovering the interesting world of chemical engineering, as told by Chemical engineers themselves.

Quick Links

  • LinkedIn
  • Instagram
  • Facebook

Subscribe and Stay Updated!

©2023 by ChemEnggLife

bottom of page