Professional Documents
Culture Documents
Polymath Tutorial
Polymath Tutorial
CBE 40445
Monday, 29th August 2011
Polymath Capabilities
Linear Equations Solver
Nonlinear Equations Solver
Differential Equations Solver
Regression
Linear & Polynomial
Data Table
Multiple Linear or Multiple Nonlinear Regression
Additional Capabilities
Export to Excel
Calculator and unit conversion tools
Polymath Export to Matlab (see help Menu for more
information)
Todays Class
Provide information on Polymath
How to open and use the software
Learn how to input and solve nonlinear and
differential equations
Provide step-by-step instructions so you can practice
and compare results
Address the question: Why learn another
software program?
Starting Polymath
1. Open Polymath Fogler from the start menu.
Navigating the Menu
1. New program
2. Open file
3. Open recent file
4. Save file
5. Cut
6. Copy
7. Paste
8. Delete
9. Find
10. Find and replace
11. Solve system of linear equations
12. Solve system of nonlinear equations
13. Solve system of ODEs
14. Regress and analyze data
15. Calculator
16. Unit converter
17. Scientific constants
18. Setup preferences
19. Help
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
For more information: Help Menu
Help Menu
Example 1: Nonlinear Equation Solver
Consider the following set of equations:
kCA1
2
= v(CA0-CA1)/V
kCA2
2
= v(CA1-CA2)/V
where k = 0.075, v = 30,
CA0 = 1.6, and CA2 = 0.2 CA0.
Therefore, we have two remaining variables: variables
CA1 and V.
We will use initial estimates: CA1=1 and V=300.
How do we do this in Polymath?
Nonlinear Equation Solver
Rearrange:
0 = kCA1
2
v(CA0 - CA1)/V
0 = kCA2
2
v(CA1-CA2)/V
In Polymath, the appropriate forms for these equations
are:
f(CA1) = kCA1
2
v(CA0 - CA1)/V = 0
f(V) = kCA2
2
v(CA1-CA2)/V = 0
Can f(CA1) and f(V) be switched?
1. Open a new sheet by clicking on the blank sheet in the upper
corner.
2. Open Nonlinear Equations
3. In the upper left corner, click the f(x)+ button. This will allow
you to enter one of the two equations.
4. A new window will open.
5. Type in the first equation as shown before.
3. In the upper left corner, click the f(x)+ button. This will allow
you to enter one of the two equations.
4. A new window will open.
5. Type in the first equation as shown before.
6. Press Done.
7. You should see the new equation in the worksheet, as well as
the comments.
8. Enter the second equation by repeating the same steps.
9. You will see the two equations and two initial value guesses in the
worksheet.
10. The red X displays the undefined variables.
11. Enter the undefined variables by either 1) clicking on the x(=)+
button in the menu or 2) entering directly into the worksheet.
9. You will see the two equations and two initial value guesses in the
worksheet.
10. The red X displays the undefined variables.
11. Enter the undefined variables by either 1) clicking on the x(=)+
button in the menu or 2) entering directly into the worksheet.
12. Now you should see a blue check mark indicating this system of
equations can be solved.
13. To solve, click the purple arrow.
Results:
CA1 initial guess: 1
V initial guess: 300
CA1 = 0.602
V= 1102
Example 2: Solving a System of
Ordinary Differential Equations (ODEs)
This system may contain two types of equations: 1) first order
ordinary differential equations and 2) explicit algebraic
equations.
The differential equations must be entered in the following form:
d(x)/d(t)= .
Here t is the independent variable and x is a dependent variable.
Auxiliary algebraic equations must be entered in the form:
x = .
For differential equations, an initial value is needed for all
variables. A final value is needed for the independent variable.
1. Open a new program (blank sheet)
2. Select Differential Equations
3. Select the d(x)+ button to add a new differential equation.
What should we solve?
Series Reaction: A B C
Using Polymath, we can monitor the conversion
of A, the formation (and disappearance) of B,
and the formation of C.
Species Balances:
Lets solve this series of differential equations.
k1 k2
A k
t d
A d
* 1
) (
) (
B k A k
t d
B d
* 2 * 1
) (
) (
B k
t d
C d
* 2
) (
) (