Top Banner
Application of Numerical Problem Solving in Chemical Engineering Coursework Presenters: Robert P. Hesketh, Rowan University; Michael B. Cutlip, University of Connecticut
20

Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

May 15, 2018

Download

Documents

hatuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Application of Numerical Problem Solving in Chemical Engineering

Coursework

Presenters: Robert P. Hesketh, Rowan University; Michael B. Cutlip,

University of Connecticut

Page 2: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Polymath Software problem-solving capabilities include

• Differential Equations - up to 300 simultaneousordinary differential and 300 additional explicitalgebraic equations

• Nonlinear Equations - up to 300 simultaneousnonlinear and 300 additional explicit algebraicequations

• Data analysis and Regression - up to 200 variables withup to 1000 data points for each, with capabilities forlinear, multiple linear, and nonlinear regressions withextensive statistics plus polynomial and spline fittingwith interpolation and graphing capabilities

• Linear Equations - up to 264 simultaneous equations

Page 3: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Integration of POLYMATH with Fogler’s chemical reaction engineering textbook

Example 6-2 Membrane Reactor

Integration already accomplished! No extra work required.

A A, B, C

B B BB

A,B,C

B B BB

𝐴 → 𝐵 + 𝐶

Page 4: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

How do you integrate POLYMATH into your course?

Start with examples from POLYMATH Text• Thermodynamics, • Fluid Mechanics, • Heat Transfer, • Mass Transfer, • Chemical Reaction Engineering,• Phase Equilibria and Distillation,• Process Dynamics and Control,• Biochemical Engineering

Page 5: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Polymath Text: Fluids Course

21 Problems in fluids

Page 6: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Example Schedule of Topics forChE Fluids (2 credit hour)

Polymath: Nonlinear Equation Solver (NLE)

Polymath: Differential Equation Solver (DEQ) & COMSOL

Page 7: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Adv. ChE Fluids (2 cr)

Page 8: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Typical Fluids Problems

ChE Course Problem Name Numerical Method Illustrated Equations

Fluids Calculations involving Friction Factors for Flow in Pipes (POLYMATH Text 8.7) and pipeflow homework frictionfactorcalcsoln.pdf Excel Tutorial Solver Add-Ins rev4.pdf

Solution of a system of simultaneous nonlinear algebraic equations (NLE)

∆𝑃

∆𝐿= 2𝑓𝐹

𝜌𝑣2

𝐷

𝑓𝐹 = 𝑓 𝜀 𝐷 , 𝑅𝑒 𝑅𝑒 = 𝜌𝑣𝐷 𝜇

Unsteady-state tank drainage using a siphon tube (similar to POLYMATH text 8.14) C&S8-14soln.pdf

Solution of an first order ordinary differential equation (DEQ)

𝑑ℎ𝑇

𝑑𝑡= 𝑣𝑜𝑢𝑡

𝐴𝑜𝑢𝑡

𝐴𝑡𝑎𝑛𝑘

𝑣𝑜𝑢𝑡 = 𝑓 ℎ𝑇

Advanced Fluids

NonNewtonian fluid flow through a pipe (POLYMATH Text 8.2c) NonNewtonian C&S 8.2 solutions & comsol.pdf NonNewtonian fluid flow through an annulus (POLYMATH Text 8.4) NonNewtonian C&S8.4 polymath&comsol & 3.8-8 solutions 2017.pdf

Solution of 2 simultaneous first order ordinary differential equations with split boundary value conditions and comparison with solution using COMSOL which is an advanced finite element program

𝑑 𝑟𝜏𝑟𝑥

𝑑𝑟= −

𝑑𝑃

𝑑𝑥𝑟

𝜏𝑟𝑥 = −𝐾 𝑑𝜐𝑥𝑑𝑟

𝑑𝜐𝑥𝑑𝑟

(𝑛−1)

Page 9: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

POLYMATH in a classroom

• Students need to understand the models that they use.

• Have students derive the model equations

• Then enter them into POLYMATH

POLYMATH is not a “canned” program in which the equations are hidden such as in COMSOL and ASPEN

The next slides give an example of using POLYMATH with a problem in Fluids

Page 10: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Newtonian Fluid Flow Between Parallel Plates Example

• Figures showing flow

• Graphs with expected behavior

• Control Volume – shell balance

• Derivation

• Simplifications: steady-state etc.

1 c

m

100 cm

50 cm

z

y

x

