# GBODE solver: is it relevant?

**URL:** <https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496>\
**Category:** Modelling & Simulations\
**Tags:** question, diffeq\
**Created:** [October 29, 2022, 4:15pm UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496 "2022-10-29T16:15:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrontsis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nrontsis/32/38535_2.png) [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Post date:** [October 29, 2022, 4:15pm UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496/1 "2022-10-29T16:15:54Z")

</div>

Going through `OpenModelica`’s user guide I stumbled upon one of its default integration methods: [`GBODE`](https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/solving.html#gbode).

I was surprised to not find a Julia implementation/port of it e.g. available via DifferentialEquations.jl.

I wonder why that is? Is the method considered outdated or outperformed by other methods?

Thanks!

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [October 29, 2022, 6:44pm UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496/2 "2022-10-29T18:44:22Z")

</div>

it looks like a method that takes a tableu and returns the corresponding explicit method. while we don’t have it, I think we do have very solid implementations of the explicit methods that are relevant.

---

<div class="post-metadata">

**Author:** ![nrontsis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nrontsis/32/38535_2.png) [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Post date:** [October 29, 2022, 10:20pm UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496/3 "2022-10-29T22:20:28Z")

</div>

Thanks a lot for the reply!

Is it possible to mention some of the similar methods that Julia has?

I am particularly interested about the “bi-rate” mode of GBODE, as this sounds relevant to my application.

Sorry if these seem obvious, I am just starting on ODEs, and any advice is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 30, 2022, 8:47am UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496/4 "2022-10-30T08:47:13Z")

</div>

We do have ExplicitRK and such, but they don’t have tuned PI controller values and predictors, and they also don’t get all of the loop fusion the handwritten methods get. So the generic tableau methods end up really only useful for research.

---

<div class="post-metadata">

**Author:** ![nrontsis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nrontsis/32/38535_2.png) [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Post date:** [October 30, 2022, 9:35am UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496/5 "2022-10-30T09:35:40Z")

</div>

Besides the ability to use a generic tableau, GBODE can work in a “bi-rate” mode with associated options (gbratio) to consider a portion of the states as “fast”.

Is there such a “bi-rate” mode available via e.g. DifferentialEquations.jl/ModelingToolkit.jl?

If not, are there other approaches to efficiently deal with models that have some fast and slow states in e.g. ModelingToolkit.jl?

Thanks!

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 30, 2022, 11:34am UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496/6 "2022-10-30T11:34:52Z")

</div>

What does it mean by a bi-rate mode here?

---

<div class="post-metadata">

**Author:** ![nrontsis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nrontsis/32/38535_2.png) [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Post date:** [October 30, 2022, 5:33pm UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496/7 "2022-10-30T17:33:36Z")

</div>

I can only quote [OpenModelica’s documentation](https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/solving.html#gbode) at this point:

> The bi-rate mode can be utilized using the simulation flag [gbratio](https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/simulationflags.html#simflag-gbratio). This flag determines the percentage of fast states with respect to all states. These states will then be automatically detected during integration based on the estimated approximation error and afterwards refined using an appropriate inner step-size control and interpolated values of the slow states.

Frustrantigly I could not find a paper or some other detailed reference for GBODE.

But I found out [the PR](https://github.com/OpenModelica/OpenModelica/pull/9143) that added this solver to `OpenModelica` - it was only added three months ago.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 30, 2022, 7:18pm UTC](https://discourse.julialang.org/t/gbode-solver-is-it-relevant/89496/8 "2022-10-30T19:18:47Z")

</div>

If it’s a multirate solver, then the way that they are doing it is odd at best.
