# Modelling & Simulations

**URL:** https://discourse.julialang.org/c/domain/models/21.md?page=22

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 23

---

## [Vern9 from differentialequations.jl and ode89 from matlab](https://discourse.julialang.org/t/vern9-from-differentialequations-jl-and-ode89-from-matlab/114587)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 15\
**Last updated:** [May 25, 2024, 8:00am UTC](https://discourse.julialang.org/t/vern9-from-differentialequations-jl-and-ode89-from-matlab/114587 "2024-05-25T08:00:17Z")

</div>

Hello, I am calculating a solution for the system using Vern9() in Julia and ode89 in Matlab. I get a message about instability in Julia while there is no such thing in matlab. If I change the abstol, reltol in julia to…

---

## [Turing.jl slow inference](https://discourse.julialang.org/t/turing-jl-slow-inference/114525)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 8\
**Last updated:** [May 24, 2024, 3:01pm UTC](https://discourse.julialang.org/t/turing-jl-slow-inference/114525 "2024-05-24T15:01:25Z")

</div>

Hi, I have specified the following model in Turing.jl: \\begin{align} e^{\\mathcal{L}C\_\\mathrm{i}}\\dot{T}\_\\mathrm{i} =& e^{{\\mathcal{L}A\_\\mathrm{w}}}\\Phi\_{\\mathrm{s}}(t) + e^{-\\mathcal{L}R\_{\\mathrm{ih}}} \\left\[T\_{\\mat…

---

## [Matrix inversion in ModellingToolkit](https://discourse.julialang.org/t/matrix-inversion-in-modellingtoolkit/114515)

<div class="topic-metadata">

**Author:** [@rveynde](https://discourse.julialang.org/u/rveynde)\
**Replies:** 3\
**Last updated:** [May 24, 2024, 2:29pm UTC](https://discourse.julialang.org/t/matrix-inversion-in-modellingtoolkit/114515 "2024-05-24T14:29:16Z")

</div>

Hi all, I am trying to perform matrix inversion on a 2-dimensional variable in ModellingToolkit, but I get a MethodError that there is no matching method. Is there some implementation of matrix inversion that I could use…

---

## [Order of parameters in ODEProblem](https://discourse.julialang.org/t/order-of-parameters-in-odeproblem/114672)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 1\
**Last updated:** [May 24, 2024, 12:56pm UTC](https://discourse.julialang.org/t/order-of-parameters-in-odeproblem/114672 "2024-05-24T12:56:48Z")

</div>

Hi, I defined an ODE problem in ModelingToolkit.jl, as such: using ModelingToolkit using ModelingToolkit: t\_nounits as t, D\_nounits as D using ModelingToolkitStandardLibrary.Blocks using DataInterpolations using Ordina…

---

## [Nicer way to plug an R function into the RHS of an ODEProblem?](https://discourse.julialang.org/t/nicer-way-to-plug-an-r-function-into-the-rhs-of-an-odeproblem/114640)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 6\
**Last updated:** [May 23, 2024, 9:26pm UTC](https://discourse.julialang.org/t/nicer-way-to-plug-an-r-function-into-the-rhs-of-an-odeproblem/114640 "2024-05-23T21:26:59Z")

</div>

Hi All, I’m trying to plug an R function into an ODEProblem in OrdinaryDiffEq. The below code works, but is there a simple way to make the code neater e.g. define ODEProblem in terms of an RObject? using OrdinaryDiffEq…

---

## [Convert continuous time (ODESystem) to discrete time system?](https://discourse.julialang.org/t/convert-continuous-time-odesystem-to-discrete-time-system/114597)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 4\
**Last updated:** [May 23, 2024, 7:46pm UTC](https://discourse.julialang.org/t/convert-continuous-time-odesystem-to-discrete-time-system/114597 "2024-05-23T19:46:50Z")

</div>

I’d like to take a continuous time ODE, and convert it to a discrete time system, along the lines of c2d in ControlSystems.jl. Here’s the ODE version: Here’s the discrete-time equivalent: I suspect that this is ea…

---

## [Sol.interp and sol.k DifferentialEquations.jl](https://discourse.julialang.org/t/sol-interp-and-sol-k-differentialequations-jl/114372)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 11\
**Last updated:** [May 22, 2024, 3:04pm UTC](https://discourse.julialang.org/t/sol-interp-and-sol-k-differentialequations-jl/114372 "2024-05-22T15:04:23Z")

</div>

Hello, please help me understand what it is sol.interp, sol.k and is there any way not to save them? I found that they take up quite a lot of RAM, which is why ubuntu 24.04 freezes. Thank you for your helps! Code: usi…

---

## [Problem in integrating Agents.jl and DifferentialEquations.jl](https://discourse.julialang.org/t/problem-in-integrating-agents-jl-and-differentialequations-jl/114510)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 3\
**Last updated:** [May 21, 2024, 1:59pm UTC](https://discourse.julialang.org/t/problem-in-integrating-agents-jl-and-differentialequations-jl/114510 "2024-05-21T13:59:55Z")

</div>

Hello, Everyone Im running this example from Agents.jl page – example. I’m getting Error as shown below. It will be really helpful if someone can help me out here as its extracted directly from website. I will expect it …

---

## [Normalization before sensitivity analysis](https://discourse.julialang.org/t/normalization-before-sensitivity-analysis/114484)

<div class="topic-metadata">

**Author:** [@duodenum](https://discourse.julialang.org/u/duodenum)\
**Replies:** 2\
**Last updated:** [May 20, 2024, 9:57pm UTC](https://discourse.julialang.org/t/normalization-before-sensitivity-analysis/114484 "2024-05-20T21:57:09Z")

</div>

Hello, I have a very general question: Is normalization necessary before global sensitivity analysis? Let’s say I have a differential equation that takes parameters x\_n. But parameters have widely different range of val…

---

## [Structural\_simplify not working on tiered model](https://discourse.julialang.org/t/structural-simplify-not-working-on-tiered-model/114428)

<div class="topic-metadata">

**Author:** [@HSnowden](https://discourse.julialang.org/u/HSnowden)\
**Replies:** 1\
**Last updated:** [May 18, 2024, 1:40pm UTC](https://discourse.julialang.org/t/structural-simplify-not-working-on-tiered-model/114428 "2024-05-18T13:40:31Z")

</div>

Hello, For contect: I am building a model using ModellingToolkit that has layers of connections as each component within the overall ODE will be built at runtime from symbolics equations etc. I have built this model wi…

---

## [Autodiff for max-flow](https://discourse.julialang.org/t/autodiff-for-max-flow/114300)

<div class="topic-metadata">

**Author:** [@PaterPen](https://discourse.julialang.org/u/PaterPen)\
**Replies:** 14\
**Last updated:** [May 18, 2024, 10:56am UTC](https://discourse.julialang.org/t/autodiff-for-max-flow/114300 "2024-05-18T10:56:43Z")

</div>

Hi, I would like to use Enzyme.jl to get gradients for a max-flow result. Enzyme gives me an illegal type analysis error in this MWE: using Enzyme using Graphs, GraphsFlows # Graph from GraphsFlows.jl demo flow\_graph =…

---

## [Idea of time in Agents.jl modelling](https://discourse.julialang.org/t/idea-of-time-in-agents-jl-modelling/114240)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 12\
**Last updated:** [May 17, 2024, 7:38pm UTC](https://discourse.julialang.org/t/idea-of-time-in-agents-jl-modelling/114240 "2024-05-17T19:38:55Z")

</div>

Hello everyone, It may be very naive to ask but Im not sure I understand idea of time in Agents.jl modelling. In Agents modelling we usually use steps right? like for how many steps it should run. But lets say I want to…

---

## [Marking user points / events along a cxdimension-one curve of fold bifurcation](https://discourse.julialang.org/t/marking-user-points-events-along-a-cxdimension-one-curve-of-fold-bifurcation/114325)

<div class="topic-metadata">

**Author:** [@BigEpsilon.jl](https://discourse.julialang.org/u/BigEpsilon.jl)\
**Replies:** 3\
**Last updated:** [May 16, 2024, 2:48pm UTC](https://discourse.julialang.org/t/marking-user-points-events-along-a-cxdimension-one-curve-of-fold-bifurcation/114325 "2024-05-16T14:48:33Z")

</div>

This post is concerning BifurcationKit.jl I doing a bifurcation analysis in two parameters, and want to be able to mark a point along a fold-curve, similar to how it is on in AUTO-07p. I have gotten this working for a …

---

## [Why use EnsembleProblems?](https://discourse.julialang.org/t/why-use-ensembleproblems/114315)

<div class="topic-metadata">

**Author:** [@jonathanfischer97](https://discourse.julialang.org/u/jonathanfischer97)\
**Replies:** 1\
**Last updated:** [May 16, 2024, 8:07am UTC](https://discourse.julialang.org/t/why-use-ensembleproblems/114315 "2024-05-16T08:07:05Z")

</div>

What’s the main intended use case for using an EnsembleProblem in DifferentialEquations.jl? Does it offer better performance through batching compared to just writing an equivalent parallelized loop with remake and sol…

---

## [Using Modeling Toolkit to solve simple equation](https://discourse.julialang.org/t/using-modeling-toolkit-to-solve-simple-equation/114289)

<div class="topic-metadata">

**Author:** [@HSnowden](https://discourse.julialang.org/u/HSnowden)\
**Replies:** 2\
**Last updated:** [May 15, 2024, 1:23pm UTC](https://discourse.julialang.org/t/using-modeling-toolkit-to-solve-simple-equation/114289 "2024-05-15T13:23:58Z")

</div>

Hello, I shall pretense this with that I am very new to ModelingToolkit As part of a bigger system I have a laser source term which chnages based on the type of a struct defining the equation. This means that I want to…

---

## [RC -Example model equations](https://discourse.julialang.org/t/rc-example-model-equations/114083)

<div class="topic-metadata">

**Author:** [@Jan\_Svanda](https://discourse.julialang.org/u/Jan_Svanda)\
**Replies:** 5\
**Last updated:** [May 15, 2024, 8:30am UTC](https://discourse.julialang.org/t/rc-example-model-equations/114083 "2024-05-15T08:30:44Z")

</div>

I tried the example ‘Acausal Component – RC-Circuit’ in ModelingToolkit.jl. I have a question regarding accessing equations that describe the system. I see that I can access the differential equations with equations(expa…

---

## [Type stability for ODEProblem objects](https://discourse.julialang.org/t/type-stability-for-odeproblem-objects/45324)

<div class="topic-metadata">

**Author:** [@imcinerney](https://discourse.julialang.org/u/imcinerney)\
**Replies:** 10\
**Last updated:** [May 14, 2024, 7:26pm UTC](https://discourse.julialang.org/t/type-stability-for-odeproblem-objects/45324 "2024-05-14T19:26:26Z")

</div>

I am working on a problem where I simulate an ODE as part of a larger optimization scheme (the ODE becomes part of the cost function computation in a derivative-free setting), and I was trying to track down some ineffici…

---

## [Use Sobol sequence in DifferentialEquations.jl / StochasticDiffEq.jl](https://discourse.julialang.org/t/use-sobol-sequence-in-differentialequations-jl-stochasticdiffeq-jl/109220)

<div class="topic-metadata">

**Author:** [@stochasticguy](https://discourse.julialang.org/u/stochasticguy)\
**Replies:** 8\
**Last updated:** [May 14, 2024, 1:31pm UTC](https://discourse.julialang.org/t/use-sobol-sequence-in-differentialequations-jl-stochasticdiffeq-jl/109220 "2024-05-14T13:31:21Z")

</div>

Hi everyone, I’m trying to use the Sobol sequence to simulate Stochastic Differential Equations with StochasticDiffEq.jl / DifferentialEquations.jl. I’m trying to use the Sobol sequence to generate the random numbers be…

---

## [Confidence Intervals for Sobol Global Sensitivity Analysis](https://discourse.julialang.org/t/confidence-intervals-for-sobol-global-sensitivity-analysis/113671)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 3\
**Last updated:** [May 13, 2024, 6:32pm UTC](https://discourse.julialang.org/t/confidence-intervals-for-sobol-global-sensitivity-analysis/113671 "2024-05-13T18:32:20Z")

</div>

I was running the example for Sobol sensitivity analysis, which was mentioned in the tutorial (Sobol Method · GlobalSensitivity.jl) and I observed that when I specified the nboot argument to calculate the confidence inte…

---

## [Analyzing 2nd-order Sobol Indices](https://discourse.julialang.org/t/analyzing-2nd-order-sobol-indices/113664)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 2\
**Last updated:** [May 13, 2024, 5:14pm UTC](https://discourse.julialang.org/t/analyzing-2nd-order-sobol-indices/113664 "2024-05-13T17:14:58Z")

</div>

I have a model with 130 parameters and measure 18 outputs. I ran the Sobol analysis for the 2nd-order indices because there is a significant difference between the total indices and 1st-order, so I guess there are higher…

---

## [Extracting neumann boundary in Gridap - discrepancy](https://discourse.julialang.org/t/extracting-neumann-boundary-in-gridap-discrepancy/114179)

<div class="topic-metadata">

**Author:** [@DnBgk](https://discourse.julialang.org/u/DnBgk)\
**Replies:** 0\
**Last updated:** [May 12, 2024, 10:12pm UTC](https://discourse.julialang.org/t/extracting-neumann-boundary-in-gridap-discrepancy/114179 "2024-05-12T22:12:54Z")

</div>

So I want to model the Neumann-to-Dirichlet map in a Poisson like equation. If I can give it my neumann boundary right away is there an implemented method that also extracts the neumann boundary values? If no. I’m wond…

---

## [3D scenes in GLMakie Glitch out and Slow down after few seconds](https://discourse.julialang.org/t/3d-scenes-in-glmakie-glitch-out-and-slow-down-after-few-seconds/114110)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 8\
**Last updated:** [May 10, 2024, 5:08pm UTC](https://discourse.julialang.org/t/3d-scenes-in-glmakie-glitch-out-and-slow-down-after-few-seconds/114110 "2024-05-10T17:08:58Z")

</div>

I was recently playing around with GLMakie Scenes using the cam3d! camera which works pretty much like plotly() backend on Plots. I was impressed by the zoom in-out controls. However, after a few seconds of scroll…

---

## [How to render such interactive 3D scenes/plots in Makie?](https://discourse.julialang.org/t/how-to-render-such-interactive-3d-scenes-plots-in-makie/114037)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 2\
**Last updated:** [May 9, 2024, 11:02am UTC](https://discourse.julialang.org/t/how-to-render-such-interactive-3d-scenes-plots-in-makie/114037 "2024-05-09T11:02:27Z")

</div>

I’m working on this molecule simulation and wanna make a couple of dots move around in 3D. I’ve worked with GLMakie very little (was creating just some basic scenes). In fact, I’ve worked with plots for the first time…

---

## [Multiple shooting and multiple options](https://discourse.julialang.org/t/multiple-shooting-and-multiple-options/113659)

<div class="topic-metadata">

**Author:** [@JordiBolibar](https://discourse.julialang.org/u/JordiBolibar)\
**Replies:** 7\
**Last updated:** [May 8, 2024, 10:48pm UTC](https://discourse.julialang.org/t/multiple-shooting-and-multiple-options/113659 "2024-05-08T22:48:09Z")

</div>

I am trying to add multiple shooting to a neural differential equation. After browsing multiple options, I see I have two possibilities: Use DiffEqFlux.jl’s multiple\_shoot Use DiffEqParamEstim.jl’s multiple\_shooting\_ob…

---

## [Acausal modeling and Unreal Engine](https://discourse.julialang.org/t/acausal-modeling-and-unreal-engine/111016)

<div class="topic-metadata">

**Author:** [@joelreymont](https://discourse.julialang.org/u/joelreymont)\
**Replies:** 16\
**Last updated:** [May 8, 2024, 9:02pm UTC](https://discourse.julialang.org/t/acausal-modeling-and-unreal-engine/111016 "2024-05-08T21:02:37Z")

</div>

I would like to simulate a quadrocopter using Julia and visualize it in Unreal Engine. I figure ModelingToolkit.jl should let me model the energy consumption of the on-board drone battery and optimize trajectories, etc.…

---

## [CVODE\_BDF outperforms Julia solvers for stiff system biology model?](https://discourse.julialang.org/t/cvode-bdf-outperforms-julia-solvers-for-stiff-system-biology-model/113936)

<div class="topic-metadata">

**Author:** [@sebapersson](https://discourse.julialang.org/u/sebapersson)\
**Replies:** 5\
**Last updated:** [May 8, 2024, 3:34pm UTC](https://discourse.julialang.org/t/cvode-bdf-outperforms-julia-solvers-for-stiff-system-biology-model/113936 "2024-05-08T15:34:19Z")

</div>

For medium sized stiff system biology ODE models I have recently done two benchmarks that suggest that CVODE\_BDF outperform the Julia solvers (in particular the multi-step bdf solvers). Below is an with 25 ODEs and 39 p…

---

## [Extract linear algebraic equations](https://discourse.julialang.org/t/extract-linear-algebraic-equations/113985)

<div class="topic-metadata">

**Author:** [@Jan\_Svanda](https://discourse.julialang.org/u/Jan_Svanda)\
**Replies:** 0\
**Last updated:** [May 8, 2024, 8:01am UTC](https://discourse.julialang.org/t/extract-linear-algebraic-equations/113985 "2024-05-08T08:01:24Z")

</div>

I’m trying to use ModelingToolkit.jl to generate a system of linear algebraic equations. It’s quite simple: my system is a resistor network with a constant voltage source. I use ModelingToolkit to create a topology, and …

---

## [Error with ModelingToolkit documentation example](https://discourse.julialang.org/t/error-with-modelingtoolkit-documentation-example/113946)

<div class="topic-metadata">

**Author:** [@amytmoody](https://discourse.julialang.org/u/amytmoody)\
**Replies:** 2\
**Last updated:** [May 7, 2024, 2:39pm UTC](https://discourse.julialang.org/t/error-with-modelingtoolkit-documentation-example/113946 "2024-05-07T14:39:05Z")

</div>

I’m getting the following error from the first example in the Getting Started with ModelingToolkit example. WARNING: could not import ModelingToolkit.t\_nounits into Main UndefVarError: \`D\` not defined I found a workar…

---

## [MTK & NonlinearSolve](https://discourse.julialang.org/t/mtk-nonlinearsolve/113834)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 0\
**Last updated:** [May 4, 2024, 3:29pm UTC](https://discourse.julialang.org/t/mtk-nonlinearsolve/113834 "2024-05-04T15:29:56Z")

</div>

I have converted a Python function to Julia which involves: kwargs to specify units, correlations, etc. unit conversion solving an implicit equation My Julia conversion works, but I’m thinking of converting the functi…

---

## [Coupled PDE solver](https://discourse.julialang.org/t/coupled-pde-solver/113636)

<div class="topic-metadata">

**Author:** [@avishipoddar](https://discourse.julialang.org/u/avishipoddar)\
**Replies:** 1\
**Last updated:** [May 4, 2024, 10:45am UTC](https://discourse.julialang.org/t/coupled-pde-solver/113636 "2024-05-04T10:45:16Z")

</div>

I am trying to solve a coupled linear pde I have attached my code below using DifferentialEquations using FiniteDifferences Define your system of coupled linear partial differential equations function coupled\_pdes(du…

[Previous page](https://discourse.julialang.org/c/domain/models/21.md?page=21)

[Next page](https://discourse.julialang.org/c/domain/models/21.md?page=23)
