Hi,

Le 02/09/2021 à 20:11, Jakub Kopac a écrit :
Hello,

In the past I solved the same issue.
As Stephane points out, try to play with ODEOPTIONS.
In my case (disretized PDE), I get massive speed up by setting
%ODEOPTIONS(6)  =  0
and selecting a stiff solver.

If I understand it correctly, you are using function interp1 when evaluating ODE function (many calls to interp1). If it is this case, I propose to make a copy of Scilab interp1 function and clean unecessary commands. I have also good experience with this aproach, but you are loosing flexibility and is a ad hoc function.

Best regards

J.K.

PS: it is great to hear that ODE solvers will be updated to more recent versions.

The actual generic solvers of ode (https://computing.llnl.gov/projects/odepack) are still competitive but for large-scale stiff systems, odepack misses the versatileness of Sundials concerning linear solvers (e.g. odepack does not handle sparse Jacobians).

S.



št 2. 9. 2021 o 18:32 Stéphane Mottelet <stephane.motte...@utc.fr <mailto:stephane.motte...@utc.fr>> napísal(a):


    Le 02/09/2021 à 18:03, CHEZE David 227480 a écrit :

    Dear all,

    In experimental work, I’m comparing dynamic model of a thermal
    system with measurements. I’m using function ode, “fix” solver
    (continuous time, lowest accuracy requirement is applying in my
    case at this stage) and Jacobian ( to try to speed up the
    calculation but not sensitive as for now) to get the solution of
    the equation,  a single temperature node, at 240 times (time
    vector), default rtol=1.d-3 and atol=1.d-4. The system inputs are
    available as vector of reals , size is 240 and inputs are passed
    to the ode function as inputs functions by interpolating
    (interp1) the inputs vectors. It is issuing correct temperature
    solutions but is very slow, ~40s for 240 times, while the
    variable inputs vector are actually not varying a lot and thus I
    would expect very short calculation time.

    WIN10-64bits Intel i7 2,6GHz, Scilab 6.1.1

    Is there any tips to speed up the calculation , advanced example
    documentation about ODEOPTIONS or ode_optional_output ? I guess
    it’s the same underlying code that is used in Xcos isn’t it ?

    No. Xcos uses the (more up-to-date) SUNDIALS solvers, they will be
    made available at the user level in the next months.

    Thank you for advising,

    David


    _______________________________________________
    users mailing list
    users@lists.scilab.org  <mailto:users@lists.scilab.org>
    
https://antispam.utc.fr/proxy/v3?i=cWdzUmRSM0ZiRHpoUDkxTSw3-90dQgKDkqmWWemZ6js&r=WXNQOUY5VXRSNUlTdlVTTgAgPzRHrDev93-c71JTxG3gYERdftx8enpEGCicW5Zy&f=R0pWUVNEaUFuMTBCTlptbqaYxU0NWnHz-Aov_fSSM1D4vfIz2L0jb50-moW0RphD&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=8YLU
  
<https://antispam.utc.fr/proxy/v3?i=cWdzUmRSM0ZiRHpoUDkxTSw3-90dQgKDkqmWWemZ6js&r=WXNQOUY5VXRSNUlTdlVTTgAgPzRHrDev93-c71JTxG3gYERdftx8enpEGCicW5Zy&f=R0pWUVNEaUFuMTBCTlptbqaYxU0NWnHz-Aov_fSSM1D4vfIz2L0jb50-moW0RphD&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=8YLU>

-- Stéphane Mottelet
    Ingénieur de recherche
    EA 4297 Transformations Intégrées de la Matière Renouvelable
    Département Génie des Procédés Industriels
    Sorbonne Universités - Université de Technologie de Compiègne
    CS 60319, 60203 Compiègne cedex
    Tel : +33(0)344234688
    http://www.utc.fr/~mottelet  <http://www.utc.fr/~mottelet>

    _______________________________________________
    users mailing list
    users@lists.scilab.org <mailto:users@lists.scilab.org>
    http://lists.scilab.org/mailman/listinfo/users
    <http://lists.scilab.org/mailman/listinfo/users>


_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to