Selected Differential System Examples from Lectures.

Slides:



Advertisements
Similar presentations
Continuous Stirred Tank Reactor
Advertisements

Fixed point iterations and solution of non-linear functions
ORDINARY DIFFERENTIAL EQUATIONS (ODE)
Modelling & Simulation of Chemical Engineering Systems
Chapter 3 Dynamic Modeling.
By: Mdm. Noor Amirah Abdul Halim BIOREACTION AND BIOREACTOR.
CHE 185 – PROCESS CONTROL AND DYNAMICS CONTROL OBJECTIVES.
Modeling of Coupled Non linear Reactor Separator Systems Prof S.Pushpavanam Chemical Engineering Department Indian Institute of Technology Madras Chennai.
Development of Dynamic Models Illustrative Example: A Blending Process
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Development of Dynamic Models Illustrative Example: A Blending Process
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Nonlinear Algebraic Systems 1.Iterative solution methods 2.Fixed-point iteration 3.Newton-Raphson method 4.Secant method 5.Matlab tutorial 6.Matlab exercise.
Ordinary Differential Equations (ODEs)
Mathematical Modeling of Chemical Processes
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
Introduction to API Process Simulation
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
THEORETICAL MODELS OF CHEMICAL PROCESSES
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 22.
Cells Growth in Continuous Culture Continuous culture: fresh nutrient medium is continually supplied to a well-stirred culture and products and cells are.
CHAPTER II PROCESS DYNAMICS AND MATHEMATICAL MODELING
SURVIVAL MODE Quiz 3 –
BsysE595 Lecture Basic modeling approaches for engineering systems – Summary and Review Shulin Chen January 10, 2013.
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 23.
© 2015 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 31.
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 19.
Selected Differential System Examples from Lectures
Chapter 2 Mathematical Modeling of Chemical Processes Mathematical Model (Eykhoff, 1974) “a representation of the essential aspects of an existing system.
L2b-1 Slides courtesy of Prof M L Kraft, Chemical & Biomolecular Engr Dept, University of Illinois at Urbana-Champaign. L2b: Reactor Molar Balance Example.
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 26.
© 2015 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 31.
Lecture 1: Kinetics of Substrate Utilization and Product Formation
Part II Process Dynamics.  Process model types 1.Mathematical model 2.Fundamental and empirical model 3.Steady-state and dynamic model 4.Lumped (ODE)
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 23.
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 29.
Solution of a Partial Differential Equations using the Method of Lines
Quadrature rules 1Michael Sokolov / Numerical Methods for Chemical Engineers / Numerical Quadrature Michael Sokolov ETH Zurich, Institut für Chemie- und.
بسم الله الرحمن الرحيم Advanced Control Lecture one Mohammad Ali Fanaei Dept. of Chemical Engineering Ferdowsi University of Mashhad Reference: Smith &
DYNAMIC BEHAVIOR OF PROCESSES :
Chemical Reaction Engineering (CRE) is the field that studies the rates and mechanisms of chemical reactions and the design of the reactors in which they.
Chapter 2 Modeling Approaches  Physical/chemical (fundamental, global) Model structure by theoretical analysis  Material/energy balances  Heat, mass,
07 Oct 2011Prof. R. Shanthini1 Cellular kinetics and associated reactor design: Reactor Design for Cell Growth CP504 – Lecture 7.
Lecture 6 Chemical Reaction Engineering (CRE) is the field that studies the rates and mechanisms of chemical reactions and the design of the reactors.
Batch Growth Kinetics Heat generation by microbial growth
Conversion and Reactor Sizing Lec 4 week 4. Definition of Conversion for the following reaction The reaction can be arranged as follows: how far the above.
1 CHEM-E7130 Process Modeling Exercise. 2 Exercises 1&2, 3&4 and 5&6 are related. Start with one of the packages and then continue to the others. You.
PROCESS MODELLING AND MODEL ANALYSIS © CAPE Centre, The University of Queensland Hungarian Academy of Sciences Modelling Lumped Parameter Systems C5A.
Selected Algebraic System Examples from Lectures.
CHAPTER VI BLOCK DIAGRAMS AND LINEARIZATION
ERT 210/4 Process Control & Dynamics DYNAMIC BEHAVIOR OF PROCESSES :
TRANSFER FUNCTION Prepared by Mrs. AZDUWIN KHASRI.
© 2015 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 37.
Chapter 2 Development of Dynamic Models 1. Chapter 2 The Rationale for Dynamic Process Models The dynamic model of a process can be used to 1.Improve.
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 24.
Lecture 2: Mathematical Modeling Copyright © Thomas Marlin 2013 The copyright holder provides a royalty-free license for use of this material at non-profit.
Review/Theory on Kinetics and Reactors
CHEM-E7130 Process Modeling Lecture 3
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
ChE 402: Chemical Reaction Engineering
Transfer Functions Chapter 4
3.2 Series of Continuous , constant-holdup Stirred-tank Reactors
CHAPTER VI BLOCK DIAGRAMS AND LINEARIZATION
A First Course on Kinetics and Reaction Engineering
A First Course on Kinetics and Reaction Engineering
Steady-state Nonisothermal reactor Design Part I
State Feedback Controller Design
Modeling Approaches Chapter 2 Physical/chemical (fundamental, global)
13. Reactor Engineering: Reactor Design
Presentation transcript:

