# Modelling & Simulations

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

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

**Page:** 53

---

## [Error using DifferentialEquations.jl to simulate a reasonably common SDE](https://discourse.julialang.org/t/error-using-differentialequations-jl-to-simulate-a-reasonably-common-sde/68930)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 13\
**Last updated:** [September 30, 2021, 11:28am UTC](https://discourse.julialang.org/t/error-using-differentialequations-jl-to-simulate-a-reasonably-common-sde/68930 "2021-09-30T11:28:34Z")

</div>

I’m using DifferentialEquations.jl to try to simulate paths of the following SDE: dS = 0.0314 dt + v\*(-0.576) dW\_1 + v\*sqrt(1 - 0.576^2) dW\_2 d(v^2) = 0.035\*(0.636 - v^2) dt + 0.144 v^2 dW\_1 Sorry for the formatting, I…

---

## [Notebook on particle simulations](https://discourse.julialang.org/t/notebook-on-particle-simulations/68496)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 27\
**Last updated:** [September 25, 2021, 8:37pm UTC](https://discourse.julialang.org/t/notebook-on-particle-simulations/68496 "2021-09-25T20:37:37Z")

</div>

I have written a notebook on particle simulations using Julia, to be presented at the FortranCon this week: https://m3g.github.io/2021\_FortranCon/ (https://github.com/m3g/2021\_FortranCon) It may be interesting for stu…

---

## [Problem computing Jacobian with Symbolics.jl 3.3](https://discourse.julialang.org/t/problem-computing-jacobian-with-symbolics-jl-3-3/68336)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 5\
**Last updated:** [September 20, 2021, 7:59pm UTC](https://discourse.julialang.org/t/problem-computing-jacobian-with-symbolics-jl-3-3/68336 "2021-09-20T19:59:39Z")

</div>

I’m using Julia v.1.6.2 and the package Symbolic v.3.3. I have a simple script to compute that Jacobian that gives an error: typeusing Symbolics using LinearAlgebra renormI(x) = x ./ x\[\[end\],:\] homogenize(x) = \[x; o…

---

## [Using Symbolics to simplify Boolean algebra](https://discourse.julialang.org/t/using-symbolics-to-simplify-boolean-algebra/68473)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 4\
**Last updated:** [September 20, 2021, 7:31pm UTC](https://discourse.julialang.org/t/using-symbolics-to-simplify-boolean-algebra/68473 "2021-09-20T19:31:58Z")

</div>

Dear All, I would like to ask, if it would be possible to use Symbolics to simplify Boolean rules. For example using Symbolics x = SymbolicUtils.Sym{Real}(:x) simplify((x \> 1) & (x \> 2)) should return (x \> 1)? Or am…

---

## [ModelingToolkit parameter fit: keep some parameters fixed](https://discourse.julialang.org/t/modelingtoolkit-parameter-fit-keep-some-parameters-fixed/67760)

<div class="topic-metadata">

**Author:** [@misa](https://discourse.julialang.org/u/misa)\
**Replies:** 3\
**Last updated:** [September 20, 2021, 7:22pm UTC](https://discourse.julialang.org/t/modelingtoolkit-parameter-fit-keep-some-parameters-fixed/67760 "2021-09-20T19:22:12Z")

</div>

I am trying to fit parameters in a ModelingToolkit model using DiffEqParamEstim. This works well when fitting all parameters contained in the model, but I would like to keep some of them fixed. For example, in the follow…

---

## [How to choose which parameters to estimate in parameter estimation when using diffeqflux.sciml\_train and BBO?](https://discourse.julialang.org/t/how-to-choose-which-parameters-to-estimate-in-parameter-estimation-when-using-diffeqflux-sciml-train-and-bbo/68280)

<div class="topic-metadata">

**Author:** [@shwetank\_verma](https://discourse.julialang.org/u/shwetank_verma)\
**Replies:** 1\
**Last updated:** [September 16, 2021, 7:52pm UTC](https://discourse.julialang.org/t/how-to-choose-which-parameters-to-estimate-in-parameter-estimation-when-using-diffeqflux-sciml-train-and-bbo/68280 "2021-09-16T19:52:26Z")

</div>

Hey everyone, I am trying to do parameter estimation for a set of differential equations using diffeqflux\_sciml\_train and BBO. However, I would like to choose which parameters I want to estimate and which ones I don’t wa…

---

## [NamedVecs.jl - Is this a good idea?](https://discourse.julialang.org/t/namedvecs-jl-is-this-a-good-idea/68275)

<div class="topic-metadata">

**Author:** [@Per](https://discourse.julialang.org/u/Per)\
**Replies:** 4\
**Last updated:** [September 16, 2021, 4:41pm UTC](https://discourse.julialang.org/t/namedvecs-jl-is-this-a-good-idea/68275 "2021-09-16T16:41:49Z")

</div>

The Julia ecosystem is reaching a size where, if something seems like a good idea, there’s probably a package for it. And conversely, if there is no package, then there’s probably a reason why such a package is not a goo…

---

## [Speeding up DDE that interpolates past value at 3 indices](https://discourse.julialang.org/t/speeding-up-dde-that-interpolates-past-value-at-3-indices/67970)

<div class="topic-metadata">

**Author:** [@Amarantine](https://discourse.julialang.org/u/Amarantine)\
**Replies:** 7\
**Last updated:** [September 15, 2021, 9:25pm UTC](https://discourse.julialang.org/t/speeding-up-dde-that-interpolates-past-value-at-3-indices/67970 "2021-09-15T21:25:34Z")

</div>

On the example for DDE, there is a section talking about speeding up interpolation at a specific index. However, I’m wondering if I can do similar things with more than one, like 3, indices. I have a large model with 150…

---

## [Long training time using sciml\_train on universal DAE](https://discourse.julialang.org/t/long-training-time-using-sciml-train-on-universal-dae/46352)

<div class="topic-metadata">

**Author:** [@mbossart](https://discourse.julialang.org/u/mbossart)\
**Replies:** 18\
**Last updated:** [September 14, 2021, 5:49pm UTC](https://discourse.julialang.org/t/long-training-time-using-sciml-train-on-universal-dae/46352 "2021-09-14T17:49:30Z")

</div>

I’m hoping to gather some advice on how to speed up the following example, which attempts to train a NN to learn part of the dynamics of a DAE system. The first part below simply solves the true DAE in order to generate…

---

## [Solving simple electrostatic problem](https://discourse.julialang.org/t/solving-simple-electrostatic-problem/68046)

<div class="topic-metadata">

**Author:** [@isentropic](https://discourse.julialang.org/u/isentropic)\
**Replies:** 24\
**Last updated:** [September 14, 2021, 7:03am UTC](https://discourse.julialang.org/t/solving-simple-electrostatic-problem/68046 "2021-09-14T07:03:39Z")

</div>

I’m fairly new to PDE solving domain. Being overwhelmed with what julia offers GitHub - JuliaPDE/SurveyofPDEPackages: Survey of the packages of the Julia ecosystem for solving partial differential equations, I could deci…

---

## [JuAFEM read meshes created with gmsh](https://discourse.julialang.org/t/juafem-read-meshes-created-with-gmsh/40117)

<div class="topic-metadata">

**Author:** [@FrootLoops](https://discourse.julialang.org/u/FrootLoops)\
**Replies:** 0\
**Last updated:** [May 25, 2020, 11:06am UTC](https://discourse.julialang.org/t/juafem-read-meshes-created-with-gmsh/40117 "2020-05-25T11:06:29Z")

</div>

Hi everybody, is it possible to read gmsh meshes into JuAFEM? I just found a package for JuliaFEM and now I am wondering if there is a way to load/read meshes created with gmesh into JuaFEM. Edit: I would also be happy…

---

## [Using \`\`\`set\_state\`\`\`?](https://discourse.julialang.org/t/using-set-state/68045)

<div class="topic-metadata">

**Author:** [@pafloxy](https://discourse.julialang.org/u/pafloxy)\
**Replies:** 9\
**Last updated:** [September 12, 2021, 12:58pm UTC](https://discourse.julialang.org/t/using-set-state/68045 "2021-09-12T12:58:29Z")

</div>

Can someone elaborate on how to use set\_state while using parallel\_integrator .Specifically how exactly to specify the index of the state to be set.? I couldn’t interpret tht documentation provided on their website!

---

## [Julia crashes when doing parameter estimation for a system of differential equations in VScode](https://discourse.julialang.org/t/julia-crashes-when-doing-parameter-estimation-for-a-system-of-differential-equations-in-vscode/67859)

<div class="topic-metadata">

**Author:** [@shwetank\_verma](https://discourse.julialang.org/u/shwetank_verma)\
**Replies:** 9\
**Last updated:** [September 12, 2021, 8:48am UTC](https://discourse.julialang.org/t/julia-crashes-when-doing-parameter-estimation-for-a-system-of-differential-equations-in-vscode/67859 "2021-09-12T08:48:18Z")

</div>

I have written a battery model in Julia. This model already runs without any issues. I want to now do parameter estimation w.r.t to testing data using DiffEqFlux.jl . However, whenever I run the diffeqflux.scimltrain co…

---

## [Large-scale least squares with ModelingToolkit.jl?](https://discourse.julialang.org/t/large-scale-least-squares-with-modelingtoolkit-jl/67957)

<div class="topic-metadata">

**Author:** [@twadleigh](https://discourse.julialang.org/u/twadleigh)\
**Replies:** 1\
**Last updated:** [September 11, 2021, 2:15am UTC](https://discourse.julialang.org/t/large-scale-least-squares-with-modelingtoolkit-jl/67957 "2021-09-11T02:15:07Z")

</div>

I’m starting to dig deep into ModelingToolkit.jl with the intention of using it to model a version of the SLAM problem. Ultimately, SLAM problems end up looking like large-scale nonlinear least squares problems. Instead …

---

## [Confused about build\_function](https://discourse.julialang.org/t/confused-about-build-function/67946)

<div class="topic-metadata">

**Author:** [@gzheng](https://discourse.julialang.org/u/gzheng)\
**Replies:** 6\
**Last updated:** [September 10, 2021, 5:55pm UTC](https://discourse.julialang.org/t/confused-about-build-function/67946 "2021-09-10T17:55:01Z")

</div>

I wanted to do a very basic application of build\_function to test out modelingtoolkit.jl, but ran into issues. using ModelingToolkit @parameters a b @variables x y = x^2 z = x + a f\_y = build\_function(y, x) # This wo…

---

## [Specify the admissible region of SIS model when plotting its phase portrait, using streamplot](https://discourse.julialang.org/t/specify-the-admissible-region-of-sis-model-when-plotting-its-phase-portrait-using-streamplot/67688)

<div class="topic-metadata">

**Author:** [@GoH](https://discourse.julialang.org/u/GoH)\
**Replies:** 4\
**Last updated:** [September 4, 2021, 2:43pm UTC](https://discourse.julialang.org/t/specify-the-admissible-region-of-sis-model-when-plotting-its-phase-portrait-using-streamplot/67688 "2021-09-04T14:43:05Z")

</div>

Hi I am trying to visualize the phase space of SIS model, but here is what I obtained. The problem is the trajectories should on the line of S+I=1, but somehow they did not, in the plot. here is my code begin using…

---

## [Best way to define a set of differential equations?](https://discourse.julialang.org/t/best-way-to-define-a-set-of-differential-equations/67650)

<div class="topic-metadata">

**Author:** [@pafloxy](https://discourse.julialang.org/u/pafloxy)\
**Replies:** 6\
**Last updated:** [September 4, 2021, 9:11am UTC](https://discourse.julialang.org/t/best-way-to-define-a-set-of-differential-equations/67650 "2021-09-04T09:11:06Z")

</div>

Hi! I am using DifferentialEquations.jl for simulating trajectories over high-dimensional vector fields. For my case, the time-evolution function for each coordinate is generated by a pre-defined random function (\*\* sa…

---

## [How to adjust the density of streamplot in Julia?](https://discourse.julialang.org/t/how-to-adjust-the-density-of-streamplot-in-julia/67647)

<div class="topic-metadata">

**Author:** [@GoH](https://discourse.julialang.org/u/GoH)\
**Replies:** 1\
**Last updated:** [September 3, 2021, 3:08pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-density-of-streamplot-in-julia/67647 "2021-09-03T15:08:40Z")

</div>

Hi, I am trying to generate the phase space of the SI model, based on the example code in https://lazarusa.github.io/BeautifulMakie/FlowFields/streamplots3/ my code (in Pluto notebook) is begin using CairoMakie let …

---

## [Differential Equation solve problem](https://discourse.julialang.org/t/differential-equation-solve-problem/67587)

<div class="topic-metadata">

**Author:** [@hzgzh](https://discourse.julialang.org/u/hzgzh)\
**Replies:** 2\
**Last updated:** [September 3, 2021, 3:26am UTC](https://discourse.julialang.org/t/differential-equation-solve-problem/67587 "2021-09-03T03:26:15Z")

</div>

I have a dae problem to solve ,but always have singualar error, could someone help? using DifferentialEquations, Plots function ga!(du,u,p,t) t2=0.02; τ, kp, ki, tc=p du\[1\] = ki \* (u\[5\] - u\[2\]) …

---

## [Sensitivity analysis on Non-diagonal noise SDEs](https://discourse.julialang.org/t/sensitivity-analysis-on-non-diagonal-noise-sdes/67413)

<div class="topic-metadata">

**Author:** [@alvestad10](https://discourse.julialang.org/u/alvestad10)\
**Replies:** 1\
**Last updated:** [August 31, 2021, 10:06am UTC](https://discourse.julialang.org/t/sensitivity-analysis-on-non-diagonal-noise-sdes/67413 "2021-08-31T10:06:45Z")

</div>

I am trying to do a parameter optimization of an SDE with non-diagonal constant noise. A simplified version of the implementation is (SDE reduced to the simplest possible version which still have the problem) using Stoc…

---

## [\[MTK\] Interpolating observed variables](https://discourse.julialang.org/t/mtk-interpolating-observed-variables/66308)

<div class="topic-metadata">

**Author:** [@doppioandante](https://discourse.julialang.org/u/doppioandante)\
**Replies:** 9\
**Last updated:** [August 26, 2021, 11:55am UTC](https://discourse.julialang.org/t/mtk-interpolating-observed-variables/66308 "2021-08-26T11:55:38Z")

</div>

I am toying around with ModelingToolkit, I have a very simple algebraic model representing the voltage/current relationship in a ideal resistor: using ModelingToolkit, OrdinaryDiffEq @parameters R @variables t v(t) i(t…

---

## [EnsembleDistributed Progress bar](https://discourse.julialang.org/t/ensembledistributed-progress-bar/66825)

<div class="topic-metadata">

**Author:** [@ograsdijk](https://discourse.julialang.org/u/ograsdijk)\
**Replies:** 4\
**Last updated:** [August 24, 2021, 10:25am UTC](https://discourse.julialang.org/t/ensembledistributed-progress-bar/66825 "2021-08-24T10:25:56Z")

</div>

I’m running several thousand ODE simulations that take ~30s each, and I’d like to be able to track the progress. I haven’t found any method for including a progress bar within EnsembleDistributed(), without resorting to …

---

## [Catalyst/DifferentialEquations: Gillespie simulation not working for large chemical reaction networks](https://discourse.julialang.org/t/catalyst-differentialequations-gillespie-simulation-not-working-for-large-chemical-reaction-networks/66521)

<div class="topic-metadata">

**Author:** [@uagaug](https://discourse.julialang.org/u/uagaug)\
**Replies:** 2\
**Last updated:** [August 18, 2021, 2:10am UTC](https://discourse.julialang.org/t/catalyst-differentialequations-gillespie-simulation-not-working-for-large-chemical-reaction-networks/66521 "2021-08-18T02:10:00Z")

</div>

I have a large chemical reaction network that involves protein synthesis, degradation, binding, and catalysis. I was able to construct the network using Catalyst, and deterministic ODE simulation in Julia returns the sam…

---

## [Significant allocations with Callbacks (Tsit5)](https://discourse.julialang.org/t/significant-allocations-with-callbacks-tsit5/66467)

<div class="topic-metadata">

**Author:** [@Amarantine](https://discourse.julialang.org/u/Amarantine)\
**Replies:** 4\
**Last updated:** [August 16, 2021, 5:58pm UTC](https://discourse.julialang.org/t/significant-allocations-with-callbacks-tsit5/66467 "2021-08-16T17:58:40Z")

</div>

I have a reasonably optimized ODE problem where I used callback for terminating the integrator when some values get too large. Without callback I have (43 allocations: 16.23 KiB), and with callback I have (42,065,928 all…

---

## [Significant allocations with Callbacks with lazy interpolation (Vern methods)](https://discourse.julialang.org/t/significant-allocations-with-callbacks-with-lazy-interpolation-vern-methods/51080)

<div class="topic-metadata">

**Author:** [@Lachlan-Bn](https://discourse.julialang.org/u/Lachlan-Bn)\
**Replies:** 9\
**Last updated:** [August 16, 2021, 8:00am UTC](https://discourse.julialang.org/t/significant-allocations-with-callbacks-with-lazy-interpolation-vern-methods/51080 "2021-08-16T08:00:12Z")

</div>

I have a question that probably has a simple answer and is more conceptual, so I haven’t yet written a MWE. I have a small system with low error tolerance that, ignoring any callbacks, is reasonably efficient in terms o…

---

## [ModelingToolkit - MethodError on isequal()](https://discourse.julialang.org/t/modelingtoolkit-methoderror-on-isequal/66440)

<div class="topic-metadata">

**Author:** [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Replies:** 2\
**Last updated:** [August 15, 2021, 5:33pm UTC](https://discourse.julialang.org/t/modelingtoolkit-methoderror-on-isequal/66440 "2021-08-15T17:33:11Z")

</div>

My apologies if this is something really simple. I have looked at the docs and whatever examples I could find, but I am beginning to confuse the trees for the forest. Any directions would be greatly appreciated. I am tr…

---

## [How to make R, C, etc. parameters in Acausal Component-Based Model (ModelingToolkit example)](https://discourse.julialang.org/t/how-to-make-r-c-etc-parameters-in-acausal-component-based-model-modelingtoolkit-example/66115)

<div class="topic-metadata">

**Author:** [@TS-CUBED](https://discourse.julialang.org/u/TS-CUBED)\
**Replies:** 6\
**Last updated:** [August 11, 2021, 9:04am UTC](https://discourse.julialang.org/t/how-to-make-r-c-etc-parameters-in-acausal-component-based-model-modelingtoolkit-example/66115 "2021-08-11T09:04:39Z")

</div>

Hello, I am trying to move my models to the new ModelingToolkit framework and so far everything works nicely and it creates the models nicely. For simplicity I refer here to the example as outlined in Acausal Component…

---

## [EnsembleProblem: data saving and logging](https://discourse.julialang.org/t/ensembleproblem-data-saving-and-logging/66025)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 0\
**Last updated:** [August 8, 2021, 3:49pm UTC](https://discourse.julialang.org/t/ensembleproblem-data-saving-and-logging/66025 "2021-08-08T15:49:20Z")

</div>

Great job with the facilities for Monte Carlo Simulations. I have a couple of question about EnsembleProblem. From the docs, it follows that the data from all the trajectories is saved. Is it possible to use Welford’s o…

---

## [Why for loop doesn't work in my code](https://discourse.julialang.org/t/why-for-loop-doesnt-work-in-my-code/65567)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 24\
**Last updated:** [August 8, 2021, 2:59pm UTC](https://discourse.julialang.org/t/why-for-loop-doesnt-work-in-my-code/65567 "2021-08-08T14:59:31Z")

</div>

Hi dear friends, I have problem with for loop. I don’t know my code doesn’t enter and repeat in loop. using Plots plotly() Plots.PlotlyBackend() currentcap=zeros(1,250001); voltagecap=zeros(1,250001); currentind=zeros(…

---

## [OMJulia simulate command returns error](https://discourse.julialang.org/t/omjulia-simulate-command-returns-error/65612)

<div class="topic-metadata">

**Author:** [@cubakija](https://discourse.julialang.org/u/cubakija)\
**Replies:** 18\
**Last updated:** [August 7, 2021, 6:10pm UTC](https://discourse.julialang.org/t/omjulia-simulate-command-returns-error/65612 "2021-08-07T18:10:38Z")

</div>

Hi everyone, Someone can help me to fix below error, when trying to simulate model: ERROR: failed process: Process(C:/Users/USUARIO/AppData/Local/Temp/jl\_gGQfHg/RLC.exe, ProcessExited(3221225785)) \[3221225785\] Stacktr…

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

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