0 0

y

y

Page 11: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Analytical Solution

• Newtonian Fluid

• Boundary Conditions➢𝑦 = 0 𝑣𝑥 = 𝑚𝑎𝑥 𝜏𝑦𝑥 = 0

➢𝑦 = 𝑤𝑎𝑙𝑙 𝑣𝑥 = 0 𝜏𝑦𝑥 = max

• Integrate Twice: Analytical Solution

➢𝑣𝑥 = −𝑑𝑃

𝑑𝑥

𝛿2

2𝜇1 −

𝑦

𝛿

2

Page 12: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Numerical Solution

• Newtonian Fluid

• Two coupled ODE’s and Split Boundary Condition

• Then manipulate two ODE’s so they can be solved using the POLYMATH Differential Equation Solver (DEQ)

1 c

m

100 cm

50 cm

z

y

x

ቚ𝜏𝑦𝑥𝑦=0

= 0

ቚ𝜏𝑦𝑥𝑦=𝑤𝑎𝑙𝑙

= 𝑏𝑖𝑔

ቚ𝑣𝑦=𝑤𝑎𝑙𝑙

= 0

ቚ𝑣𝑦=0

= 𝑏𝑖𝑔

Page 13: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Required manipulation to solve 2 ODE’s with split Boundary conditions 1

cm

100 cm

50 cm

z

y

x

Integration starts at y=0 and both initial conditions must be known!Solution is to guess 𝑣𝑥 at 𝑦 = 0 until at 𝑦 =wall 𝑣𝑥=0

𝜕𝑣𝑥

𝜕𝑦=

𝜏𝑦𝑥

−𝜇

𝜕𝜏𝑦𝑥

𝜕𝑦= −

𝑑𝑃

𝑑𝑥

𝑦 = 0 𝑣𝑥 = max 𝜏𝑦𝑥 = 0

𝑦 = 𝑤𝑎𝑙𝑙 𝑣𝑥 = 0 𝜏𝑦𝑥 = max

Page 14: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Solution

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0 0.001 0.002 0.003 0.004 0.005 0.006

Flu

id V

elo

city

(m

/s)

Spacing Between plates (m)

vx

vAnal

Trials using interpolation after 3rd guess

v at center v at wall

0.1 -0.025

0.5 0.375

0.1250 3.88E-16

Page 15: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Students are Confused• Question

Why do I have to do trial & error for the initial velocity? Why not just plug-in the maximum velocity from the analytical solution?

• AnswerYour goal is always to compare a numerical solution to a simple analytical problem solution. This shows that the numerical solution method is correct.

• Then give students a more complex problem with one of the plates heated resulting in a temperature profile in the liquid. Now they must do the trial and error procedure.

𝑇 = 5000𝐾

𝑚𝑦 + 293.15𝐾

𝜇 =196.99kg

𝑚 𝑠ex p −

0.033

𝐾T

Temperature Profile in liquid:

Page 16: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Heated Plates

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

0.2

0 0.001 0.002 0.003 0.004 0.005 0.006

Flu

id V

elo

city

(m

/s)

Spacing Between plates (m)

Solution

OldAnalytical with T

Trials using interpolation after 3rd guessv at center v at wall0.125 -0.053060.12 -0.058060.180 0.0019390.17806 3.95E-05

Page 17: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

What about models that are formulated as integrals?

• Previous state of the art numerical methods where based on evaluating integrals

– Trapezoidal rule

– Simpson’s Rule

• Many textbooks present models only as integrals

Page 18: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Packed Towers: Gas AbsorptionTraditional Approach using integrals

Page 19: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Derive model using Plug Flow Assumption: Create Differential Equations

𝑑 𝑉𝑦𝐴𝐺

𝑑𝑧= −

𝑘𝑦′ 𝑎𝑆

1 − 𝑦𝐴 𝑖𝑀𝑦𝐴𝐺 − 𝑦𝐴𝑖

𝑑 𝐿𝑥𝐴𝐺

𝑑𝑧= −

𝑘𝑥′ 𝑎𝑆

1 − 𝑥𝐴 𝑖𝑀𝑥𝐴𝑖 − 𝑥𝐴𝐿

Page 20: Application of Numerical Problem Solving in Chemical ...users.rowan.edu/~hesketh/POLYMATH/IntegrationInChECoursesrev2.pdf · Application of Numerical Problem Solving in Chemical Engineering

Polymath Absorber Model