Selected Differential System Examples from Lectures

Liquid Storage Tank l Standing assumptions »Constant liquid density  »Constant cross-sectional area A l Other possible assumptions »Steady-state operation »Outlet flow rate w 0 known function of liquid level h V = Ah wiwi wowo

Mass Balance l Mass balance on tank l Steady-state operation: l Valve characteristics l Linear ODE model l Nonlinear ODE model

Stirred Tank Chemical Reactor l Assumptions »Pure reactant A in feed stream »Perfect mixing »Constant liquid volume »Constant physical properties ( , k) »Isothermal operation l Overall mass balance l Component balance

Plug-Flow Chemical Reactor l Assumptions »Pure reactant A in feed stream »Perfect plug flow »Steady-state operation »Isothermal operation »Constant physical properties ( , k) z q i, C Ai q o, C Ao CA(z)CA(z) zz

Plug-Flow Chemical Reactor cont. l Overall mass balance z q i, C Ai q o, C Ao CA(z)CA(z) zz l Component balance

Continuous Biochemical Reactor Fresh Media Feed (substrates) Exit Gas Flow Agitator Exit Liquid Flow (cells & products)

Cell Growth Modeling l Specific growth rate l Yield coefficients »Biomass/substrate: Y X/S = -  X/  S »Product/substrate: Y P/S = -  P/  S »Product/biomass: Y P/X =  P/  X »Assumed to be constant l Substrate limited growth »S = concentration of rate limiting substrate »K s = saturation constant »  m = maximum specific growth rate (achieved when S >> K s )

Continuous Bioreactor Model Assumptions l Sterile feed l Constant volume l Perfect mixing l Constant temperature and pH l Single rate limiting nutrient l Constant yields l Negligible cell death l Product formation rates »Empirically related to specific growth rate »Growth associated products: q = Y P/X  »Nongrowth associated products: q =  »Mixed growth associated products: q = Y P/X 

Mass Balance Equations l Cell mass »V R = reactor volume »F = volumetric flow rate »D = F/V R = dilution rate l Product l Substrate »S 0 = feed concentration of rate limiting substrate

Exothermic CSTR l Scalar representation l Vector representation

Isothermal Batch Reactor l CSTR model: A  B  C l Eigenvalue analysis: k 1 = 1, k 2 = 2 l Linear ODE solution:

Isothermal Batch Reactor cont. l Linear ODE solution: l Apply initial conditions: l Formulate matrix problem: l Solution:

Isothermal CSTR l Nonlinear ODE model l Find steady-state point (q = 2, V = 2, C af = 2, k = 0.5)

Isothermal CSTR cont. l Linearize about steady-state point: l This linear ODE is an approximation to the original nonlinear ODE

Continuous Bioreactor l Cell mass balance l Product mass balance l Substrate mass balance

Steady-State Solutions l Simplified model equations l Steady-state equations l Two steady-state points

Model Linearization l Biomass concentration equation l Substrate concentration equation l Linear model structure:

Non-Trivial Steady State l Parameter values »K S = 1.2 g/L,  m = 0.48 h -1, Y X/S = 0.4 g/g »D = 0.15 h -1, S 0 = 20 g/L l Steady-state concentrations l Linear model coefficients (units h -1 )

Stability Analysis l Matrix representation l Eigenvalues (units h -1 ) l Conclusion »Non-trivial steady state is asymptotically stable »Result holds locally near the steady state

Washout Steady State l Steady state: l Linear model coefficients (units h -1 ) l Eigenvalues (units h) l Conclusion »Washout steady state is unstable »Suggests that non-trivial steady state is globally stable

Gaussian Quadrature Example l Analytical solution l Variable transformation l Approximate solution l Approximation error = 4x10 -3 %

