Engineering With Python Rotating Header Image

Posts under ‘solving ordinary differential eqn’

Solving a Binary Batch Distillation – Solution

Solve the Problem: Let’s run the program and see what the plot looks like: Well, not much more to say.  From the plot, x_w(t = 5 hours) is about 0.35.  Henley and Seader calculated xw (t = 5 hours) = 0.351.  I’d say pretty close.  It’s easy to calculate W(t).   It is 100 kg – […]

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 Draw your material or energy balance envelope (If necessary, list out your equations and problem data) Remember [Accumulation = In – Out + Source/Sink] Think about what you need to do and the answer you want […]

Solving a Binary Batch Distillation – Problem Description

Reference: This is from E.M. Rosen and R. N. Adams, “A Review of Spreadsheet Usage in Chemical Engineering Calculations”, Computers and Chemical Engineering, Vol. 11, No. 6, pp. 723-736, but they took it from Henley and Rosen, “Materal and Energy Balance Computations”, Wiley, NY 1969 pg. 362.  Very similar to an earlier problem that we […]

Dynamics of a Heated Tank with Proportional/Integral (PI) Control – Solution

Solve the problem: Okay, let’s open our IPython window, pull up our script and set Kc = 0.0.  Also, be sure that both the proportional and integral parts of your controller is on.  It doesn’t make a lot of difference since Kc is zero, but it keeps everything straight.  Also, ensure that Ti is ‘on’ […]

Dynamics of a Heated Tank with Proportional/Integral (PI) Control – Programming Approach

Plan your solution: Draw a picture, in this case, list all of your data and equations Remember the fundamentals (material and energy balances, equations of state) and apply Draw your material or energy balance envelope (Proportional/Integral Contoller) Remember [Accumulation = In – Out + Source/Sink] Think about what you need to do and the answer […]

Dynamics of a Heated Tank with Proportional/Integral (PI) Control – Problem Description

Reference: This is problem 10 from an article  “A Collection of Representative Problems in Chemical Engineering for Solution by Numerical Methods”.  These problems came from Session 12 of the ASEE Chemical Engineering Summer School held in Snowbird, Utah in 1997.  In this problem, you will be modeling the temperature of a tank heated with a […]

Reversible, Exothermic, Gas Phase Reaction in a Catalytic Reactor – Programming Approach

Plan your solution: Draw a picture, in this case, list all of your data and equations Remember the fundamentals (material and energy balances, equations of state) and apply Draw your material or energy balance envelope (catalytic reactor) Remember [Accumulation = In – Out + Source/Sink] Think about what you need to do and the answer […]

Reversible, Exothermic, Gas Phase Reaction in a Catalytic Reactor – Problem Description

Reference: This is problem 8.24 in “Problem Solving in Chemical Engineering with Numerical Methods” by Michael Cutlip and Mordecai Shacham, Prentice-Hall ISBN 0-13-862566-2.  In this problem, you will be designing a gas phase catalytic reactor with a pressure drop to accomplish a reversible gas phase reaction. Concepts: Solve a system of ordinary differential equations with […]

Solving Differential Algebraic Equations – Solution

Solve the problem: So, let’s execute the program we developed in the last post and see how the concentration changes with time and if we believe what the computer is telling us.  If you need a refresher for how to execute a program script in IPython, go to IPython documentation webpage.  It has a tremendous […]

Solving Differential Algebraic Equations – Programming Approach

Plan your solution: Draw a picture, in this case, list all of your data and equations (see the first post of this series) Remember the fundamentals (unsteady state material balance) and apply Draw your material or energy balance envelope (batch distillation at wikipedia) Remember [Accumulation = In – Out + Source/Sink] Think about what you […]