Using Sundials cvode solver
조회 수: 28 (최근 30일)
이전 댓글 표시
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
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
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.
- https://www.mathworks.com/help/simbio/ref/modelobject.html#bqu195b-7
- https://www.mathworks.com/help/simbio/gs/construct-a-simple-model.html
Hope this helps!
댓글 수: 0
Mike Croucher
2024년 4월 17일
As of MATLAB R2024a, SUNDIALS is shipped with and supported directly in MATLAB. See my blog post for details
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!