rate equation analysis and solution techniquesjceason/uploads/main/rate...bmed 213 –...

12
BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate equation for a chemical reaction is an equation that links the reaction rate with concentrations or pressures of reactants and constant parameters (normally rate coefficients and partial reaction orders). (Wikipedia, http://en.wikipedia.org/wiki/Rate_equation , 4/4/2013) This definition is a little confusing. For now, let's think of a rate equation as a differential equation showing how some quantity changes over time. The time derivative of the quantity of interest is equal to the rate at which that quantity changes. We will look at how to calculate solutions to rate equations and how to analyze their behavior over time. Forward Euler Method Let's consider a simple rate equation describing the rate of change of some measurable quantity h: dh dt =ah n The variable h is obviously a function of time (since we can take a derivative with respect to time dh/dt). So, our notation above implies that there is some function h(t) which desribes how the variable h changes over time. We can calculate the evolving solution to this rate equation by using Euler's approximation of the first derivative: d dt h t = h t t –h t t h t t –h t t =a h t n h t t =h t ta h t n This numerical approximation is stable and accurate as long as t is small relative to the time scale of the changes in h(t). An initial value of h, h(t=0), is required to begin the solution technique. Let's say this value of h at t=0 is h 0 . Using this value, each successive value of h can be calculated by taking a small time step, calculating the rate of change of h, and then incrementing the initial value of h by the product of the time step and the rate of change. h 0 =h 0 h t =h 0 tah 0 n h 2 t =h t ta h t n h 3 t =h 2 t ta h 2 t n etc.

Upload: others

Post on 09-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

Rate equation analysis and solution techniques

The rate law or rate equation for a chemical reaction is an equation that links the reaction rate with concentrations or pressures of reactants and constant parameters (normally rate coefficients and partial reaction orders).

(Wikipedia, http://en.wikipedia.org/wiki/Rate_equation, 4/4/2013)

This definition is a little confusing. For now, let's think of a rate equation as a differential equation showing how some quantity changes over time. The time derivative of the quantity of interest is equal to the rate at which that quantity changes. We will look at how to calculate solutions to rate equations and how to analyze their behavior over time.

Forward Euler Method

Let's consider a simple rate equation describing the rate of change of some measurable quantity h:

dhdt

=a hn

The variable h is obviously a function of time (since we can take a derivative with respect to time dh/dt). So, our notation above implies that there is some function h(t) which desribes how the variable h changes over time. We can calculate the evolving solution to this rate equation by using Euler's approximation of the first derivative:

ddt

h t =h t t –h t t

h t t –h t t

=a h t n

h t t =h t t a h t n

This numerical approximation is stable and accurate as long as t is small relative to the time scale of the changes in h(t).

An initial value of h, h(t=0), is required to begin the solution technique. Let's say this value of h at t=0is h0. Using this value, each successive value of h can be calculated by taking a small time step, calculating the rate of change of h, and then incrementing the initial value of h by the product of the time step and the rate of change.

h0=h0

h t =h0 t ah0n

h2 t=h t t ah tn

h3 t=h2 t t a h2 t n

etc.

Page 2: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

Sample problem

Use the Euler integration technique to calculate the velocity (meters/sec) at t = 3 seconds for a rocket launched vertically upwards. You may assume that v = 0 at t = 0 and you should use ∆t = 1 second. The velocity is governed by the following differential equation:

dvdt

=20 – 0.01 v2

Solution:

Time (s) v(t)dv (t)

dt Notes0 0 = 20 – 0.01*(0) = 20 Given v(0) = 0, calculate dv(0)/dt1 = 0+(1)*(20) = 20 = 20 – 0.01*(20^2) = 16 v(1) = v(0)+dt*dv(0)/dt2 = 20+(1)*(16) = 36 = 20-0.01*(36^2) = 7.043 = 36+(1)*(7.04) = 43.04 = 20–0.01*(43.04^2) = 1.48

Answer: The velocity at t = 3 secs is 43.04 meters/sec

Now let's see how to do this same problem in a spreadsheet program (like MS Office Excel or Open Office Calc):

1) Create a spreadsheet template that looks like the following:

2) Now, we'll add in the time column from 1 to 5 seconds using a formula. The time should increase in each box according to the time step, or ∆t, defined in the problem statement. For this problem, ∆t = 1 second. So, each time value is equal to the one above it + 1 second (or +∆t if the time step is not equal to 1 sec). Cell A2 has a value of 0. Cell A3 should be equal to the value in A2 + 1. To enter this into cell A3, click on cell A3 and then type: '=A2+1' (without the quotes) and then hit the enter key. Instead of typing 'A2' you can also use your mouse to click cell A2 and it will be entered in the formula automatically.

