# Modelling & Simulations

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

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

**Page:** 4

---

## [\[Dyad\] “Cyclic guesses detected” in Dyad from non-ideal RLC](https://discourse.julialang.org/t/dyad-cyclic-guesses-detected-in-dyad-from-non-ideal-rlc/135249)

<div class="topic-metadata">

**Author:** [@junmorenodi99](https://discourse.julialang.org/u/junmorenodi99)\
**Replies:** 5\
**Last updated:** [January 25, 2026, 4:24pm UTC](https://discourse.julialang.org/t/dyad-cyclic-guesses-detected-in-dyad-from-non-ideal-rlc/135249 "2026-01-25T16:24:23Z")

</div>

Hi everyone, I’ve been experimenting with Dyad using the RLC circuit example from the documentation, except I made it a bit less ideal by adding: coil series resistance ( RL ) capacitor ESR (Rc When I add the capacit…

---

## [MTK: updated documentation?](https://discourse.julialang.org/t/mtk-updated-documentation/134937)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 30\
**Last updated:** [January 24, 2026, 11:56am UTC](https://discourse.julialang.org/t/mtk-updated-documentation/134937 "2026-01-24T11:56:51Z")

</div>

I am trying to use ModelingToolkit (MTK). In the first example in the documentation, using ModelingToolkit, Plots, OrdinaryDiffEq using ModelingToolkit: t\_nounits as t, D\_nounits as D @mtkmodel FOL begin @parameters…

---

## [Using DiffEqGPU for very large systems: size app 1e7-1e8](https://discourse.julialang.org/t/using-diffeqgpu-for-very-large-systems-size-app-1e7-1e8/134718)

<div class="topic-metadata">

**Author:** [@bpeters](https://discourse.julialang.org/u/bpeters)\
**Replies:** 2\
**Last updated:** [January 23, 2026, 2:10pm UTC](https://discourse.julialang.org/t/using-diffeqgpu-for-very-large-systems-size-app-1e7-1e8/134718 "2026-01-23T14:10:10Z")

</div>

@ChrisRackauckas Dear Chris, I see a huge benefit using DiffEqGPU for my applications (luxdem.uni.lu), in particular to use the power of GPUs of different architectures. My application comes from thermodynamics and req…

---

## [MTK -- \`instream\` problem](https://discourse.julialang.org/t/mtk-instream-problem/135171)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 1\
**Last updated:** [January 21, 2026, 3:08pm UTC](https://discourse.julialang.org/t/mtk-instream-problem/135171 "2026-01-21T15:08:25Z")

</div>

I’m trying to understand ModelingToolkit (MTK) connectors, components, and now Stream variables in connector. As an exercise for myself, I am looking at 2 substance, ideal solution liquid tank systems: I consider 3 …

---

## [Spiking Neural Model](https://discourse.julialang.org/t/spiking-neural-model/135029)

<div class="topic-metadata">

**Author:** [@tbzcn](https://discourse.julialang.org/u/tbzcn)\
**Replies:** 1\
**Last updated:** [January 21, 2026, 5:01am UTC](https://discourse.julialang.org/t/spiking-neural-model/135029 "2026-01-21T05:01:49Z")

</div>

Hi, I am new to Julia and my aim is to create a network of spiking neurons. I use simple leaky integrate and fire (LIF) model for now with ODEProblem solver. Whenever the neuron (u) reaches a threshold value, it should …

---

## [Solving system of spatial Ordinary Differential Equations](https://discourse.julialang.org/t/solving-system-of-spatial-ordinary-differential-equations/135007)

<div class="topic-metadata">

**Author:** [@federicoangioni](https://discourse.julialang.org/u/federicoangioni)\
**Replies:** 1\
**Last updated:** [January 21, 2026, 4:26am UTC](https://discourse.julialang.org/t/solving-system-of-spatial-ordinary-differential-equations/135007 "2026-01-21T04:26:33Z")

</div>

Hello all, I am Federico, and an undergraduate student approaching Julia for the first time as a part of my studies in computational science. I am currently struggling with solving a system of coupled Ordinary Different…

---

## [Simple DAE does not solve](https://discourse.julialang.org/t/simple-dae-does-not-solve/135148)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 4\
**Last updated:** [January 19, 2026, 11:50pm UTC](https://discourse.julialang.org/t/simple-dae-does-not-solve/135148 "2026-01-19T23:50:15Z")

</div>

I tried the very most basic forced DAE I could think of and implemented an RC-circuit: using Sundials using OrdinaryDiffEq using Test u(t) = t \< 0.5 ? 0.0 : 1.0 p = (R=1.0, C=1.0) righthandside = (out, dx, x, p, t) -\> …

---

## [In MTK, how can I change a system's parameter's default values?](https://discourse.julialang.org/t/in-mtk-how-can-i-change-a-systems-parameters-default-values/135092)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 2\
**Last updated:** [January 16, 2026, 3:59pm UTC](https://discourse.julialang.org/t/in-mtk-how-can-i-change-a-systems-parameters-default-values/135092 "2026-01-16T15:59:14Z")

</div>

I have a sys::System, and I’d like to build a sys2 that is like sys, but sys2.some\_param’s default is 20. Right now I use """ \`\`jldoctest julia\> @named sys = MySystem(); julia\> param = sys.some\_param; julia\> initial\_c…

---

## [ModelingToolkit complex system of equations](https://discourse.julialang.org/t/modelingtoolkit-complex-system-of-equations/113370)

<div class="topic-metadata">

**Author:** [@ograsdijk](https://discourse.julialang.org/u/ograsdijk)\
**Replies:** 4\
**Last updated:** [January 14, 2026, 2:47pm UTC](https://discourse.julialang.org/t/modelingtoolkit-complex-system-of-equations/113370 "2026-01-14T14:47:30Z")

</div>

A few years ago I had a similar problem regarding a system of complex equations and I had found a workaround: ModelingToolkit matrix form system of equations and complex values. As far as I can tell complex symbolics ar…

---

## [How to plot the parallelized example in "Parallelized Morris and Sobol Sensitivity Analysis of an ODE"](https://discourse.julialang.org/t/how-to-plot-the-parallelized-example-in-parallelized-morris-and-sobol-sensitivity-analysis-of-an-ode/135034)

<div class="topic-metadata">

**Author:** [@kraqbi](https://discourse.julialang.org/u/kraqbi)\
**Replies:** 1\
**Last updated:** [January 13, 2026, 5:54pm UTC](https://discourse.julialang.org/t/how-to-plot-the-parallelized-example-in-parallelized-morris-and-sobol-sensitivity-analysis-of-an-ode/135034 "2026-01-13T17:54:12Z")

</div>

Hello! I am trying GolbalSensitivity.jl for the first time, so please forgive me if this is a rookie mistake. I have trouble with the example in the doc : I reproduce the example until there : sobol\_result = gsa(f1,…

---

## [Difference between tstops and d\_discontinuities](https://discourse.julialang.org/t/difference-between-tstops-and-d-discontinuities/126847)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 3\
**Last updated:** [January 13, 2026, 2:30pm UTC](https://discourse.julialang.org/t/difference-between-tstops-and-d-discontinuities/126847 "2026-01-13T14:30:38Z")

</div>

The docstring says: • tstops: Denotes extra times that the timestepping algorithm must step to. This should be used to help the solver deal with discontinuities and singularities, since stepping exactly at t…

---

## [ModelingToolkit compiler does not simplify as expected](https://discourse.julialang.org/t/modelingtoolkit-compiler-does-not-simplify-as-expected/134978)

<div class="topic-metadata">

**Author:** [@PhysicsBender](https://discourse.julialang.org/u/PhysicsBender)\
**Replies:** 9\
**Last updated:** [January 12, 2026, 7:01am UTC](https://discourse.julialang.org/t/modelingtoolkit-compiler-does-not-simplify-as-expected/134978 "2026-01-12T07:01:56Z")

</div>

I have noticed that the ModelingToolkit compiler does not simplify systems as expected, creating more unknowns and differential equations. At first I thought it was because it was finding linear systems that it was unabl…

---

## [How can I implement a vector of StaticArrays as a variable in MTK?](https://discourse.julialang.org/t/how-can-i-implement-a-vector-of-staticarrays-as-a-variable-in-mtk/134962)

<div class="topic-metadata">

**Author:** [@pmc4](https://discourse.julialang.org/u/pmc4)\
**Replies:** 6\
**Last updated:** [January 11, 2026, 5:13pm UTC](https://discourse.julialang.org/t/how-can-i-implement-a-vector-of-staticarrays-as-a-variable-in-mtk/134962 "2026-01-11T17:13:01Z")

</div>

Hi everyone. After trying for weeks I would like to ask the community if what I’m trying to do is possible or whether I have arrived to a dead end. I’ve reduced it to a MWE. The system I want to solve in ModelingToolkit…

---

## [Feedback wanted: GPU-accelerated 2D elastic wave simulation (staggered-grid FD) in Julia](https://discourse.julialang.org/t/feedback-wanted-gpu-accelerated-2d-elastic-wave-simulation-staggered-grid-fd-in-julia/134869)

<div class="topic-metadata">

**Author:** [@Wuheng10086](https://discourse.julialang.org/u/Wuheng10086)\
**Replies:** 10\
**Last updated:** [January 10, 2026, 3:16pm UTC](https://discourse.julialang.org/t/feedback-wanted-gpu-accelerated-2d-elastic-wave-simulation-staggered-grid-fd-in-julia/134869 "2026-01-10T15:16:09Z")

</div>

Hi everyone, I’m currently working on a GPU-accelerated 2D elastic wave simulation code in Julia, based on staggered-grid finite-difference discretization. The original motivation is seismic forward modeling, but I’m …

---

## [SymbolicIntegration: can I do definite integrals?](https://discourse.julialang.org/t/symbolicintegration-can-i-do-definite-integrals/134951)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [January 8, 2026, 1:29pm UTC](https://discourse.julialang.org/t/symbolicintegration-can-i-do-definite-integrals/134951 "2026-01-08T13:29:13Z")

</div>

Does SymbolicIntegration.jl support definite integrals? Including to +/- infinity? If so, what is the syntax for specifying integration bounds?

---

## [How to use MTK as one block in a co-simulation](https://discourse.julialang.org/t/how-to-use-mtk-as-one-block-in-a-co-simulation/134895)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 8\
**Last updated:** [January 6, 2026, 1:33pm UTC](https://discourse.julialang.org/t/how-to-use-mtk-as-one-block-in-a-co-simulation/134895 "2026-01-06T13:33:04Z")

</div>

How could I use this model using ModelingToolkit import ModelingToolkit: t\_nounits as t, D\_nounits as D @variables x(t)=0 u(t)=0 y(t) @parameters k = 1 eqs = \[D(x) ~ -k \* (x + u) y ~ x\] @named sys = System(eqs, …

---

## [Hessian of a vector-valued in-place function with ForwardDiff.jl](https://discourse.julialang.org/t/hessian-of-a-vector-valued-in-place-function-with-forwarddiff-jl/134904)

<div class="topic-metadata">

**Author:** [@Yuricst](https://discourse.julialang.org/u/Yuricst)\
**Replies:** 2\
**Last updated:** [January 6, 2026, 8:13am UTC](https://discourse.julialang.org/t/hessian-of-a-vector-valued-in-place-function-with-forwarddiff-jl/134904 "2026-01-06T08:13:07Z")

</div>

I am looking to compute the Hessian of a vector-valued in-place function that looks like function eom!(dx, x, p, t) dx\[1:3\] = x\[4:6\] dx\[4:6\] = -p\[1\] / norm(x\[1:3\])^3 \* x\[1:3\] end using ForwardDiff.jl but I am s…

---

## [Molly for Emulsion Rheology](https://discourse.julialang.org/t/molly-for-emulsion-rheology/133386)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 15\
**Last updated:** [December 29, 2025, 10:54pm UTC](https://discourse.julialang.org/t/molly-for-emulsion-rheology/133386 "2025-12-29T22:54:46Z")

</div>

Greetings, How does one implement on imposed shear force in MD simulations in general and Molly in particular? For context, see e.g. https://github.com/ziolai/finite\_element\_electrical\_engineering/tree/main/project-based…

---

## [Constant tunable parameters in dynamic optimisation](https://discourse.julialang.org/t/constant-tunable-parameters-in-dynamic-optimisation/134774)

<div class="topic-metadata">

**Author:** [@PhysicsBender](https://discourse.julialang.org/u/PhysicsBender)\
**Replies:** 1\
**Last updated:** [December 28, 2025, 9:26pm UTC](https://discourse.julialang.org/t/constant-tunable-parameters-in-dynamic-optimisation/134774 "2025-12-28T21:26:43Z")

</div>

Hello , I was wondering what would be the best way to introduce a constant tunable parameter in a model that would be used in a dynamic optimisation scenario. I have a couple of working examples building on top the basic…

---

## [Modeling wind power output random process across multiple geographical locations](https://discourse.julialang.org/t/modeling-wind-power-output-random-process-across-multiple-geographical-locations/134529)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 13\
**Last updated:** [December 27, 2025, 9:44am UTC](https://discourse.julialang.org/t/modeling-wind-power-output-random-process-across-multiple-geographical-locations/134529 "2025-12-27T09:44:11Z")

</div>

Hello, I want to model a vector stochastic process (may be decided according to historical observations). The length of the vector is N, which is the number of wind farms spreading in a power transmission network. The…

---

## [Free final time problem formulation using ModelingToolkit and InfiniteOpt](https://discourse.julialang.org/t/free-final-time-problem-formulation-using-modelingtoolkit-and-infiniteopt/134735)

<div class="topic-metadata">

**Author:** [@PhysicsBender](https://discourse.julialang.org/u/PhysicsBender)\
**Replies:** 2\
**Last updated:** [December 26, 2025, 8:54am UTC](https://discourse.julialang.org/t/free-final-time-problem-formulation-using-modelingtoolkit-and-infiniteopt/134735 "2025-12-26T08:54:06Z")

</div>

Hello all, I am a new Julia user coming from a Modelica background and I am trying to experiment with Modeling Toolkit and dynamic optimisation. I was trying to follow this example (\[Solving Dynamic Optimization Proble…

---

## [2D stationary diffusion problem & (?) MethodOfLines](https://discourse.julialang.org/t/2d-stationary-diffusion-problem-methodoflines/118963)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 12\
**Last updated:** [December 24, 2025, 6:23am UTC](https://discourse.julialang.org/t/2d-stationary-diffusion-problem-methodoflines/118963 "2025-12-24T06:23:02Z")

</div>

I’d like to model a mass exchanger which can be represented as diffusion in a fluid flow with given stationary flow field and given coordinate-dependent diffusion coefficient. 2D, rectangular domain, rectangular grid, st…

---

## [PID sampling time in modelingtoolkit](https://discourse.julialang.org/t/pid-sampling-time-in-modelingtoolkit/134671)

<div class="topic-metadata">

**Author:** [@victor](https://discourse.julialang.org/u/victor)\
**Replies:** 3\
**Last updated:** [December 22, 2025, 4:36pm UTC](https://discourse.julialang.org/t/pid-sampling-time-in-modelingtoolkit/134671 "2025-12-22T16:36:06Z")

</div>

Hi. I’ve built a modelingtoolkit model to simulate my process system. It uses PID controllers, the issue is that the control system has a sampling time of 1s. This has a huge effect on the parameters for the controller a…

---

## [How to solve or optimize a mixed problem?](https://discourse.julialang.org/t/how-to-solve-or-optimize-a-mixed-problem/134465)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [December 17, 2025, 9:44pm UTC](https://discourse.julialang.org/t/how-to-solve-or-optimize-a-mixed-problem/134465 "2025-12-17T21:44:24Z")

</div>

I have the following problem: a wind farm uncontrolled input: time and location-dependent wind speed control input: time-dependent induction factor set values: time-dependent power demand output: total power For simpl…

---

## [Can ModelingToolkit be used with GPU arrays?](https://discourse.julialang.org/t/can-modelingtoolkit-be-used-with-gpu-arrays/134352)

<div class="topic-metadata">

**Author:** [@pmc4](https://discourse.julialang.org/u/pmc4)\
**Replies:** 10\
**Last updated:** [December 6, 2025, 7:42pm UTC](https://discourse.julialang.org/t/can-modelingtoolkit-be-used-with-gpu-arrays/134352 "2025-12-06T19:42:39Z")

</div>

Hello, everyone. I’m trying to solve a complex system using ModelingToolkit, which involves an array variable. One of the equations is quite heavy computationally and I was trying to pass this array as an argument, then …

---

## [Running external c-code function in MTK model](https://discourse.julialang.org/t/running-external-c-code-function-in-mtk-model/134265)

<div class="topic-metadata">

**Author:** [@JulianMs](https://discourse.julialang.org/u/JulianMs)\
**Replies:** 7\
**Last updated:** [December 4, 2025, 8:59am UTC](https://discourse.julialang.org/t/running-external-c-code-function-in-mtk-model/134265 "2025-12-04T08:59:08Z")

</div>

Hi community, I am new to Julia and in particular MTK. My goal is to simulate a battery cell and couple it with external C-code to run an extended Kalman filter for SOC estimation at a fixed sampling rate. Somehow thi…

---

## [Failing to obtain a bifurcation plot](https://discourse.julialang.org/t/failing-to-obtain-a-bifurcation-plot/134330)

<div class="topic-metadata">

**Author:** [@vembha](https://discourse.julialang.org/u/vembha)\
**Replies:** 0\
**Last updated:** [December 3, 2025, 3:47pm UTC](https://discourse.julialang.org/t/failing-to-obtain-a-bifurcation-plot/134330 "2025-12-03T15:47:51Z")

</div>

Hello everyone, A long-time user of Julia/SciML. I have a system of ODEs and have been trying to obtain a bifurcation diagram using BifurcationKit.jl and ModelingToolkit.jl. While I am able to successfully obtain one br…

---

## [Features of FMUGeneration](https://discourse.julialang.org/t/features-of-fmugeneration/132812)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 11\
**Last updated:** [December 3, 2025, 4:54am UTC](https://discourse.julialang.org/t/features-of-fmugeneration/132812 "2025-12-03T04:54:05Z")

</div>

The package FMUGeneration works for me now (see here). Follow-up questions: Is an FMU file always OS specific? Do I need three of them if I want to support Windows, Mac, and Linux? Does the user of an FMU need to have …

---

## [ForwardDiff with ModelingToolkit: Type conversion error in MTKParameters with DAE systems](https://discourse.julialang.org/t/forwarddiff-with-modelingtoolkit-type-conversion-error-in-mtkparameters-with-dae-systems/134145)

<div class="topic-metadata">

**Author:** [@Danijel-Zadravec](https://discourse.julialang.org/u/Danijel-Zadravec)\
**Replies:** 2\
**Last updated:** [December 1, 2025, 12:21pm UTC](https://discourse.julialang.org/t/forwarddiff-with-modelingtoolkit-type-conversion-error-in-mtkparameters-with-dae-systems/134145 "2025-12-01T12:21:26Z")

</div>

Hi everyone, I’m encountering a MethodError when trying to follow this example from the ModelingToolkit documentation. The problem seems to be related with dual number propagation in ODEProblems that have the property: …

---

## [ChainRules error when using Mooncake in Optimization.jl](https://discourse.julialang.org/t/chainrules-error-when-using-mooncake-in-optimization-jl/134240)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 0\
**Last updated:** [November 30, 2025, 7:10pm UTC](https://discourse.julialang.org/t/chainrules-error-when-using-mooncake-in-optimization-jl/134240 "2025-11-30T19:10:28Z")

</div>

Hi all, I am testing out using the SciML ecosystem to fit constrained splines inside of an ODE (some terms on the RHS of the ODE are given by evaluating a spline where the point of evaluation on the domain of the spline …

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

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