Using the ODE Solver for an Example Excel Problem


This example involves a simple set of simultaneous ordinary differential equations and explicit variables that is given by:

 

d(CA)/d(t) = -k1 * CA

CA(0) = 10

d(CB)/d(t) = k1 * CA - k2 * CB

CB(0) = 0

d(CC)/d(t) = k2 * CB

CC(0) = 0

k1 = 2

k2 = 4

xA = (10 - CA) / 10

t0 = 0

tf = 3

 

 

An Excel workbook with this equation set entered into a worksheet is shown below.  Selection of the Polymath ODE_Solver Add-In results in the Polymath ODE input window where the problem solution specification has been completed.

 

 

A mouse click on the 'Solve' button initiates the solution process, and the various values in the cells are updated during the numerical integration process. The final values are shown below.  Variable step size adjustments is used during the integration process.

 

 

The Polymath ODE_Solver Report is automatically generated on a new worksheet titled 'DEQ Solution (1)' which is shown below where the variable names have been copied from the original problem worksheet.

 

 

The Intermediate data points can be graphed within Excel as shown below.

 

 

Subsequent execution of the Polymath ODE_Solver will produce additional worksheets with the corresponding problem solution numbers. 

 

ODE_Solver Window:   The 'Reload' button will restore the settings for a previous integration  with the exception of the 'Intermediate Cells to Store'. 

 

The 'Adv.' button will allow selection of a desired numerical integration algorithm and permits adjustment of the methods parameters as shown below. This is seldom if ever needed as the various algorithms all have default parameters that work extremely well, and very accurate results are attained.