Systems of Linear First Order Ordinary Differential Equations Example Problems

Similar documents
Included in this hand-out are five examples of problems requiring the solution of a system of linear algebraic equations.

Reference. R. K. Herz,

Lecture 24: Spinodal Decomposition: Part 3: kinetics of the

Worked Solutions to Problems

Analytical Study of Stability of Systems of ODEs

Green s Function for Potential Field Extrapolation

x(t) y(t) c c F(t) F(t) EN40: Dynamics and Vibrations Homework 6: Forced Vibrations Due Friday April 5, 2018

Derivation of Non-Einsteinian Relativistic Equations from Momentum Conservation Law

1. Which two values of temperature are equivalent to the nearest degree when measured on the Kelvin and on the

CHAPTER 3 PROBLEMS. δ = where A is the cross-sectional area, and E is the modulus of elasticity.

Modeling of vibration systems

Force and dynamics with a spring, analytic approach

Lecture 23: Spinodal Decomposition: Part 2: regarding free energy. change and interdiffusion coefficient inside the spinodal

International Journal of Thermodynamics, Vol. 18, No. 1, P (2015). Sergey G.

(Newton s 2 nd Law for linear motion)

Kinematics of Elastic Neutron Scattering

ME357 Problem Set The wheel is a thin homogeneous disk that rolls without slip. sin. The wall moves with a specified motion x t. sin..

Dynamics of Structures. Giacomo Boffi. Definitions. Dynamics of Structures. Giacomo Boffi. Introduction. Characteristics of a Dynamical Problem

Chapter 3. Problem Solutions

Doppler Effect (Text 1.3)

The Seesaw Mechanism

Simple Harmonic Motion of Spring

Advanced Computational Fluid Dynamics AA215A Lecture 4

The Gravitation As An Electric Effect

Lecture 4 Normal Modes

