# Modelling & Simulations

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

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

**Page:** 50

---

## [Seeking Tips for Solving an ODE with DifferentialEquations](https://discourse.julialang.org/t/seeking-tips-for-solving-an-ode-with-differentialequations/76311)

<div class="topic-metadata">

**Author:** [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Replies:** 4\
**Last updated:** [February 19, 2022, 4:45pm UTC](https://discourse.julialang.org/t/seeking-tips-for-solving-an-ode-with-differentialequations/76311 "2022-02-19T16:45:33Z")

</div>

Our package QuantumAnnealing solves ODEs that arise in design of quantum annealing algorithms. The package includes two solution methods simulate (a hand crafted solution) and simulate\_de (a generic solution approach usi…

---

## [Global Sensitivity Analysis for an ODE model where not all parameter sets give a result](https://discourse.julialang.org/t/global-sensitivity-analysis-for-an-ode-model-where-not-all-parameter-sets-give-a-result/76654)

<div class="topic-metadata">

**Author:** [@TS-CUBED](https://discourse.julialang.org/u/TS-CUBED)\
**Replies:** 3\
**Last updated:** [February 17, 2022, 10:28pm UTC](https://discourse.julialang.org/t/global-sensitivity-analysis-for-an-ode-model-where-not-all-parameter-sets-give-a-result/76654 "2022-02-17T22:28:49Z")

</div>

We are trying to do a global sensitivity analysis on a model that is described as ODEs (acausal model with MTK 7). The Sobol analysis works fine if the parameter space is benign, i.e. all the parameter sets allow the OD…

---

## [Weird environmental issue with ModelingToolkit](https://discourse.julialang.org/t/weird-environmental-issue-with-modelingtoolkit/76531)

<div class="topic-metadata">

**Author:** [@anandpathak31](https://discourse.julialang.org/u/anandpathak31)\
**Replies:** 6\
**Last updated:** [February 17, 2022, 9:49pm UTC](https://discourse.julialang.org/t/weird-environmental-issue-with-modelingtoolkit/76531 "2022-02-17T21:49:03Z")

</div>

I am facing a weird environmental issue in solving an SDESystem using modelingtoolkit in Pluto. It was working fine untill today and it started giving this UndefVarError shown below. It started when I accidentally interr…

---

## [Finding points in a Delaunay triangulation](https://discourse.julialang.org/t/finding-points-in-a-delaunay-triangulation/71154)

<div class="topic-metadata">

**Author:** [@jmaffi](https://discourse.julialang.org/u/jmaffi)\
**Replies:** 14\
**Last updated:** [February 16, 2022, 9:26pm UTC](https://discourse.julialang.org/t/finding-points-in-a-delaunay-triangulation/71154 "2022-02-16T21:26:45Z")

</div>

Hello everyone, Is there a specific package/function that computes the id’s of the simplices that contain a given (probably large) set of points in a n-d Delaunay triangulation? Something equivalent to Matlab’s tsearchn …

---

## [Future plan for realtime computing?](https://discourse.julialang.org/t/future-plan-for-realtime-computing/76282)

<div class="topic-metadata">

**Author:** [@pepperoni](https://discourse.julialang.org/u/pepperoni)\
**Replies:** 1\
**Last updated:** [February 12, 2022, 12:01pm UTC](https://discourse.julialang.org/t/future-plan-for-realtime-computing/76282 "2022-02-12T12:01:10Z")

</div>

Is there futur plan to make JuliaSim/MTK/DifferentialEquation support realtime computing? my lab make a good use of software in the loop (SIL) and hardware in the loop (HIL) simulation with various setup such as SpeedGoa…

---

## [ModellingToolkit system with ODEForwardSensitivityProblem](https://discourse.julialang.org/t/modellingtoolkit-system-with-odeforwardsensitivityproblem/76093)

<div class="topic-metadata">

**Author:** [@ap2013](https://discourse.julialang.org/u/ap2013)\
**Replies:** 1\
**Last updated:** [February 9, 2022, 11:37pm UTC](https://discourse.julialang.org/t/modellingtoolkit-system-with-odeforwardsensitivityproblem/76093 "2022-02-09T23:37:32Z")

</div>

Hi, I am using ModellingToolkit to define a system following the spring-mass example in the documentation. I solve the ODEForwardSensitivityProblem of the system. The problem is when I try to access the states of the s…

---

## [Possibility of reducing memory usage EnsembleProblem](https://discourse.julialang.org/t/possibility-of-reducing-memory-usage-ensembleproblem/76019)

<div class="topic-metadata">

**Author:** [@Brent](https://discourse.julialang.org/u/Brent)\
**Replies:** 1\
**Last updated:** [February 8, 2022, 1:22pm UTC](https://discourse.julialang.org/t/possibility-of-reducing-memory-usage-ensembleproblem/76019 "2022-02-08T13:22:06Z")

</div>

I was wondering if it is possible to reduce the memory usage of an EnsembleProblem for large numbers of trajectories, for instance by saving to a file between batches. I’m currently running into the issue of being limite…

---

## [Best way to export Catalyst models to SBML format](https://discourse.julialang.org/t/best-way-to-export-catalyst-models-to-sbml-format/75951)

<div class="topic-metadata">

**Author:** [@Polina](https://discourse.julialang.org/u/Polina)\
**Replies:** 2\
**Last updated:** [February 7, 2022, 2:16pm UTC](https://discourse.julialang.org/t/best-way-to-export-catalyst-models-to-sbml-format/75951 "2022-02-07T14:16:59Z")

</div>

Hello! I know it is possible to import SBML to Catalyst ReactionSystem using https://github.com/SciML/SBMLToolkit.jl However, I’m having troubles to find out what is the best way to export Catalyst models to SBML forma…

---

## [AutoDiff of function inverse?](https://discourse.julialang.org/t/autodiff-of-function-inverse/75868)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 5\
**Last updated:** [February 5, 2022, 6:55pm UTC](https://discourse.julialang.org/t/autodiff-of-function-inverse/75868 "2022-02-05T18:55:24Z")

</div>

I am using a time-dependent invertible map to define a moving geometry: ξ=f(x,t) where ξ,x have the same dimension. For example, this might be a time-varying shift and rotation ξ=R(θ(t))\*(x-x₀(t)), or it might be somethi…

---

## [Problems using SolveDSGE.jl](https://discourse.julialang.org/t/problems-using-solvedsge-jl/75787)

<div class="topic-metadata">

**Author:** [@rgouveiamendes](https://discourse.julialang.org/u/rgouveiamendes)\
**Replies:** 0\
**Last updated:** [February 4, 2022, 11:07am UTC](https://discourse.julialang.org/t/problems-using-solvedsge-jl/75787 "2022-02-04T11:07:41Z")

</div>

Hello everyone, I am trying to estimate the following model with SolveDSGE: states: a, k end jumps: c, muc, n end shocks: ε end parameters: α = 0.4 β = 0.99 δ = 0.1 γ = 0.1 ρ = 0.9 θ = 5.0 sd = 0.01 end equat…

---

## [RigidBodyDynamics - simulate multi link mechanism](https://discourse.julialang.org/t/rigidbodydynamics-simulate-multi-link-mechanism/75625)

<div class="topic-metadata">

**Author:** [@kobied](https://discourse.julialang.org/u/kobied)\
**Replies:** 1\
**Last updated:** [February 3, 2022, 12:27am UTC](https://discourse.julialang.org/t/rigidbodydynamics-simulate-multi-link-mechanism/75625 "2022-02-03T00:27:04Z")

</div>

Hello, I’m trying to simulate a multi-link mechanism. Based on the “double pendulum” example, I was able to define my mechanism, so far so good, my issue is this: In my dynamic simulation there are times when I need t…

---

## [Unkown connection number for ModelingToolkit system](https://discourse.julialang.org/t/unkown-connection-number-for-modelingtoolkit-system/75337)

<div class="topic-metadata">

**Author:** [@Antomek](https://discourse.julialang.org/u/Antomek)\
**Replies:** 6\
**Last updated:** [January 29, 2022, 7:36pm UTC](https://discourse.julialang.org/t/unkown-connection-number-for-modelingtoolkit-system/75337 "2022-01-29T19:36:04Z")

</div>

Hello everyone, I’ve run into a challenge with using ModelingToolkit, where I have a lots of (similar) systems, each with lots of inputs from a number of other systems connected to it. Because of the large number of sy…

---

## [Getting correct namespacing of subsystems in ModelingToolkit.jl](https://discourse.julialang.org/t/getting-correct-namespacing-of-subsystems-in-modelingtoolkit-jl/75189)

<div class="topic-metadata">

**Author:** [@Antomek](https://discourse.julialang.org/u/Antomek)\
**Replies:** 1\
**Last updated:** [January 26, 2022, 4:54pm UTC](https://discourse.julialang.org/t/getting-correct-namespacing-of-subsystems-in-modelingtoolkit-jl/75189 "2022-01-26T16:54:06Z")

</div>

Hello, I really like ModelingToolkit, but I am running into some issues I hope someone can help me with. My usecase is building lots of similar / identical systems, and connecting them in a specific way (where maybe th…

---

## [Flight Dynamic Models](https://discourse.julialang.org/t/flight-dynamic-models/31455)

<div class="topic-metadata">

**Author:** [@tog](https://discourse.julialang.org/u/tog)\
**Replies:** 15\
**Last updated:** [January 26, 2022, 3:29am UTC](https://discourse.julialang.org/t/flight-dynamic-models/31455 "2022-01-26T03:29:17Z")

</div>

Hi All I am discovering the Julia community after a presentation from a colleagues and it looks amazing. I discovered that there exist a Satellite Toolbox. Is there already an initiative for building a flight dynamics…

---

## [Domain error in circuit DAE](https://discourse.julialang.org/t/domain-error-in-circuit-dae/73542)

<div class="topic-metadata">

**Author:** [@dfcaporale](https://discourse.julialang.org/u/dfcaporale)\
**Replies:** 7\
**Last updated:** [January 25, 2022, 2:11pm UTC](https://discourse.julialang.org/t/domain-error-in-circuit-dae/73542 "2022-01-25T14:11:53Z")

</div>

I’m trying to solve the following DAE: \\begin{cases} i\_R=C \\displaystyle \\frac{dV\_o}{dt} \\\\ i\_R= \\displaystyle \\frac{V\_{in}(t)-V\_o-nV\_T \\ln \\displaystyle (1+\\displaystyle \\frac{i\_R}{I\_s}) }{R} \\end{cas…

---

## [Equating ModelingToolkit parameters and variables?](https://discourse.julialang.org/t/equating-modelingtoolkit-parameters-and-variables/74642)

<div class="topic-metadata">

**Author:** [@AndreaRH](https://discourse.julialang.org/u/AndreaRH)\
**Replies:** 4\
**Last updated:** [January 23, 2022, 6:11pm UTC](https://discourse.julialang.org/t/equating-modelingtoolkit-parameters-and-variables/74642 "2022-01-23T18:11:35Z")

</div>

Hi! I have a first ODESystem with a parameter gNa and a second ODESystem with a variable g(t). How to create a third system that links the two together so that every time gNa appears in the first system we actually take…

---

## [Difficulties with the step function](https://discourse.julialang.org/t/difficulties-with-the-step-function/74603)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 4\
**Last updated:** [January 16, 2022, 2:23pm UTC](https://discourse.julialang.org/t/difficulties-with-the-step-function/74603 "2022-01-16T14:23:01Z")

</div>

Here I have a 6 X 3 array of agents. Each line has agents with the same age: the first line with age 20 and the last with age 25. I think I have no problems with the initialize function. But when I try to advance a step …

---

## [Oscillating loss curves using sciml\_train](https://discourse.julialang.org/t/oscillating-loss-curves-using-sciml-train/74225)

<div class="topic-metadata">

**Author:** [@clm](https://discourse.julialang.org/u/clm)\
**Replies:** 2\
**Last updated:** [January 10, 2022, 7:10pm UTC](https://discourse.julialang.org/t/oscillating-loss-curves-using-sciml-train/74225 "2022-01-10T19:10:01Z")

</div>

I’ve been trying to adapt one of the examples from Chris Rackauckas’s UDE paper, with the code here to a slightly more complicated form of equations and am running into difficulties with oscillatory loss curves. In his e…

---

## [How to specify nonhomogeneous system with ModelingToolkit](https://discourse.julialang.org/t/how-to-specify-nonhomogeneous-system-with-modelingtoolkit/74341)

<div class="topic-metadata">

**Author:** [@bgctw](https://discourse.julialang.org/u/bgctw)\
**Replies:** 2\
**Last updated:** [January 10, 2022, 3:43pm UTC](https://discourse.julialang.org/t/how-to-specify-nonhomogeneous-system-with-modelingtoolkit/74341 "2022-01-10T15:43:44Z")

</div>

DifferentialEquations.jl can deal with nonhomogeneous systems specified as an ODEProblem, where some parameter also depends on time. How do I specify the example as an ODESystem using ModelingToolkit? So far I tried: u…

---

## [Adomian polynomials](https://discourse.julialang.org/t/adomian-polynomials/74291)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 2\
**Last updated:** [January 10, 2022, 4:51am UTC](https://discourse.julialang.org/t/adomian-polynomials/74291 "2022-01-10T04:51:48Z")

</div>

Hi Everyone, I’d like to solve some ODEs using Adomian decomposition (which opens up approaches to model distributed delays, etc.) for a repository of epidemiological models: https://github.com/epirecipes/sir-julia/issu…

---

## [Coupled non-linear PDEs using DifferentialEquations.jl and the MOL](https://discourse.julialang.org/t/coupled-non-linear-pdes-using-differentialequations-jl-and-the-mol/74139)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 10\
**Last updated:** [January 8, 2022, 1:58pm UTC](https://discourse.julialang.org/t/coupled-non-linear-pdes-using-differentialequations-jl-and-the-mol/74139 "2022-01-08T13:58:39Z")

</div>

Hi everyone, I am trying to solve 2 coupled non-linear PDEs using the MOL with DifferentialEquations.jl and Finite differences first in 1D and I am stuck somewhere. My two equations describe the evolution of a porosity…

---

## [TCAD and julia?](https://discourse.julialang.org/t/tcad-and-julia/49590)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 3\
**Last updated:** [January 4, 2022, 8:38pm UTC](https://discourse.julialang.org/t/tcad-and-julia/49590 "2022-01-04T20:38:05Z")

</div>

Is there a package which can solve drift-diffusion and Poisson’s equations for isotype heterojunctions? I think 1D would be enough. I am asking as I would be interested in understanding thermal emission or tunneling tra…

---

## [No method matching get\_connection\_type when connecting components](https://discourse.julialang.org/t/no-method-matching-get-connection-type-when-connecting-components/73990)

<div class="topic-metadata">

**Author:** [@jenrei](https://discourse.julialang.org/u/jenrei)\
**Replies:** 1\
**Last updated:** [January 4, 2022, 10:12am UTC](https://discourse.julialang.org/t/no-method-matching-get-connection-type-when-connecting-components/73990 "2022-01-04T10:12:31Z")

</div>

Hello, I’m trying to get a feeling for MTK by converting the electric circuit example for acasual component based modeling to thermal components. Unfortunately I get this error when I’m using connect: ht\_eqs = \[ co…

---

## [ModelingToolkit second derivative only gives first derivative](https://discourse.julialang.org/t/modelingtoolkit-second-derivative-only-gives-first-derivative/70703)

<div class="topic-metadata">

**Author:** [@ctessum](https://discourse.julialang.org/u/ctessum)\
**Replies:** 2\
**Last updated:** [January 3, 2022, 3:31am UTC](https://discourse.julialang.org/t/modelingtoolkit-second-derivative-only-gives-first-derivative/70703 "2022-01-03T03:31:47Z")

</div>

Hello, I’m running into an issue that has left me confused. Using ModelingToolkit v6.7.1, I (for example) want to simulate a falling object. So: @variables t \[unit = u"s"\] x(t) \[unit = u"m"\] v(t) \[unit = u"m/s"\] @param…

---

## [Using a linear combination of dataframe columns as a functional input](https://discourse.julialang.org/t/using-a-linear-combination-of-dataframe-columns-as-a-functional-input/73834)

<div class="topic-metadata">

**Author:** [@jdhooghe](https://discourse.julialang.org/u/jdhooghe)\
**Replies:** 0\
**Last updated:** [December 30, 2021, 8:13pm UTC](https://discourse.julialang.org/t/using-a-linear-combination-of-dataframe-columns-as-a-functional-input/73834 "2021-12-30T20:13:16Z")

</div>

Hello, I have a dataframe whose column names represent polynomial portions such as ‘xy’ and as such, are symbols. I want to take all of these column names, which include: :x :y :xy :xx :yy and add them together us…

---

## [Continuous analog of SavingCallback from DifferentialEquations.jl](https://discourse.julialang.org/t/continuous-analog-of-savingcallback-from-differentialequations-jl/73613)

<div class="topic-metadata">

**Author:** [@EvgenijGr](https://discourse.julialang.org/u/EvgenijGr)\
**Replies:** 7\
**Last updated:** [December 29, 2021, 4:52pm UTC](https://discourse.julialang.org/t/continuous-analog-of-savingcallback-from-differentialequations-jl/73613 "2021-12-29T16:52:33Z")

</div>

So, the problem that I wanted to solve is the following. For a system that I study I wanted to record time and phase state when F(x, t) = 0, where F(x, t) is some non-linear function. If F(x, t) is linear, then there is …

---

## [Trouble with NeuralPDE with ADAM optimizer on GPU](https://discourse.julialang.org/t/trouble-with-neuralpde-with-adam-optimizer-on-gpu/73622)

<div class="topic-metadata">

**Author:** [@vnikoofard](https://discourse.julialang.org/u/vnikoofard)\
**Replies:** 5\
**Last updated:** [December 26, 2021, 4:58am UTC](https://discourse.julialang.org/t/trouble-with-neuralpde-with-adam-optimizer-on-gpu/73622 "2021-12-26T04:58:06Z")

</div>

I’m trying to solve the dynamics of a massive particle on gravitational force by PINNs. The below code is inspired by an example in the documentation of NeuralPDE package. The problem is that the ADAM optimizer runs smoo…

---

## [Modeling dynamic economic systems using ModelingToolkit (MTK)](https://discourse.julialang.org/t/modeling-dynamic-economic-systems-using-modelingtoolkit-mtk/72861)

<div class="topic-metadata">

**Author:** [@finmod](https://discourse.julialang.org/u/finmod)\
**Replies:** 14\
**Last updated:** [December 23, 2021, 9:38pm UTC](https://discourse.julialang.org/t/modeling-dynamic-economic-systems-using-modelingtoolkit-mtk/72861 "2021-12-23T21:38:56Z")

</div>

I am seeking help in specifying a dynamic economic model in MTK. Although I have followed the evolution of MTK since its creation, I have difficulties with “function” as a function can be the whole model, a function of p…

---

## [Cannot return Result in OMJulia](https://discourse.julialang.org/t/cannot-return-result-in-omjulia/73406)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 11\
**Last updated:** [December 23, 2021, 8:43pm UTC](https://discourse.julialang.org/t/cannot-return-result-in-omjulia/73406 "2021-12-23T20:43:39Z")

</div>

@arun3688 arun3688 @JKRT RT @AnHeuermann AnHeuermann I am using OpenModelica and I am trying to read the output (i.e., s here). I tried several ways but could not succeed. Any idea to solve that? using OMJulia omc= O…

---

## [Zygote gradients with ensemble ODEs](https://discourse.julialang.org/t/zygote-gradients-with-ensemble-odes/65062)

<div class="topic-metadata">

**Author:** [@PavanChaggar](https://discourse.julialang.org/u/PavanChaggar)\
**Replies:** 16\
**Last updated:** [December 22, 2021, 9:24pm UTC](https://discourse.julialang.org/t/zygote-gradients-with-ensemble-odes/65062 "2021-12-22T21:24:34Z")

</div>

Hey, I’ve been doing some work on getting zygote gradients from ensemble problems. I tried extending the first example in the docs for local sensitivities but I’m getting an error that I’m not sure how to solve. I’m not…

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

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