Page 3: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

3) After you hit the enter key, the spreadsheet will do the calculation for you and the value '1' will be in the cell A3 where you typed the formula. While you are at it, save the file to make sure you don't lose your work!

4) Now you want to copy this formula to the cells below. This will copy the formula which adds 1 to the value of the cell above the current cell. To do this, click on cell A3. You will see a box on the lower right corner of the box outline. Click (and hold) on this little box with the mouse and then drag your mouse down to copy the formula to each of the cells below. Release the mouse button to complete the action. After you release the mouse button, you should see the values in boxes A4 through A7 have been updated and calculated to contain time values for 2-5 seconds.

This is the little white boxthat you click and hold.

Page 4: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

5. Now, enter the formula for the derivative dv/dt. Select cell C2 and enter the following formula (without the quotes): '=20-0.001*(B2)^2'This formula uses '*' to indicate multiplication and '^2' to indicate that the quantity in the parenthesis should be squared. The quantity in the parentheses is B2 which holds the value for v at this time (t=0). After hitting the enter key, the value in C2 is calculated and should be equal to 20.

6) There is one formula left to enter, the Euler approximation for v(t+∆t). We'll enter this in cell B3 to update the value of v at time t=1. The formula should be: '=B2+(1)*C2'In this formula, B2 is the value of v(t), the 1 in the parentheses is the value of ∆t, and C2 is the value of dv/dt at time t. After hitting the enter key, the value of cell B3 will be calculated and should be 20.

Page 5: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

7) Now, you will copy the formula in cell B3 to each of the cells below it down to B7 using the click and drag method from step 4.

8) And, copy the formulas for the derivative, dv/dt, from C2 down to C7.

9) After this you are essentially finished. The problem originally asked for a value of v at 3 seconds. Your results show that this is 43.04 just as we calculated in the table above. For longer time spans you will certainly want to use a spreadsheet or some other computer-based solution method. This will allow you to analyze or graph the results over a period of time. As you see below, we can easily add a chart (x-y scatter chart) to the spreadsheet to show the trend over time is more or less exponential and

Page 6: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

approaches an asymptotic value of approximately 45.

Steady state analysis

The asymptotic limit in the example above is also known as the steady state or equilibrium value of the variable v. The equilibrium value, v∞, is one or more values of a function at which it will no longer change over time. By definition, this means that the time derivative is equal to zero when v = v∞. Using the velocity problem from the previous section:

dvdt =20−0.01 v2

At equilibrium, we know the time derivative is equal to zero and v = v∞:

0=20 – 0.01 v∞2

Solving for v∞:

v∞2=2000

or

v∞=±√2000=±44.721

In our simple rocket system, the terminal upward velocity is equal to 44.721 m/s. The equilibrum value of -44.721 (a downward velocity) seems unlikely and in fact it is very unlikely to ever occur. However, it is at least theoretically a possible steady state solution to the rocket system.

You can check the compatibility of our analysis and the Euler method solution to the rocket problem by carrying the calculation out for a few more time steps. If you do so, you should find that v = 44.721

Page 7: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

m/s at t=7 secs.

Stability analysis

Above, we found two steady state or equilibrium solutions to the system of equations. I claimed that one of these steady states is very unlikely to ever occur. How did I know this? Well, there is a way to analyze the stability of an equilibrium solution to a single non-linear rate equation...and it is simple.

1) Calculate a derivative of the derivative with respect to the variable that you are interested in. Sounds confusing. But it's not. Using our example rocket problem:

dvdt =20 – 0.01 v2

The derivative is equal to the function on the right: 20 – 0.01 v 2

We'll take a derivative of this function with respect to v:

ddv (20 – 0.01 v 2)=−0.02 v

2) Now, plug in the value of v∞ into this equation. If the result is negative, the equilibrium value is stable. If the result is positive, the equilibrium value is unstable.

[ ddv (20 – 0.01 v 2)]v=v∞

=−0.02 v∞

For v∞ = 44.721, this quantity is negative and we know that the solution is stable. This means that as the velocity approaches 44.721, it will be drawn asymptotically to this equilibrium value.

For v∞ = -44.721, this quantity is positive and the solution is unstable. This means that as the velocity approaches -44.721, it will be repelled away from ever reaching the equilibrium value. To check this out, try taking a single Euler time step using an initial value of -44:

