# Modelling & Simulations

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

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

**Page:** 2

---

## [MTK: @parameters vs. kwargs -- what is good practice?](https://discourse.julialang.org/t/mtk-parameters-vs-kwargs-what-is-good-practice/137633)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 8\
**Last updated:** [June 16, 2026, 11:32am UTC](https://discourse.julialang.org/t/mtk-parameters-vs-kwargs-what-is-good-practice/137633 "2026-06-16T11:32:03Z")

</div>

What is good practice when it comes to use of @parameters and kwargs in “component types”? To make my question concrete, consider the following “component type” (is that the proper term? – this is not meant as a “seriou…

---

## [Splited ODE system in ModelingToolkit](https://discourse.julialang.org/t/splited-ode-system-in-modelingtoolkit/101258)

<div class="topic-metadata">

**Author:** [@sabbraxcaddabra](https://discourse.julialang.org/u/sabbraxcaddabra)\
**Replies:** 4\
**Last updated:** [June 15, 2026, 10:45pm UTC](https://discourse.julialang.org/t/splited-ode-system-in-modelingtoolkit/101258 "2026-06-15T22:45:06Z")

</div>

I have a simple system of equations: dx\_dt = k \* x + l \* y dy\_dt = n \* x + m \* y and I want to compute right side functions separately: dx\_dt = f1(t, x, y) + f2(t, x, y) dy\_dt = f3(t, x, y) + f4(t, x, y) Example is s…

---

## [Improved CFD solver?](https://discourse.julialang.org/t/improved-cfd-solver/135082)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 24\
**Last updated:** [June 14, 2026, 6:28pm UTC](https://discourse.julialang.org/t/improved-cfd-solver/135082 "2026-06-14T18:28:49Z")

</div>

While there are a few CFD solvers in Julia, like ViscousFlow.jl and WaterLily.jl, the field of usage is somewhat limited: As far as I understand, WaterLily works well only for low Reynolds numbers. Is there anybody else …

---

## [Changes in mtkcompile between v9.54 and v11.26](https://discourse.julialang.org/t/changes-in-mtkcompile-between-v9-54-and-v11-26/137536)

<div class="topic-metadata">

**Author:** [@rveynde](https://discourse.julialang.org/u/rveynde)\
**Replies:** 3\
**Last updated:** [June 11, 2026, 1:05am UTC](https://discourse.julialang.org/t/changes-in-mtkcompile-between-v9-54-and-v11-26/137536 "2026-06-11T01:05:40Z")

</div>

I am in the process of updating from MTK version 9.54 to 11.26 for my model. In general it looks like many things have sped up, which is great! There is one issue that I’m running into, namely that during mtkcompile I n…

---

## [MTK mtkcompile "fully\_determined" kwarg unexpected behavior](https://discourse.julialang.org/t/mtk-mtkcompile-fully-determined-kwarg-unexpected-behavior/137408)

<div class="topic-metadata">

**Author:** [@mark.garnett](https://discourse.julialang.org/u/mark.garnett)\
**Replies:** 3\
**Last updated:** [June 10, 2026, 5:19pm UTC](https://discourse.julialang.org/t/mtk-mtkcompile-fully-determined-kwarg-unexpected-behavior/137408 "2026-06-10T17:19:52Z")

</div>

Hi all, I’m not sure if bug or not, but setting the fully\_determined keyword argument to true on mtkcompile results in a compilation error, whereas setting it to false results in what seems to be a valid system, with an…

---

## [MTK libaries & initial values vs. initial guesses?](https://discourse.julialang.org/t/mtk-libaries-initial-values-vs-initial-guesses/137443)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 19\
**Last updated:** [June 9, 2026, 11:53pm UTC](https://discourse.julialang.org/t/mtk-libaries-initial-values-vs-initial-guesses/137443 "2026-06-09T23:53:39Z")

</div>

In MTK libraries, should I include “hard-coded” initial values in components, or not? I’m toying with an alpha version of a library based on MTK, and have now come to the stage of testing whether I can linearize the com…

---

## [StructuralIdentifiability.jl for more complicated systems](https://discourse.julialang.org/t/structuralidentifiability-jl-for-more-complicated-systems/137381)

<div class="topic-metadata">

**Author:** [@mark.garnett](https://discourse.julialang.org/u/mark.garnett)\
**Replies:** 5\
**Last updated:** [June 9, 2026, 9:37am UTC](https://discourse.julialang.org/t/structuralidentifiability-jl-for-more-complicated-systems/137381 "2026-06-09T09:37:58Z")

</div>

Hi all, I am looking at StructuralIdentifiability.jl along with ModelingToolkit.jl to see what I can do with it. Ideally, I would use it to first find out which parameters in my models are actually identifiable, and then…

---

## [Issues solving DifferentialEquations EnsembleProblem](https://discourse.julialang.org/t/issues-solving-differentialequations-ensembleproblem/137413)

<div class="topic-metadata">

**Author:** [@Theodore\_Rieger](https://discourse.julialang.org/u/Theodore_Rieger)\
**Replies:** 2\
**Last updated:** [June 3, 2026, 9:50am UTC](https://discourse.julialang.org/t/issues-solving-differentialequations-ensembleproblem/137413 "2026-06-03T09:50:05Z")

</div>

Hello, I was trying to experiment with ensemble problems from differentialequations package. I’m very quickly running into a roadblock in that even the examples from documentation are producing errors. Below is an exampl…

---

## [Request for Computational Review: Laser-Assisted Vapor-Quench Synthesis Model (Metamaterials)](https://discourse.julialang.org/t/request-for-computational-review-laser-assisted-vapor-quench-synthesis-model-metamaterials/137332)

<div class="topic-metadata">

**Author:** [@Taxi\_Schramm](https://discourse.julialang.org/u/Taxi_Schramm)\
**Replies:** 0\
**Last updated:** [May 29, 2026, 2:39am UTC](https://discourse.julialang.org/t/request-for-computational-review-laser-assisted-vapor-quench-synthesis-model-metamaterials/137332 "2026-05-29T02:39:38Z")

</div>

Hello everyone, I am an independent researcher at Malt Studios, operating under an Open Source Humanity framework. I am looking to get a rigorous peer review and stress test on the physical parameters for a localized la…

---

## [Surrogate with derivatives](https://discourse.julialang.org/t/surrogate-with-derivatives/137277)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [May 26, 2026, 11:42am UTC](https://discourse.julialang.org/t/surrogate-with-derivatives/137277 "2026-05-26T11:42:02Z")

</div>

I am solving an implicit function f(x, y(x)) = 0 with x, y \\in \\mathbb{R}^n (typical n is 50–200), using iterative methods (trust region), at many x’s. This question is about finding a good initial value y\_0(x) for ea…

---

## [Inconsistent unknown selection in MTK with identical systems (@mtkcompile)](https://discourse.julialang.org/t/inconsistent-unknown-selection-in-mtk-with-identical-systems-mtkcompile/137225)

<div class="topic-metadata">

**Author:** [@celia.bat](https://discourse.julialang.org/u/celia.bat)\
**Replies:** 3\
**Last updated:** [May 22, 2026, 5:01pm UTC](https://discourse.julialang.org/t/inconsistent-unknown-selection-in-mtk-with-identical-systems-mtkcompile/137225 "2026-05-22T17:01:13Z")

</div>

I encountered an inconsistent behavior with ModelingToolkit.jl regarding the selected unknowns after structural simplification / compilation. I built a minimal working example (MWE) where simply changing the name of one…

---

## [Ideal diode switching with multiple voltage sources in ModelingToolkit , solver gets stuck at t=0](https://discourse.julialang.org/t/ideal-diode-switching-with-multiple-voltage-sources-in-modelingtoolkit-solver-gets-stuck-at-t-0/137086)

<div class="topic-metadata">

**Author:** [@JaviJR](https://discourse.julialang.org/u/JaviJR)\
**Replies:** 48\
**Last updated:** [May 20, 2026, 10:59am UTC](https://discourse.julialang.org/t/ideal-diode-switching-with-multiple-voltage-sources-in-modelingtoolkit-solver-gets-stuck-at-t-0/137086 "2026-05-20T10:59:57Z")

</div>

Hi everyone, My research team and I have been working with Julia and ModelingToolkit for a while now and have obtained quite satisfactory results overall (our focus is on wind turbine modeling). Recently, however, we st…

---

## [Dyad - Warning: Verbosity toggle: max\_iters](https://discourse.julialang.org/t/dyad-warning-verbosity-toggle-max-iters/137133)

<div class="topic-metadata">

**Author:** [@gruemelmonster](https://discourse.julialang.org/u/gruemelmonster)\
**Replies:** 2\
**Last updated:** [May 15, 2026, 3:08pm UTC](https://discourse.julialang.org/t/dyad-warning-verbosity-toggle-max-iters/137133 "2026-05-15T15:08:11Z")

</div>

I build a model of a grid rectifier with some diodes and switches (fsw ~50kHz). The simulation results look quite good, but I am getting this warning: ┌ Warning: Verbosity toggle: max\_iters │ Interrupted. Larger maxi…

---

## [Avoiding Mutation vs Allocation](https://discourse.julialang.org/t/avoiding-mutation-vs-allocation/137123)

<div class="topic-metadata">

**Author:** [@johnb](https://discourse.julialang.org/u/johnb)\
**Replies:** 7\
**Last updated:** [May 15, 2026, 2:35pm UTC](https://discourse.julialang.org/t/avoiding-mutation-vs-allocation/137123 "2026-05-15T14:35:33Z")

</div>

I’ve been writing code for dynamic models in Julia for a few years now, and I keep running into a conflict between allocations and mutation. To improve ODE solve performance, I need to write in-place functions and preall…

---

## [MTK programmatic populating initial guess values](https://discourse.julialang.org/t/mtk-programmatic-populating-initial-guess-values/136912)

<div class="topic-metadata">

**Author:** [@mark.garnett](https://discourse.julialang.org/u/mark.garnett)\
**Replies:** 4\
**Last updated:** [April 29, 2026, 3:36pm UTC](https://discourse.julialang.org/t/mtk-programmatic-populating-initial-guess-values/136912 "2026-04-29T15:36:34Z")

</div>

Hi all, this should be really easy but I can’t quite figure it out. When you create an MTK system, and want to solve it as a NonlinearProblem, ODEProblem, or whatever, you often need provide an initial guess or initial …

---

## [Unpredictable Compilation Performance of MTK-Generated Functions](https://discourse.julialang.org/t/unpredictable-compilation-performance-of-mtk-generated-functions/136827)

<div class="topic-metadata">

**Author:** [@chen\_hardworking](https://discourse.julialang.org/u/chen_hardworking)\
**Replies:** 19\
**Last updated:** [April 24, 2026, 5:14am UTC](https://discourse.julialang.org/t/unpredictable-compilation-performance-of-mtk-generated-functions/136827 "2026-04-24T05:14:18Z")

</div>

Problem Statement: I am reporting a critical bottleneck regarding the compilation and loading stability of functions generated by ModelingToolkit.jl. My experience shows that the complexity of the generated symbolic Jaco…

---

## [How to improve structural\_simplify performance?](https://discourse.julialang.org/t/how-to-improve-structural-simplify-performance/127260)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 17\
**Last updated:** [April 23, 2026, 4:08am UTC](https://discourse.julialang.org/t/how-to-improve-structural-simplify-performance/127260 "2026-04-23T04:08:24Z")

</div>

Modelingtoolkits structural\_simplify can be very slow on bigger systems. What can I do to improve it’s performance? Should I write my equations in a certain way, should I split up big equations into smaller ones, or shou…

---

## [Modeling scale-up and economic factors in DYAD (bioprocess / fermentation)](https://discourse.julialang.org/t/modeling-scale-up-and-economic-factors-in-dyad-bioprocess-fermentation/136777)

<div class="topic-metadata">

**Author:** [@mpampuch](https://discourse.julialang.org/u/mpampuch)\
**Replies:** 1\
**Last updated:** [April 21, 2026, 6:27pm UTC](https://discourse.julialang.org/t/modeling-scale-up-and-economic-factors-in-dyad-bioprocess-fermentation/136777 "2026-04-21T18:27:29Z")

</div>

Hi all, I’m new to DYAD, so apologies if this is a basic question. I’m exploring whether DYAD is a good fit for modeling for my purposes, particularly modelling and analyzing the feasibility of fermentation systems. My…

---

## [Circuit measured using a sampling filter](https://discourse.julialang.org/t/circuit-measured-using-a-sampling-filter/136687)

<div class="topic-metadata">

**Author:** [@josujugo](https://discourse.julialang.org/u/josujugo)\
**Replies:** 10\
**Last updated:** [April 20, 2026, 10:14am UTC](https://discourse.julialang.org/t/circuit-measured-using-a-sampling-filter/136687 "2026-04-20T10:14:42Z")

</div>

Hi, I am trying to implement a digital filter for measuring (samplling and filtering) the voltage of a circuit. The RLC circuit is defined by an ODE. I’ve come up with a simulation using a callback for sampling, but th…

---

## [MTK - structurally singular initialization?](https://discourse.julialang.org/t/mtk-structurally-singular-initialization/136771)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 0\
**Last updated:** [April 18, 2026, 8:06pm UTC](https://discourse.julialang.org/t/mtk-structurally-singular-initialization/136771 "2026-04-18T20:06:40Z")

</div>

I have a somewhat complex model constructed from my own components. Doing mtkcompile produces a system with 18 unknowns and 18 equations: 14 DEs and 4 AEs. When I create the ODEProblem, I am told: Warning: The initiali…

---

## [Vibe-coded modelingtoolkit code generation for PDEs](https://discourse.julialang.org/t/vibe-coded-modelingtoolkit-code-generation-for-pdes/136701)

<div class="topic-metadata">

**Author:** [@ctessum](https://discourse.julialang.org/u/ctessum)\
**Replies:** 0\
**Last updated:** [April 13, 2026, 4:55pm UTC](https://discourse.julialang.org/t/vibe-coded-modelingtoolkit-code-generation-for-pdes/136701 "2026-04-13T16:55:53Z")

</div>

The current released version of ModelingToolkit.jl + MethodOfLines.jl doesn’t really work when the number of variables x the number of grid points is more than ~1,000. In case it is of interest, I’ve created some vibe-c…

---

## [MTK Components: PDE boundary conditions?](https://discourse.julialang.org/t/mtk-components-pde-boundary-conditions/136689)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 0\
**Last updated:** [April 12, 2026, 2:29pm UTC](https://discourse.julialang.org/t/mtk-components-pde-boundary-conditions/136689 "2026-04-12T14:29:50Z")

</div>

I have a distributed pipe model connected to a hydraulic port with “potential” p (pressure), and mass flow rate as Flow. So with two PDEs (one in pressure, one in mass flow rate) + some AEs, what is the correct way to c…

---

## [\[GSoC '26\] The Illusion of Uniformity: Non-Uniform Grids & Zero-Overhead Dispatch in MOL.jl](https://discourse.julialang.org/t/gsoc-26-the-illusion-of-uniformity-non-uniform-grids-zero-overhead-dispatch-in-mol-jl/136639)

<div class="topic-metadata">

**Author:** [@Utku\_Yilmaz](https://discourse.julialang.org/u/Utku_Yilmaz)\
**Replies:** 0\
**Last updated:** [April 9, 2026, 10:00am UTC](https://discourse.julialang.org/t/gsoc-26-the-illusion-of-uniformity-non-uniform-grids-zero-overhead-dispatch-in-mol-jl/136639 "2026-04-09T10:00:18Z")

</div>

Hi everyone, As part of my GSoC 2026 prep for MethodOfLines.jl, I just published a short devlog on bringing non-uniform grid support to high-order schemes like WENO. My post, “The Illusion of Uniformity,” outlines the a…

---

## [The role of parameter p in the SciML ecosystem](https://discourse.julialang.org/t/the-role-of-parameter-p-in-the-sciml-ecosystem/136363)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [March 24, 2026, 9:54pm UTC](https://discourse.julialang.org/t/the-role-of-parameter-p-in-the-sciml-ecosystem/136363 "2026-03-24T21:54:13Z")

</div>

Many (most?) of the SciML libraries feature a parameter p in their high-level API. I would like to learn more about the motivation for this design, and the actual specs for what it can be and what it is intended for. Eg…

---

## [Create a delay element with DelayDiffEq](https://discourse.julialang.org/t/create-a-delay-element-with-delaydiffeq/136349)

<div class="topic-metadata">

**Author:** [@VPBML](https://discourse.julialang.org/u/VPBML)\
**Replies:** 0\
**Last updated:** [March 23, 2026, 8:09pm UTC](https://discourse.julialang.org/t/create-a-delay-element-with-delaydiffeq/136349 "2026-03-23T20:09:21Z")

</div>

Hi, I am trying to simulate this simple example of a step input signal to a First Order Plus Delay process with ModelingToolkit and DelayDiffEq but it runs into an error. I wonder if it is possible to make this approach…

---

## [Cannot use AD as shown in ControlSystems.jl example](https://discourse.julialang.org/t/cannot-use-ad-as-shown-in-controlsystems-jl-example/136292)

<div class="topic-metadata">

**Author:** [@vtfanta](https://discourse.julialang.org/u/vtfanta)\
**Replies:** 2\
**Last updated:** [March 19, 2026, 7:18pm UTC](https://discourse.julialang.org/t/cannot-use-ad-as-shown-in-controlsystems-jl-example/136292 "2026-03-19T19:18:51Z")

</div>

I’m trying to replicate the example of using AD with ControlSystems.jl from the JuliaCon 2022 presentation (this moment), but the ForwardDiff gradient calculation errors, since there is the matrix exponential LinearAlgeb…

---

## [@mtkcompile / System(...): unknowns and required u0 change when I rename a component](https://discourse.julialang.org/t/mtkcompile-system-unknowns-and-required-u0-change-when-i-rename-a-component/136071)

<div class="topic-metadata">

**Author:** [@celia.bat](https://discourse.julialang.org/u/celia.bat)\
**Replies:** 4\
**Last updated:** [March 18, 2026, 4:33pm UTC](https://discourse.julialang.org/t/mtkcompile-system-unknowns-and-required-u0-change-when-i-rename-a-component/136071 "2026-03-18T16:33:55Z")

</div>

Hi everyone, I am working with a fairly large ModelingToolkit model built from components. I compile it with something like: @mtkcompile sys = System(assembly, t; systems = elements) where elements is the list of the …

---

## [ODE stepping with discrete input](https://discourse.julialang.org/t/ode-stepping-with-discrete-input/136104)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 5\
**Last updated:** [March 17, 2026, 10:32pm UTC](https://discourse.julialang.org/t/ode-stepping-with-discrete-input/136104 "2026-03-17T22:32:03Z")

</div>

Hi I am using DiffEq with manual solver stepping and piecewise constant inputs. This image shows an integrator \\frac{dx}{dt} = u with a switching input 0 or 1. Hence the state should never decrease, but it does. O…

---

## [How to display the differential equations from Catalyst.jl?](https://discourse.julialang.org/t/how-to-display-the-differential-equations-from-catalyst-jl/136203)

<div class="topic-metadata">

**Author:** [@tp2750](https://discourse.julialang.org/u/tp2750)\
**Replies:** 1\
**Last updated:** [March 14, 2026, 5:41pm UTC](https://discourse.julialang.org/t/how-to-display-the-differential-equations-from-catalyst-jl/136203 "2026-03-14T17:41:59Z")

</div>

I can not get this example in Introduction to Catalyst · Catalyst.jl to work. It gives the following error: julia\> odesys = convert(ODESystem, rn) ERROR: MethodError: Cannot \`convert\` an object of type ReactionSystem{C…

---

## [MTK & linearization with analysis points](https://discourse.julialang.org/t/mtk-linearization-with-analysis-points/136165)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 9\
**Last updated:** [March 14, 2026, 11:21am UTC](https://discourse.julialang.org/t/mtk-linearization-with-analysis-points/136165 "2026-03-14T11:21:08Z")

</div>

I am playing around with MTK v11 (v11.14) and trying to understand connectors, components + signals. My code now work, and I can specify signals. I use a chemical reactor (liquid phase) as an example, where the temperatu…

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

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