and ζ in 1.1)? 1.2 What is the value of the magnification factor M for system A, (with force frequency ω = ωn

The nuclear fusion reaction rate based on relativistic equilibrium velocity distribution

MAC Calculus II Summer All you need to know on partial fractions and more

Optimization of the CBSMAP Queueing Model

Physics 221B: Solution to HW # 6. 1) Born-Oppenheimer for Coupled Harmonic Oscillators

Simple Harmonic Motion

Electromagnetic Waves

Congruences and Modular Arithmetic

PAST YEAR EXAM PAPER SOLUTION SEMESTER II, ACADEMIC YEAR PAP261 Introduction to Lasers (Solution by: Phann Sophearin)

Math 220A - Fall 2002 Homework 8 Solutions

EFFECTIVE MODAL MASS & MODAL PARTICIPATION FACTORS Revision I

TUTORIAL 1 SIMPLE HARMONIC MOTION. Instructor: Kazumi Tolich

Where as discussed previously we interpret solutions to this partial differential equation in the weak sense: b

SHM stuff the story continues

Numerical Studies of Counterflow Turbulence

Oscillations: Review (Chapter 12)

Overview. Review Multidimensional PDEs. Review Diffusion Solutions. Review Separation of Variables. More diffusion solutions February 2, 2009

ENGI 3424 Engineering Mathematics Problem Set 1 Solutions (Sections 1.1 and 1.2)

Velocity Addition in Space/Time David Barwacz 4/23/

THE ESSENCE OF QUANTUM MECHANICS

PY241 Solutions Set 9 (Dated: November 7, 2002)

Intro Wb3303 Kineto-statics and Dynamics

RELATIVISTIC GRAVITY AND THE ORIGIN OF INERTIA AND INERTIAL MASS

Experiment 03: Work and Energy

V. Interacting Particles

PHYS 1443 Section 003 Lecture #21 Wednesday, Nov. 19, 2003 Dr. Mystery Lecturer

HORIZONTAL MOTION WITH RESISTANCE

MODULE 3: MASS TRANSFER COEFFICIENTS

1. Simplify this circuit to find the total power absorbed by all resistors. R1 R3 47

23.1 Tuning controllers, in the large view Quoting from Section 16.7:

ECE-320 Linear Control Systems. Winter 2013, Exam 1. No calculators or computers allowed, you may leave your answers as fractions.

Chapter 1: Basics of Vibrations for Simple Mechanical Systems

Chameleon mechanism. Lecture 2

Further refutation of the de Broglie Einstein theory in the case of general Compton scattering

Physics 2107 Oscillations using Springs Experiment 2

Shear Force and Bending Moment

Dynamical behaviour of a compound elastic pendulum

Announcements Review: Relativistic mechanics Room: G1B30 From last class: total energy Example: Deuterium fusion Example: Deuterium fusion

Subject: Introduction to Component Matching and Off-Design Operation % % ( (1) R T % (

' ' , and z ' components ( u u u'

A new Lagrangian of the simple harmonic oscillator 1 revisited

Chapter 2: Solution of First order ODE

COUPLED OSCILLATORS. Two identical pendulums

22.54 Neutron Interactions and Applications (Spring 2004) Chapter 6 (2/24/04) Energy Transfer Kernel F(E E')

Optimal sliding mode control of the pendubot

The Lagrangian Method vs. other methods (COMPARATIVE EXAMPLE)

Physically Based Modeling CS Notes Spring 1997 Particle Collision and Contact

9 HOOKE S LAW AND SIMPLE HARMONIC MOTION

Frame with 6 DOFs. v m. determining stiffness, k k = F / water tower deflected water tower dynamic response model

Developing Excel Macros for Solving Heat Diffusion Problems

CHAPTER 15: Vibratory Motion

Mass Transfer (Stoffaustausch) Fall 2012

Massachusetts Institute of Technology Quantum Mechanics I (8.04) Spring 2005 Solutions to Problem Set 4

MAIN TOPICS iensional i l Analysis Bukingha Pi Theore eterination of Pi Ters Coents about iensional Analysis Coon iensionless Groups in Fluid Mehanis

Physics (Theory) There are 30 questions in total. Question Nos. 1 to 8 are very short answer type questions and carry one mark each.

A NETWORK SIMPLEX ALGORITHM FOR THE MINIMUM COST-BENEFIT NETWORK FLOW PROBLEM

TWO WAYS TO DISTINGUISH ONE INERTIAL FRAME FROM ANOTHER

Final Exam: know your section, bring your ID!

Definition of Work, The basics

Unit 14 Harmonic Motion. Your Comments

MECHANICS OF MATERIALS

Chapter 15 Equilibrium. Reversible Reactions & Equilibrium. Reversible Reactions & Equilibrium. Reversible Reactions & Equilibrium 2/3/2014

CDS 101/110: Lecture 2.1 System Modeling. Model-Based Analysis of Feedback Systems

Dynamics of Bass Reflex Loudspeaker Systems (3)

Math 151 Introduction to Eigenvectors

Chapter 5, Conceptual Questions

Modern Control Systems (ECEG-4601) Instructor: Andinet Negash. Chapter 1 Lecture 3: State Space, II

Name Solutions to Test 1 September 23, 2016

Distillation. The Continuous Column. Learning Outcomes. Recap - VLE for Meth H 2 O. Gavin Duffy School of Electrical Engineering DIT Kevin Street

A Simplified Analytical Approach for Efficiency Evaluation of the Weaving Machines with Automatic Filling Repair

Analytical Analysis and Numerical Prediction of Seven DOF Human Vibratory Model for the Various Cars Driving Posture Swami Mahesh, Kosbe Pradnya

Determination of the reaction order

27 Oscillations: Introduction, Mass on a Spring

DETERMINATION OF TWO LAYER EARTH STRUCTURE PARAMETERS

The Laws of Acceleration

Transcription:

Systes of Linear First Order Ordinary Differential Equations Eaple Probles David Keffer Departent of Cheial Engineering University of Tennessee Knoville, TN 79 Last Updated: Septeber 4, Eaple. Transient Behavior of a Bath Reator Eaple. Transient Behavior of a Continuous Stirred-Tan Reator 6 Eaple. Transient Vibrational Behavior of Carbon Dioide

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, Eaple. Transient Behavior of a Bath Reator Consider that you have a three-oponent reative iture in a bath reator, all undergoing reversible reations, as pitured below: In this piture, the s are onentrations of the three speies and the s are rate onstants. n eaple of this syste is the ineti equilibriu between para-, eta-, and ortho-ylene. Now suppose we want to now what the onentration is as a funtion of tie. We an write the ass balanes for eah oponent. There are no in and out ters (the reator is a bath reator. There is only the auulation ter and the reation ters. lso, assue eah reation is first order in onentration. d d d + + + + + + (. We an gather lie ters and rearrange the right hand side: d d d ( + ( + + + ( + + + (. and we hange this syste of equations into atri & vetor for:

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, d X (. where ( + X ( + ( + (.4 The atri X is singular. It has a deterinant of zero and a ran of. Therefore, it has one zero value eigenvalue. Nevertheless, the atri has three distint real eigenvalues, λ, λ, λ. Corresponding to eah of these eigenvalues is a real, distint eigenvetor, w,,w,, w,. The eigenvetors of X are nown as the eigenrows of X: w r,,w r,, wr,. The solution is then: ( t ( wr,i o ( w w w,i ep[ λi( t to ] r,i,i n i (.5 In order to obtain nuerial values for this proble, we would have to first obtain the eigenvalues, eigenvetors, and eigenrows. This an be done nuerially, using routines disussed in the setion on nuerial ethods for solving systes of linear algebrai equations. We provide a Matlab ode to solve this proble on the following page.

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, Matlab ode to solve Eaple. % % Solution to the Bath Reator Proble % % David Keffer % Departent of Cheial Engineering % University of Tennessee % Knoville Tennessee % Septeber, % % input.5;.5;.;.5;.;.5; [ (--,, ;, (--, ;,, (--]; yo [./.;./.;./.]; to.; tf.; n a(size(; % eigenvalues and eigenvetors [wol,labda] eig(; wolinv inv(wol; % set up disretized solution grid npoints ; (tf-to/npoints; for i ::npoints+ tp(i (i-* +to; % alulate solution eplabda zeros(n,n; yp zeros(n,npoints; for i ::npoints+ for j :n eplabda(j,j ep(labda(j,j*(tp(i - to ; yp(:,i wol*eplabda*wolinv*yo; %plot for j ::n if (j plot (tp,yp(j,:,'g-', label( 't', ylabel ( 'y' elseif (j plot (tp,yp(j,:,'r-', label( 't', ylabel ( 'y' elseif (j plot (tp,yp(j,:,'b-', label( 't', ylabel ( 'y' hold on hold off

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, Plot of Solution to Eaple : Transient Behavior in a Bath Reator.6.55.5 ole fration.45.4.5..5..5. 4 5 6 7 8 9 tie (s Coents: t all ties, the su of the ole frations is unity. The initial ondition is y o [/ / /]. The steady state equilibriu appears to be about y [.4.86.57]. 4

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber,.9.8 ole fration.7.6.5.4... 4 6 8 4 6 8 tie (s Coents: t all ties, the su of the ole frations is unity. The initial ondition is y o [ ]. The steady state equilibriu appears to be about y [.4.86.57]. This is the sae steady state oposition as was obtained for the other initial ondition, plotted on the previous page. The equilibriu oposition is indepent of the initial oposition, in this ase. This is generally true, eept where ultiple steady states eist. 5

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, Eaple. Cheial Reation Equilibria with addition/deletion of oponents b( We an add onstant flowrates to our syste by adding a onstant ter to the ODEs. d d d ( + ( + + + ( + + + + F + F + F (4. The flowrates an either be feed or effluent, deping upon the sign. To eep the proble siple, let's enfore onservation of volue by stipulating that i F i (4. and we hange this syste of equations into atri & vetor for: d (4. X + F We now the solution to the nonhoogeneous equation is ( t W ep Λ( t [ ] ep[ Λ( t ] W u(t + u(t o o o nh (4.4 The only question is the for of u. u [ Λ( ] W b( d ep (. [ ] Sine, for this proble, b is a onstant, all the funtionality lies in ep Λ( u ( t ep Λ( [ ] dw b t (4.5 6

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, u ( t Λ ep Λ( t [ ] W b (4.6 Plugging ba into the solution we find nh [ ] ( t W ep Λ( t ep Λ [ ( ] Λ to W o + Λ ep Λ( t o ep [ ] W b [ (] Λ t W b (4.7 opliation arises beause one of the eigenvalues is zero. Thus there is no -depeny in the eponential beause there is no eponential. Then we would have a ter of the for u t t (4.8 ( t ep[ ] dw b dw b [] t W b tw b so that we would have u ( t UW b (4.9 ep λ U [ λ( t ] ep [ λ( t ] λ for the ase where we had three eigenvalues, the first two of whih are non-zero. t (4. We provide a Matlab ode to solve this proble on the following page. 7

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, Matlab ode to solve Eaple. % % Solution to the Continuous Stirred Tan Reator Proble % % David Keffer % Departent of Cheial Engineering % University of Tennessee % Knoville Tennessee % Septeber, % tol.e-4; % input.5;.5;.;.5;.;.5; [ (--,, ;, (--, ;,, (--]; n a(size(; yo [./.;./.;./.]; %yo [.;.;.]; % onstant ters in ODE b [-.; -.;.]; to.; tf.; % eigenvalues and eigenvetors [wol,labda] eig(; wolinv inv(wol; % alulate ep (-labda*to atri eplabdano zeros(n,n; for j ::di eplabdano(j,j ep(-labda(j,j*to; % alulate u(to uo zeros(n,n; for j ::n if (abs(labda(j,j > tol uo(j,j -eplabdano(j,j/labda(j,j; else uo(j,j to; % set up disretized solution grid nintervals ; npoints nintervals + ; (tf-to/nintervals; for i ::npoints tp(i (i-* +to; % alulate solution yp zeros(n,npoints; for i ::npoints eplabdan zeros(n,n; eplabda zeros(n,n; for j ::di eplabdan(j,j ep(-labda(j,j*tp(i; 8

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, eplabda(j,j ep(labda(j,j*tp(i; % alulate u(t u zeros(n,n; for j ::n if (abs(labda(j,j > tol u(j,j -eplabdan(j,j/labda(j,j; else u(j,j tp(i; ter eplabdano*wolinv*yo; ter (u-uo*wolinv*b; yp(:,i wol*eplabda*(ter + ter; %plot for j ::n if (j plot (tp,yp(j,:,'g-', label( 't', ylabel ( 'y' elseif (j plot (tp,yp(j,:,'r-', label( 't', ylabel ( 'y' elseif (j plot (tp,yp(j,:,'b-', label( 't', ylabel ( 'y' hold on hold off label('tie (s'; ylabel('ole fration'; leg(' ',' ', ' '; 9

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber,.8.7.6 ole fration.5.4... 4 6 8 4 6 8 tie (s Coents: t all ties, the su of the ole frations is unity. The initial ondition is y o [/ / /]. The steady state equilibriu appears to be about y [..6.65]. The flowrates for eah oponent are b[-...].

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber,.7.6.5 ole fration.4... 4 6 8 4 6 8 tie (s Coents: t all ties, the su of the ole frations is unity. The initial ondition is y o [/ / ]. The steady state equilibriu appears to be about y [..6.65]. The flowrates for eah oponent are b[-...]. This is the sae steady state oposition as was obtained for the other initial ondition, plotted on the previous page. The equilibriu oposition is indepent of the initial oposition, in this ase. This is generally true, eept where ultiple steady states eist.

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, Eaple. Transient Vibrational Behavior of Carbon Dioide Consider that we want to investigate the vibrational properties of arbon dioide, CO. Our odel of the oleule loos lie this: spring ( spring ( O C O,,, We odel the interation between oleules as Hooian springs. For a Hooian spring, the potential energy, U, is U ( (5. and the fore, F, is F ( (5. where is the spring onstant (units of g/s, is the equilibriu displaeent, and is the atual displaeent. When both s of the spring are obile we an write, for the spring that onnets ass and : U (5. (( and we an write, for the spring that onnets ass and : U (5.4 ((

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, The fores are then: (( U F (( (( U F + (5.5 (( U F With only a slight sleight of hand, we redefine our variables to be: + (5.6 This eliinates the equilibriu bond distanes fro the alulation. So, with this definition, (5.7 at equilibriu. This does not affet our equations of otion beause the derivatives of our variables before and after the transforation of the variables are the sae. Our fores beoe: ( U F ( ( U F + (5.8 ( U F We an write Newton s equations of otion for the three oleules: ( ( ( ( O C O F a F a F a + (5.9 We an generalized this to a non-syetri linear tri-atoi oleule by writing:

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, a a a F F F ( ( + ( ( (5. Knowing that the aeleration is the seond derivative of the position, we an rewrite the above equations in atri for as (first divide both side of all of the equations by the asses d (5. where (5. Solving this syste of seond order linear differential equations yields the integrated equations of otion for arbon dioide. We an onvert the three seond order ODEs into si first order ODEs as shown below. Tae ato nuber one. whih we write as ( a F (5. d ( (5.4 Now we an rewrite that seond order ODE as two first order ODEs. d 4 (5.5 4

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, 5 ( 4 d (5.6 We an write analogous equation for the other two atos, to oe with ODEs for variables 5 and 6. Of ourse, variables,, and are still the positions of the atos. Variables 4, 5, and 6 are now the veloities of the atos. ll of these equations are hoogeneous. Our atri beoes a 66 atri: (5.7 where the solution vetor,, is now defined as: 6 5 4 & & & (5.8 Now, learly, we an solve this proble eatly as we solve any syste of hoogeneous linear first order ODEs. The solution will be given as ( ( [ ] o o h W t t ep W t Λ (.4 We provide a Matlab ode to solve this proble on the following page. The only quantitative differene between this ode and the ode for eaple, is that this proble has iaginary eigenvalues, whih eventually yield real solutions via the Euler Identities. Near the of the ode, we eliinate any residual round-off errors of the iaginary oponent of the solution.

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, Matlab ode to solve Eaple. % % Solution to vibrational odes of CO Proble % % David Keffer % Departent of Cheial Engineering % University of Tennessee % Knoville Tennessee % Septeber, % lear all; lose all; % tol.e-4; % input ass( 6; ass( ; ass( 6; 48; 48; [ -/ass( /ass( /ass( (--/ass( /ass( /ass( -/ass( ]; n a(size(; yo [.;.; -.5;.;.;.]; % onstant ters in ODE b zeros(n,; to.; tf.; % eigenvalues and eigenvetors [wol,labda] eig(; wolinv inv(wol; % alulate ep (-labda*to atri eplabdano zeros(n,n; for j ::n eplabdano(j,j ep(-labda(j,j*to; 6

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, % alulate u(to uo zeros(n,n; for j ::n if (abs(labda(j,j > tol uo(j,j -eplabdano(j,j/labda(j,j; else uo(j,j to; % set up disretized solution grid nintervals ; npoints nintervals + ; (tf-to/nintervals; for i ::npoints tp(i (i-* +to; % alulate solution yp zeros(n,npoints; for i ::npoints eplabdan zeros(n,n; eplabda zeros(n,n; for j ::n eplabdan(j,j ep(-labda(j,j*tp(i; eplabda(j,j ep(labda(j,j*tp(i; % alulate u(t u zeros(n,n; for j ::n if (abs(labda(j,j > tol u(j,j -eplabdan(j,j/labda(j,j; else u(j,j tp(i; ter eplabdano*wolinv*yo; ter (u-uo*wolinv*b; yp(:,i wol*eplabda*(ter + ter; % reove residual iaginary oponents due to round-off for i ::npoints for j ::n 7

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, if (iag(yp(j,i < tol yp(j,i real( yp(j,i ; %plot for j ::n if (j plot (tp,yp(j,:,'g-' elseif (j plot (tp,yp(j,:,'r-' elseif (j plot (tp,yp(j,:,'b-' elseif (j4 plot (tp,yp(j,:,'g:' elseif (j5 plot (tp,yp(j,:,'r:' elseif (j6 plot (tp,yp(j,:,'b:' hold on hold off label('tie '; ylabel('position & veloity '; leg('pos O','pos C', 'pos O','vel O','vel C', 'vel O'; 8

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber,.5.5 position & veloity -.5 - -.5 pos O pos C pos O vel O vel C vel O - 4 5 6 7 8 9 tie Coents: The initial ondition is y o [.5 ]. Clearly periodi behavior is observed. lso observe visually that the veloities do indeed orrespond to the tie derivatives of the positions. There is no net enter of ass otion, sine in the initial ondition there was no enter of ass otion, and onservation of oentu is a onsequene of Newton s equations of otion. 9

D. Keffer, ChE 55, Dept. of Cheial Engineering, University of Tennessee, Septeber, 5 4 pos O pos C pos O vel O vel C vel O position & veloity - - 4 5 6 7 8 9 tie Coents: The initial ondition is y o [ ]. Clearly periodi behavior is observed. lso observe visually that the veloities do indeed orrespond to the tie derivatives of the positions. There is a net enter of ass otion, sine in the initial ondition there was a enter of ass otion, and onservation of oentu is a onsequene of Newton s equations of otion.