Plug-Flow Reactor Example z q i, C Ai q o, C Ao CA(z)CA(z) zz 0 L

Plug-Flow Reactor Example cont. l Analytical solution l Numerical solution l Convergence formula l Convergence of numerical solution

Matlab Example l Isothermal CSTR model l Model parameters: q = 2, V = 2, C af = 2, k = 0.5 l Initial condition: C A (0) = 2 l Backward Euler formula l Algorithm parameters: h = 0.01, N = 200

Matlab Implementation: iso_cstr_euler.m h = 0.01; N = 200; Cao = 2; q = 2; V = 2; Caf = 2; k = 0.5; t(1) = 0; Ca(1) = Cao; for i=1:N t(i+1) = t(i)+h; f = q/V*(Caf-Ca(i))- 2*k*Ca(i)^2; Ca(i+1)= Ca(i)+h*f; end plot(t,Ca) ylabel('Ca (g/L)') xlabel('Time (min)') axis([0,2,0.75,2.25])

Euler Solution >> iso_cstr_euler

Solution with Matlab Function function f = iso_cstr(x) Cao = 2; q = 2; V = 2; Caf = 2; k = 0.5; Ca = x(1); f(1) = q/V*(Caf-Ca)-2*k*Ca^2; >> xss = xss = >> df iso_cstr(x); >> [t,x] = ode23(df,[0,2],2); >> plot(t,x) >> ylabel('Ca (g/L)') >> xlabel('Time (min)') >> axis([0,2,0.75,2.25])

Matlab Function Solution

CSTR Example l Van de Vusse reaction l CSTR model l Forward Euler

Stiff System Example l CSTR model: A  B  C l Homogeneous system: l Eigenvalue analysis: q/V = 1, k 1 = 1, k 2 = 200

Explicit Solution l Forward Euler l First iterative equation l Second iterative equation

Implicit Solution l Backward Euler l First iterative equation l Second iterative equation

Matlab Solution function f = stiff_cstr(x) Cai = 2; qV = 1; k1 = 1; k2 = 200; Ca = x(1); Cb = x(2); f(1) = qV*(Cai-Ca)-k1*Ca; f(2) = -qV*Cb+k1*Ca-k2*Cb; f = f'; >> xo = 1]) xo = >> df stiff_cstr(x); >> [t,x] = ode23(df,[0,2],[2 0]); >> [ts,xs] = ode23s(df,[0,2],[2 0]); >> size(t) ans = >> size(ts) ans = 30 1

Matlab Solution cont. >> subplot(2,1,1) >> plot(t,x(:,1)) >> hold Current plot held >> plot(ts,xs(:,1),'r') >> ylabel('Ca (g/L)') >> xlabel('Time (min)') >> legend('ode23','ode23s') >> subplot(2,1,2) >> plot(t,x(:,2)) >> hold Current plot held >> plot(ts,xs(:,2),'r') >> ylabel('Cb (g/L)') >> xlabel('Time (min)') >> legend('ode23','ode23s')

Binary Flash Unit l Schematic diagram l Vapor-liquid equilibrium Feed F, x F Liquid V, y L, x Vapor Q Heat H l Assumptions » Saturated liquid feed » Perfect mixing » Negligible heat losses » Negligible vapor holdup » Negligible energy accumulation » Constant heat of vaporization » Constant relative volatility

Model Formulation l Mass balance l Component balance

Model Formulation cont. l Steady-state energy balance l Index 0 DAE model

Binary Flash Unit Revisited l DAE model Parameter values: H = 5, F = 10, x F = 0.5, V = 2,  = 10 SolverProblemsMethod ode15sStiff DAEs up to index 1Numerical differentiation ode23tModerately stiff DAEs up to index 1 Trapezoidal MATLAB DAE Solution Codes

binary_flash.m function f = binary_flash(x) H = 5; F = 10; xf = 0.5; V = 2; alpha = 10; xv = x(1); yv = x(2); f(1) = F/H*(xf-xv)-V/H*(yv-xv); f(2) = yv-alpha*xv/(1+(alpha-1)*xv); f = f';

Matlab Commands Results for V = 2 >> f binary_flash(x); >> xss = fsolve(f,[1 1],[]) xss = >> df binary_flash(x); >> M = [1 0; 0 0]; >> options=odeset('Mass',M); >> [t1,y1]=ode15s(df,[0,10],xss,options); Change V = 1 >> [t2,y2]=ode15s(df,[0,10],xss,options);

Results for V = 2 and V = 1