v(0) = -44 and dv/dt = 20-0.01*(-44)^2 = 0.64v(1) = v(0) + (∆t)*dv/dt = -44+(1)*(0.64) = -43.36

The value of v is moving further from the equilbrium value at this point in time rather than toward it. If you continue this calculation, you'll see that the velocity continues to increase in value, moving away from -44.721 until it nears and approaches the stable equilibrum solution, v∞ = 44.721.

Page 8: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

Page 9: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

Reversible state changesA great many biological systems involve reversible changes of state. For example, a molecule of hemoglobin (Hgb, shown to the right) may be carrying oxygen or it may not. (It may also be carrying CO2 or other gases, but let's keep it simple for now.) We can think of this as two different states of the molecule:

Depending on it's environment, the Hgb may either bind to oxygen or release the oxygen that it carries, thus switching from one of these two states to the other.

O2 +

The likelihood of of a transition from one state to another depends on the energy levels between the unbound oxygen and the bound oxygen state. In a low pH, high CO2 environment (like a working muscle), the affinity between oxygen and Hgb is low (meaning the relative energy of the bound oxygen state is high). In this environment, oxygen is more likely to be released from its bound state than it is to be bound to Hgb:

O2 +

In a higher pH, lower C02 environment (like the lungs), oxygen has a high affinity to Hgb (meaning it is a relatively lower energy state than being unbound). In this environment, oxygen will tend to bind to Hgb:

O2 +

The change in Hgb from the oxygen-carrying state to the no-oxygen state can be though of as a reversible chemical reaction:

O2+Hgb < >

α

βOxy-Hgb

In a generic sense, this change of state is a chemical reaction. Specifically, it is a reversible reaction:

Hgb Oxy-Hgb

Hgb Oxy-Hgb

Hgb Oxy-Hgb

Hgb Oxy-Hgb

Page 10: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

O2+A < >

α

βB

Compound A is being combined with oxygen and converted to compound B at a rate of and B is converted back to A and oxygen at a rate of . The speed and direction of the reaction depends on the concentrations of O2, A, and B and the rate constants and . For present purposes, I'd like to simplify this system even further. Let's assume that there is sufficient (but not too much) oxygen available in the environment and a relatively small amount of Hgb.. With this assumption, we can ignore O2 in the equation. It is not a limiting factor for either the forward or reverse reaction. In this oversimplified situation, we have this reaction left:

A < >

α

βB

We can write an equation describing the changes in the concentration of compound A:d [ A ]dt

= [B ]− [ A ]

If the system is closed, there must be a total number of molecules of A and B that remains constant, [A] + [B] = M

Thus, we write an expression for A that does not depend on B:d [ A ]dt

=M−[A ]− [ A ]

To make this equation more general, we scale the variable A so that it may only range between 0 and 1 by dividing by the total number of molecules in our closed system. This creates a new variablea=[A ]/M .

dadt

=1−a−a

This equation describes a reversible change of state in a closed system with a fixed number of particles. The solution to this differential equation is:

a t=

−a0e− t

A convenient way to think about this solution is that the variable a approaches a steady state value ofa∞ with a time constant of a .

a∞=

a=1

a t=a∞ – a∞ –a 0e−t /a

This solution is an exponential decay, not towards zero, but towards the steady state solution a∞ .

Page 11: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

You may find an alternative formulation will help you solve this type of equation:

First order equation: da

a – a∞=

−dt a

with a0=a0

Solution:

a t =a∞a0−a∞e−ta

If you have not taken a differential equations course or you are not familiar with the math used to obtain the solution, that's OK. You don't need it to use and work with systems of reversible reactions. Here are the important points:

• Physiological systems involve many types of reversible reactions or reversible changes of state. Sometimes a compound will undergo a cycle of changes before it returns back to its original

Figure 1: Solutions to da/dt = 2(1-a) - a for two initial conditions, a(0) = 0 (thin line) and x(0) = 1 (thick line). The dashed line is drawn at the steady state value, x = /( + ) = 2/3.

0 1 20

0.2

0.4

0.6

0.8

1

time

a(t)

Page 12: Rate equation analysis and solution techniquesjceason/uploads/Main/rate...BMED 213 – Bioengineering Fundamentals Rate equation analysis and solution techniques The rate law or rate

BMED 213 – Bioengineering Fundamentals

• Simple rate equations often have fairly simple analytical solutions in the form of exponential functions.

• Rate equations are often solved by numerical methods like the Euler method we discussed in a previous section. They are no more difficult to solve, however, they can have more than one variable of interest.