4 |
IMPORT "johnpye/extpy/extpy"; |
IMPORT "johnpye/extpy/extpy"; |
5 |
IMPORT "johnpye/solve"; |
IMPORT "johnpye/solve"; |
6 |
|
|
7 |
(* ASCEND model based on the 'idadenx.c' example problem that accomanpanies IDA *) |
(* |
8 |
|
ASCEND model based on the 'idadenx.c' example problem that accompanies IDA. |
9 |
|
The root-finding part isn't yet implemented though. |
10 |
|
---------------------------------------------------------------------------- |
11 |
|
This simple example problem for IDA, due to Robertson, |
12 |
|
is from chemical kinetics, and consists of the following three |
13 |
|
equations: |
14 |
|
|
15 |
|
dy1/dt = -.04*y1 + 1.e4*y2*y3 |
16 |
|
dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2 |
17 |
|
0 = y1 + y2 + y3 - 1 |
18 |
|
|
19 |
|
on the interval from t = 0.0 to t = 4.e10, with initial |
20 |
|
conditions: y1 = 1, y2 = y3 = 0. |
21 |
|
|
22 |
|
This model is tested (using the same parameters as used by idadenx.c) by the |
23 |
|
script pygtk/test.py. |
24 |
|
*) |
25 |
MODEL idadenx; |
MODEL idadenx; |
26 |
y1, y2, y3 IS_A factor; |
y1, y2, y3 IS_A factor; |
27 |
dy1_dt IS_A factor; |
dy1_dt IS_A factor; |