Program to test the ode module.
The Lorenz chaotic system is solved:
The system is integrated for with , and .
For initial conditions , the solution is:

| Type | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|
| integer, | parameter | :: | N | = | 1000 | |
| real | :: | Tf | ||||
| real | :: | dT | ||||
| real | :: | t(0:N) | ||||
| real | :: | U(0:N,3) | ||||
| real | :: | U0(3) | ||||
| integer | :: | i | ||||
| integer | :: | file_unit |
function for defining derivative in the Lorenz system written as: where: and
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | U(:) | |||
| real, | intent(in) | :: | t |