# Modelling & Simulations

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

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

**Page:** 14

---

## [BifurcationKit: record\_from\_solution Periodic Orbits](https://discourse.julialang.org/t/bifurcationkit-record-from-solution-periodic-orbits/123814)

<div class="topic-metadata">

**Author:** [@mmplac14](https://discourse.julialang.org/u/mmplac14)\
**Replies:** 6\
**Last updated:** [December 16, 2024, 10:35am UTC](https://discourse.julialang.org/t/bifurcationkit-record-from-solution-periodic-orbits/123814 "2024-12-16T10:35:40Z")

</div>

Hi! I am using BifurcationKit to compute the periodic orbits of the Jansen-Rit model from the first Hopf Point. I seem to be having issues computing them for y1 - y2. I am using record\_from\_solution to compute them for …

---

## [ModelingToolkit: (Transport) delay? Example: Inflow to one water reservoir is a delayed outflow from another](https://discourse.julialang.org/t/modelingtoolkit-transport-delay-example-inflow-to-one-water-reservoir-is-a-delayed-outflow-from-another/122654)

<div class="topic-metadata">

**Author:** [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Replies:** 6\
**Last updated:** [December 16, 2024, 9:33am UTC](https://discourse.julialang.org/t/modelingtoolkit-transport-delay-example-inflow-to-one-water-reservoir-is-a-delayed-outflow-from-another/122654 "2024-12-16T09:33:32Z")

</div>

Referring to @baggepinnen 's past response to the question about the possibility to model a delay using ModelingToolkit, I was just wondering if there has been any progress in this direction. Something along the line of d…

---

## [Integrate convolution symbolically to solve PDE](https://discourse.julialang.org/t/integrate-convolution-symbolically-to-solve-pde/123810)

<div class="topic-metadata">

**Author:** [@B4rtel](https://discourse.julialang.org/u/B4rtel)\
**Replies:** 2\
**Last updated:** [December 13, 2024, 9:32pm UTC](https://discourse.julialang.org/t/integrate-convolution-symbolically-to-solve-pde/123810 "2024-12-13T21:32:41Z")

</div>

I would like to solve a PDE with MethodOfLines.jl and ModellingToolkit.jl similar to the example docs.sciml.ai/MethodOfLines/stable/tutorials/PIDE/. My modification is to change the integral term. Instead of integrating …

---

## [ModelingToolkit, SciMLSensitivity: Computed parameter?](https://discourse.julialang.org/t/modelingtoolkit-scimlsensitivity-computed-parameter/123760)

<div class="topic-metadata">

**Author:** [@filip.cerny](https://discourse.julialang.org/u/filip.cerny)\
**Replies:** 1\
**Last updated:** [December 12, 2024, 2:50pm UTC](https://discourse.julialang.org/t/modelingtoolkit-scimlsensitivity-computed-parameter/123760 "2024-12-12T14:50:00Z")

</div>

I am working on a model of a leaky bucket using ModelingToolkit.jl. I was experimenting with fitting parameters of the model based on randomized data using SciMLSensitivity.jl. In the attached example, I define my consta…

---

## [Slow search fixed points dynamicalsystems.jl](https://discourse.julialang.org/t/slow-search-fixed-points-dynamicalsystems-jl/123757)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 0\
**Last updated:** [December 12, 2024, 1:03pm UTC](https://discourse.julialang.org/t/slow-search-fixed-points-dynamicalsystems-jl/123757 "2024-12-12T13:03:04Z")

</div>

Hello, I am search for fixed points for my discrete system and the search is too long. I have already tried to increase the tol parameter and it does not have any result. I don’t understand what the problem is. More pre…

---

## [ERROR: Tried to remove agent with ID 66 from the space, but that agent is not on the space](https://discourse.julialang.org/t/error-tried-to-remove-agent-with-id-66-from-the-space-but-that-agent-is-not-on-the-space/122674)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 7\
**Last updated:** [December 11, 2024, 5:12pm UTC](https://discourse.julialang.org/t/error-tried-to-remove-agent-with-id-66-from-the-space-but-that-agent-is-not-on-the-space/122674 "2024-12-11T17:12:25Z")

</div>

I was wondering what is most efficient and issue free way to create random positions for agents. At the moment Im using this where sides = \[1e3, 1e2, 5e2\] positions = \[sides .\* rand(SVector{3,Float64}) for \_ in 1:num…

---

## [ModelingToolkit & Fractional Differential Equations?](https://discourse.julialang.org/t/modelingtoolkit-fractional-differential-equations/123705)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 6\
**Last updated:** [December 11, 2024, 3:57pm UTC](https://discourse.julialang.org/t/modelingtoolkit-fractional-differential-equations/123705 "2024-12-11T15:57:35Z")

</div>

I noticed some time ago that someone discussed a new package on Fractional Differential Equation solvers – I had not heard of this before, so I didn’t pay much attention. Now, I see that in electrochemistry, it is relat…

---

## [Compatibility of alternative representation of Expressions with SymbolicUtils.jl](https://discourse.julialang.org/t/compatibility-of-alternative-representation-of-expressions-with-symbolicutils-jl/123707)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 1\
**Last updated:** [December 11, 2024, 3:50pm UTC](https://discourse.julialang.org/t/compatibility-of-alternative-representation-of-expressions-with-symbolicutils-jl/123707 "2024-12-11T15:50:52Z")

</div>

Hello, with my student we are trying to reproduce this Facebook’s paper (GitHub - facebookresearch/neural-rewriter: Learning to Perform Local Rewriting for Combinatorial Optimization) in Julia. At the moment, we use Met…

---

## [dSpace and Julia](https://discourse.julialang.org/t/dspace-and-julia/103209)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 8\
**Last updated:** [December 11, 2024, 10:58am UTC](https://discourse.julialang.org/t/dspace-and-julia/103209 "2024-12-11T10:58:46Z")

</div>

Today I talked on a social event with a number of professors for control engineering about Matlab and Julia. They all told me, they would love to replace Matlab with Julia, but they have dSpace control hardware that only…

---

## [Universal differential equations (UDE) with modern SciML stack (Lux, Enzyme, ...)](https://discourse.julialang.org/t/universal-differential-equations-ude-with-modern-sciml-stack-lux-enzyme/120869)

<div class="topic-metadata">

**Author:** [@nurban](https://discourse.julialang.org/u/nurban)\
**Replies:** 6\
**Last updated:** [December 10, 2024, 9:59pm UTC](https://discourse.julialang.org/t/universal-differential-equations-ude-with-modern-sciml-stack-lux-enzyme/120869 "2024-12-10T21:59:31Z")

</div>

I am interested in implementing training universal partial differential equation (UPDE) systems. I understand from @ChrisRackauckas that the SciML ecosystem is increasingly moving toward Lux and Enzyme. (And which opti…

---

## [Distributed ODE solving](https://discourse.julialang.org/t/distributed-ode-solving/123569)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 5\
**Last updated:** [December 10, 2024, 2:25pm UTC](https://discourse.julialang.org/t/distributed-ode-solving/123569 "2024-12-10T14:25:54Z")

</div>

Hi all, I am interested in been able to manually solve ODEs distributed as below. I am aware of ensembledistributed() however I want greater control over the outcome of each trajectory. My thinking is then to solve a se…

---

## [Solid boundary for ABM model](https://discourse.julialang.org/t/solid-boundary-for-abm-model/113984)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 28\
**Last updated:** [December 10, 2024, 1:18pm UTC](https://discourse.julialang.org/t/solid-boundary-for-abm-model/113984 "2024-12-10T13:18:07Z")

</div>

Hello everyone, I’m building a model where particles roam around randomly in 3d space. At the moment issue is that I want particles to be contained in space though what I see is that it escapes boundary and comes on the…

---

## [Auxiliary variable in MTK connector](https://discourse.julialang.org/t/auxiliary-variable-in-mtk-connector/121572)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 6\
**Last updated:** [December 10, 2024, 6:29am UTC](https://discourse.julialang.org/t/auxiliary-variable-in-mtk-connector/121572 "2024-12-10T06:29:33Z")

</div>

Consider the MTK Pin example. @connector Pin begin v(t) = 0.0, \[description = "Voltage"\] i(t), \[connect = Flow\] end Suppose I wanted to also define the auxiliary variable p(t) = v \* i (for power), such that I c…

---

## [Issues using a vector connector in ModelingToolkit for acausal modeling](https://discourse.julialang.org/t/issues-using-a-vector-connector-in-modelingtoolkit-for-acausal-modeling/123573)

<div class="topic-metadata">

**Author:** [@oswaldo](https://discourse.julialang.org/u/oswaldo)\
**Replies:** 1\
**Last updated:** [December 8, 2024, 2:32pm UTC](https://discourse.julialang.org/t/issues-using-a-vector-connector-in-modelingtoolkit-for-acausal-modeling/123573 "2024-12-08T14:32:32Z")

</div>

Hi, I’m modeling a three-reactor system with two chemical species. I’d like to define the concentration of species as a vector so that I can add more species later. Here is the code: using ModelingToolkit, DifferentialE…

---

## [Parameter inference problem with matrix inversions](https://discourse.julialang.org/t/parameter-inference-problem-with-matrix-inversions/123543)

<div class="topic-metadata">

**Author:** [@tom-plaa](https://discourse.julialang.org/u/tom-plaa)\
**Replies:** 8\
**Last updated:** [December 6, 2024, 9:23pm UTC](https://discourse.julialang.org/t/parameter-inference-problem-with-matrix-inversions/123543 "2024-12-06T21:23:36Z")

</div>

TLDR: I have a parameter inference problem that involves inferring a matrix of a linear system but I am having trouble with either avoiding the trivial solution (matrix = all zeros) or getting usable results. I have a s…

---

## [HarmonicBalance.jl: get\_independent\_variables: Method Error](https://discourse.julialang.org/t/harmonicbalance-jl-get-independent-variables-method-error/123536)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 3\
**Last updated:** [December 6, 2024, 2:59pm UTC](https://discourse.julialang.org/t/harmonicbalance-jl-get-independent-variables-method-error/123536 "2024-12-06T14:59:17Z")

</div>

A basic example of HarmonicBalance.jl fails. I am looking for ways to fix it. Advice is appreciated. julia\> using HarmonicBalance │ Package HarmonicBalance not found, but a package named HarmonicBalance is │ availab…

---

## [Differential Equation problem with Index](https://discourse.julialang.org/t/differential-equation-problem-with-index/123518)

<div class="topic-metadata">

**Author:** [@TheLazyFarmer](https://discourse.julialang.org/u/TheLazyFarmer)\
**Replies:** 3\
**Last updated:** [December 6, 2024, 4:27am UTC](https://discourse.julialang.org/t/differential-equation-problem-with-index/123518 "2024-12-06T04:27:04Z")

</div>

Hello, I have a model which I basically need to solve through the calculation of many differential equations by examining the surrounding values and such. I believe the equation is correctly being solved. However, there…

---

## [openBF: 1D blood flow simulations with Julia](https://discourse.julialang.org/t/openbf-1d-blood-flow-simulations-with-julia/9860)

<div class="topic-metadata">

**Author:** [@alemelis](https://discourse.julialang.org/u/alemelis)\
**Replies:** 17\
**Last updated:** [December 5, 2024, 7:18pm UTC](https://discourse.julialang.org/t/openbf-1d-blood-flow-simulations-with-julia/9860 "2024-12-05T19:18:34Z")

</div>

Hello there, I’d like to introduce to the Julia community my openBF package. openBF is a finite-volume solver for one-dimensional blood flow equation in networks of elastic (we are working on visco-elastic behaviour as …

---

## [Acausal modeling of a chemical mixing process with heating using ModelingToolkit.jl](https://discourse.julialang.org/t/acausal-modeling-of-a-chemical-mixing-process-with-heating-using-modelingtoolkit-jl/123475)

<div class="topic-metadata">

**Author:** [@oswaldo](https://discourse.julialang.org/u/oswaldo)\
**Replies:** 1\
**Last updated:** [December 5, 2024, 2:16pm UTC](https://discourse.julialang.org/t/acausal-modeling-of-a-chemical-mixing-process-with-heating-using-modelingtoolkit-jl/123475 "2024-12-05T14:16:26Z")

</div>

Hi, I’m starting to use ModelingToolkit.jl for chemical processes using an acausal approach. Here I’m showing an illustrative example of a simple mixing system with heating. Any feedback to make the model more efficient …

---

## [Optimization problem inside \`ODESystem\`](https://discourse.julialang.org/t/optimization-problem-inside-odesystem/123445)

<div class="topic-metadata">

**Author:** [@Sushrut\_Deshpande](https://discourse.julialang.org/u/Sushrut_Deshpande)\
**Replies:** 2\
**Last updated:** [December 4, 2024, 2:58pm UTC](https://discourse.julialang.org/t/optimization-problem-inside-odesystem/123445 "2024-12-04T14:58:55Z")

</div>

Hello, I am trying to solve an optimization problem with the variables of an ODESystem. I have a toy code below: using ModelingToolkit, DifferentialEquations, Optimization, OptimizationOptimJL,ForwardDiff, Optim using …

---

## [Indexing a residual of an InitializationProblem](https://discourse.julialang.org/t/indexing-a-residual-of-an-initializationproblem/123356)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 3\
**Last updated:** [December 4, 2024, 2:11pm UTC](https://discourse.julialang.org/t/indexing-a-residual-of-an-initializationproblem/123356 "2024-12-04T14:11:42Z")

</div>

I want to check the residual of the solution of an initializationproblem as done in this example: Initialization of ODESystems · ModelingToolkit.jl However, my model is quite a bit more complex than the one in the examp…

---

## [Changing mass matrix in DAE with callbacks?](https://discourse.julialang.org/t/changing-mass-matrix-in-dae-with-callbacks/123403)

<div class="topic-metadata">

**Author:** [@gvdeynde](https://discourse.julialang.org/u/gvdeynde)\
**Replies:** 1\
**Last updated:** [December 3, 2024, 6:29pm UTC](https://discourse.julialang.org/t/changing-mass-matrix-in-dae-with-callbacks/123403 "2024-12-03T18:29:48Z")

</div>

Is there an elegant and efficient way to modify the mass matrix of a DAE upon an event triggered by a ContinuousCallback? The problem I’m solving is a lumped model for flow in a system. A key parameter is the direction …

---

## [Namespacing Symbols in \`ModelingToolkit.calculate\_jacobian\`](https://discourse.julialang.org/t/namespacing-symbols-in-modelingtoolkit-calculate-jacobian/123337)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 2\
**Last updated:** [December 3, 2024, 4:41pm UTC](https://discourse.julialang.org/t/namespacing-symbols-in-modelingtoolkit-calculate-jacobian/123337 "2024-12-03T16:41:07Z")

</div>

I (think I) need to retrieve the Jacobian of an ODESystem, but with namespaces for each symbol. For example, calling calculate\_jacobian on a system below produces a matrix with symbols without namespaces. using Astrodyn…

---

## [Nonlinear differential equation struggling to solve](https://discourse.julialang.org/t/nonlinear-differential-equation-struggling-to-solve/123405)

<div class="topic-metadata">

**Author:** [@Mishal](https://discourse.julialang.org/u/Mishal)\
**Replies:** 1\
**Last updated:** [December 3, 2024, 1:29pm UTC](https://discourse.julialang.org/t/nonlinear-differential-equation-struggling-to-solve/123405 "2024-12-03T13:29:59Z")

</div>

Hi Guys Please refer to the attached code. The code solves a set of coupled differential equations. The code seems to work well for certain input parameters, however sometimes the system seems to be very stiff and does …

---

## [ERROR: UndefVarError: \`connect\` not defined in \`Main\`](https://discourse.julialang.org/t/error-undefvarerror-connect-not-defined-in-main/123244)

<div class="topic-metadata">

**Author:** [@Stephen](https://discourse.julialang.org/u/Stephen)\
**Replies:** 3\
**Last updated:** [November 29, 2024, 1:45pm UTC](https://discourse.julialang.org/t/error-undefvarerror-connect-not-defined-in-main/123244 "2024-11-29T13:45:21Z")

</div>

Hi, I’m reproducing the Acausal Modeling for Nonlinear Control and Analysis # =========================================================== # Example from https://www.youtube.com/watch?v=l3odTEy69UU&t=2488s # ============…

---

## [ABM Agents.jl model properties as a nested dictionary](https://discourse.julialang.org/t/abm-agents-jl-model-properties-as-a-nested-dictionary/123110)

<div class="topic-metadata">

**Author:** [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Replies:** 3\
**Last updated:** [November 29, 2024, 1:22pm UTC](https://discourse.julialang.org/t/abm-agents-jl-model-properties-as-a-nested-dictionary/123110 "2024-11-29T13:22:28Z")

</div>

Dear Julia and the Agents.jl community, I’m currently working on a multispecies agent-based model (ABM) with sardine and anchovy superindividuals, and I’m planning to transition to the multi-agent framework soon. My mod…

---

## [BifurcationKit: detecting fold bifurcation](https://discourse.julialang.org/t/bifurcationkit-detecting-fold-bifurcation/123096)

<div class="topic-metadata">

**Author:** [@mmplac14](https://discourse.julialang.org/u/mmplac14)\
**Replies:** 20\
**Last updated:** [November 28, 2024, 5:28pm UTC](https://discourse.julialang.org/t/bifurcationkit-detecting-fold-bifurcation/123096 "2024-11-28T17:28:01Z")

</div>

This post is related to my previous one. I am new to bifurcation analyis and I am working with BifurcationKit to reproduce the bifurcation analysis performed by Grimbert Faugueras on the Jansen-Rit model. Specifically,…

---

## [Difference between solutions obtained from ODE model and ModelingToolkit model](https://discourse.julialang.org/t/difference-between-solutions-obtained-from-ode-model-and-modelingtoolkit-model/123157)

<div class="topic-metadata">

**Author:** [@Maucejo](https://discourse.julialang.org/u/Maucejo)\
**Replies:** 3\
**Last updated:** [November 28, 2024, 9:41am UTC](https://discourse.julialang.org/t/difference-between-solutions-obtained-from-ode-model-and-modelingtoolkit-model/123157 "2024-11-28T09:41:21Z")

</div>

Hi all, I am starting using OrdinaryDiffEq and ModelingToolkit and try to learn how to use these packages properly. To this end, I took the double pendulum as an example. For the OrdinaryDiffEq model, I have implemented…

---

## [OptimizationSystem from a set of multiple equations](https://discourse.julialang.org/t/optimizationsystem-from-a-set-of-multiple-equations/122809)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 16\
**Last updated:** [November 28, 2024, 8:53am UTC](https://discourse.julialang.org/t/optimizationsystem-from-a-set-of-multiple-equations/122809 "2024-11-28T08:53:30Z")

</div>

I have a set of equations where there are some input variables and one output variable. I want to minimize the output variable, and thought to do this with an OptimizationProblem. In this example, distance is the only in…

---

## [Periodic solution to a forced oscillator ODE](https://discourse.julialang.org/t/periodic-solution-to-a-forced-oscillator-ode/123080)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 10\
**Last updated:** [November 27, 2024, 5:32pm UTC](https://discourse.julialang.org/t/periodic-solution-to-a-forced-oscillator-ode/123080 "2024-11-27T17:32:22Z")

</div>

I’m working with an ODE model. I’m looking for the periodic solution to a forced, non-conservative, non-linear and time-invariant oscillator. For example, something like x''(t) = - k (x(t) + 0.1 x^3(t)) - a x'(t) + A si…

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

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