## Hello I need your help can you gi

## Hello I need your help can you gi

(OP)

Hello

I need your help

can you give me an example in which we solve a stiff problems

with a sparce jacobian

best wiches

I need your help

can you give me an example in which we solve a stiff problems

with a sparce jacobian

best wiches

## RE: Hello I need your help can you gi

In my opinion instead of sparse Jacobian you probably mean banded Jacobian.

My question:Wouldn't it be better for you instead of the old good Fortran, rather to try a more modern solving system like Matlab, Octave, Scilab or Julia - at least at the beginning ?

- Matlab is payed and not cheap, but look how nice you can solve stiff ODEs in it and visualize the solution:

https://www.mathworks.com/help/matlab/math/solve-s...

- Octave is similar to Matlab, but free, maybe it doesn't have so much methods for ODEs like Matlab, but it has the LSODE method which is similar to the DVODE using backward differentiation formula (BDF). You can visualize your solution like in Matlab:

https://docs.octave.org/v4.0.0/Ordinary-Differenti...

- Scilab is similar to Matlab too and free like Octave. It seems that it has the same solver like Octave:

https://help.scilab.org/docs/6.0.0/en_US/ode.html

- Julia is a new free language and system for solving mathematical problems. It has solvers for stiff ODEs too, and you can immediately visualize your results like in other systems mentioned above:

https://nextjournal.com/sosiris-de/ode-diffeq

https://diffeq.sciml.ai/stable/tutorials/advanced_...

I would choose the following route: First, learn how to solve the stiff equations in one or two of the systems described above. Verify if the obtained results meet your expectations and then if you are sure how to do it, maybe you can rewrite the solution in Fortran.

But if you are based on the Fortran-only usage, I would suggest you to look at the following book:

Hairer and Wanner: Solving Ordinary Differential Equations. Stiff and Differential-Algebraic Problems.

It looks like this: https://www.amazon.com/Solving-Ordinary-Differenti...

You may be able to pick the book from a local library.

And here are some fortran codes for the book available:

http://www.unige.ch/~hairer/software.html

I know that book, i have read some parts of it, because during my study i implemented some of the implicit Runge-Kutta stiff solvers described in it in the Pascal programming language. And I used the fortran codes from the book to verify whether my pascal implementation delivers right results...but that was almost 30 years ago

## RE: Hello I need your help can you gi

I tried to solve your ODE system in Octave with

LSODEmethod, using the right hand side function and initial conditions you provided in the fortran program here:https://files.engineering.com/getfile.aspx?folder=...

Default options of

LSODEwere used:## CODE

Here are the 11 resulting functions y(1), .., y(11) visualised:

Here is the octave script file I used, you can try it:

hasnaoui.m## CODE

## RE: Hello I need your help can you gi

Thank you very much for your help

The same results attached to your response are obtained using the dvode code.

My objective is to integrate the stiff equations for large time (infinity).

I don't know if the Lsode allows to resolve the stiff equations for large time

Again, i would thank you for your attention

best regards

## RE: Hello I need your help can you gi

Then I tried your system but it computed without end.

However, Van der Pol consists only of 2 ODEs and your system of 11 ODEs.

Then, to get some result only for a demo purpose, I integrated it only on the small interval [0, 3].

The integration on longer interval was too slow on my PC. The stiffness of your system probably increases rapidly over longer intervals, the method must then choose very small steps and so the calculation is very CPU intensive.