Using Sundials cvode solver

26 ビュー (過去 30 日間)
Deepa Maheshvare
Deepa Maheshvare 2023 年 10 月 10 日
回答済み: Mike Croucher 2024 年 4 月 17 日
Hi All,
I'm currently using ode15s to solve a set of stiff differential equations.
[t, species] = ode15s(@(t,s) factory(t,s), tspan , species0, options);
I would like to try solving the same set of odes using the CVODE solver in Sundials.
I checked some examples which show how to specify the solver type and use Sundials.
configsetObj = getconfigset(modelObj);
configsetObj.SolverType = 'sundials';
configsetObj.MaximumWallClock = 30;
configsetObj.MaximumNumberOfLogs = 100;
configsetObj.StopTime = 10;
[time, states] = sbiosimulate(modelObj);
plot(time,states)
I would like to know how modelObj should be defined.
  5 件のコメント
Deepa Maheshvare
Deepa Maheshvare 2023 年 10 月 12 日
Thank you for the reponse.
I hope I could get some suggestions from the others.
Star Strider
Star Strider 2023 年 10 月 12 日
I had to look that up. I found SUNDIALS Solvers as the only relevant documentation. I get the impression that these are stand-alone routines, however I have not explored the LLNL documentation for the software.

サインインしてコメントする。

回答 (2 件)

Aditya
Aditya 2023 年 10 月 27 日
Hi Deepa,
I understand that you want to solve set of stiff differential equations using the CVODE solver in Sundials and need help defining the modelObj for it.
To convert your ODE model to SimBiology, you can follow a direct approach by converting each differential equation into a rate rule. You can find an example of that here:
In addition, I recommend checking out the following resources to understand how to define a model object according to your specific needs.
Hope this helps!

Mike Croucher
Mike Croucher 2024 年 4 月 17 日

カテゴリ

Help Center および File ExchangeParticle & Nuclear Physics についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by