Engineering With Python Rotating Header Image

Solving a Binary Batch Distillation – Programming Approach

Plan your solution:

  • Draw a picture, in this case, list all of your data
  • Remember the fundamentals and apply
  1. Draw your material or energy balance envelope (If necessary, list out your equations and problem data)
  2. Remember [Accumulation = In – Out + Source/Sink]
  • Think about what you need to do and the answer you want
  • You need to solve for an initial value ordinary differential equation, so you’ll need an ODE solver
  • You’ll want to print the solution to get the information

How to start your program:

  • With Ipython open, open your editor
  • Label your program (you’ll never remember it, go ahead and label it!)
  • Import the packages you’ll need for solving

henleySeader362Startup

Input the Constants:

henleySeader362InputConst

Define the Function for the ODE Solver:

henleySeader362FuncDef

Set up to Plot the Solution:

henleySeader362Plot

This was pretty bare bones.  Pretty straightforward.  Let’s press on to the solution.

Leave a Reply