# Modelling & Simulations

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

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

**Page:** 55

---

## [Issue solving 2D wave equation with ModelingToolkit.jl](https://discourse.julialang.org/t/issue-solving-2d-wave-equation-with-modelingtoolkit-jl/62963)

<div class="topic-metadata">

**Author:** [@apattyn](https://discourse.julialang.org/u/apattyn)\
**Replies:** 19\
**Last updated:** [June 17, 2021, 4:30pm UTC](https://discourse.julialang.org/t/issue-solving-2d-wave-equation-with-modelingtoolkit-jl/62963 "2021-06-17T16:30:25Z")

</div>

Issue I was looking at using ModelingToolkit.jl and was playing around by trying to solve the 2D wave equation. \\frac{d^{2}u}{dt^{2}} = c^{2}\\frac{d^{2}u}{dx^{2}} However, the solution it outputs isn’t what I would ex…

---

## [Problem with parameter estimation in a epidemiological model](https://discourse.julialang.org/t/problem-with-parameter-estimation-in-a-epidemiological-model/63043)

<div class="topic-metadata">

**Author:** [@fepra](https://discourse.julialang.org/u/fepra)\
**Replies:** 6\
**Last updated:** [June 16, 2021, 11:36pm UTC](https://discourse.julialang.org/t/problem-with-parameter-estimation-in-a-epidemiological-model/63043 "2021-06-16T23:36:46Z")

</div>

Hello, I’m new to Julia. I’m trying to estimate parameter of a system of differential equations for a epidemiological model. I can solve the system but i can’t fit the parameter to my data. function SEAIRD!(du, u, p, t) …

---

## [Generate structured problem matrices](https://discourse.julialang.org/t/generate-structured-problem-matrices/62688)

<div class="topic-metadata">

**Author:** [@matthiasbe](https://discourse.julialang.org/u/matthiasbe)\
**Replies:** 1\
**Last updated:** [June 10, 2021, 11:07pm UTC](https://discourse.julialang.org/t/generate-structured-problem-matrices/62688 "2021-06-10T23:07:04Z")

</div>

Hello, I am studying the low rank approximations of matrices, for example by truncated the Singular Value Decomposition of a matrix. In order to test any algorithm, I need some test matrices that have internal structur…

---

## [How to Use ModelingToolkit.jl Tearing Parallelism](https://discourse.julialang.org/t/how-to-use-modelingtoolkit-jl-tearing-parallelism/62576)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 3\
**Last updated:** [June 8, 2021, 1:29pm UTC](https://discourse.julialang.org/t/how-to-use-modelingtoolkit-jl-tearing-parallelism/62576 "2021-06-08T13:29:20Z")

</div>

In the documentation for ModelingToolkit.jl - Exposing More Parallelism By Tearing Algebraic Equations in ODESystems I read you can construct the ODEProblem / ODAEProblem and set parallel\_form to use the exposed parall…

---

## [Numerical difference between Julia and (C, Fortran, Python) for a chaotic damped driven pendulum](https://discourse.julialang.org/t/numerical-difference-between-julia-and-c-fortran-python-for-a-chaotic-damped-driven-pendulum/62195)

<div class="topic-metadata">

**Author:** [@mendeli](https://discourse.julialang.org/u/mendeli)\
**Replies:** 17\
**Last updated:** [June 8, 2021, 12:22am UTC](https://discourse.julialang.org/t/numerical-difference-between-julia-and-c-fortran-python-for-a-chaotic-damped-driven-pendulum/62195 "2021-06-08T00:22:17Z")

</div>

I wrote a simple code implementing a midpoint 2nd order Runge-Kutta method for a damped driven pendulum in different languages to compare run times. While the results were exactly the same for C, Fortran and Python (Fort…

---

## [Ideal diode: MTK+callbacks to mimic Verilog-A events?](https://discourse.julialang.org/t/ideal-diode-mtk-callbacks-to-mimic-verilog-a-events/62528)

<div class="topic-metadata">

**Author:** [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Replies:** 1\
**Last updated:** [June 7, 2021, 4:15pm UTC](https://discourse.julialang.org/t/ideal-diode-mtk-callbacks-to-mimic-verilog-a-events/62528 "2021-06-07T16:15:03Z")

</div>

Verilog-A-like circuit components I recently found examples how to use ModelingToolkit.jl to model electrical circuit components in a Verilog-A-esque fashion. Pretty neat!: → https://github.com/SciML/ModelingToolkit.jl…

---

## [Building large, modular models in Julia](https://discourse.julialang.org/t/building-large-modular-models-in-julia/20755)

<div class="topic-metadata">

**Author:** [@asprionj](https://discourse.julialang.org/u/asprionj)\
**Replies:** 13\
**Last updated:** [June 1, 2021, 2:42pm UTC](https://discourse.julialang.org/t/building-large-modular-models-in-julia/20755 "2021-06-01T14:42:11Z")

</div>

Hi, I’ll soon start building a modelling (and simulation) framework. There will be several “types” of model components (think “heater”, “valve”), with different “subtypes” (think “coil heater”, “electrically actuated pro…

---

## [What's wrong with my code that it's figure is not matched with simulation](https://discourse.julialang.org/t/whats-wrong-with-my-code-that-its-figure-is-not-matched-with-simulation/62104)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 2\
**Last updated:** [May 31, 2021, 9:33am UTC](https://discourse.julialang.org/t/whats-wrong-with-my-code-that-its-figure-is-not-matched-with-simulation/62104 "2021-05-31T09:33:34Z")

</div>

Dear friends. I am a newbie and I asked many questions to simulate a full-bridge rectifier through ACME.jl and the circuit is as follows: and the current is as follows my code using ACME.jl package in julia as fo…

---

## [I have problem with sampling Frequency when I use ACME.jl](https://discourse.julialang.org/t/i-have-problem-with-sampling-frequency-when-i-use-acme-jl/62082)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 7\
**Last updated:** [May 30, 2021, 8:12pm UTC](https://discourse.julialang.org/t/i-have-problem-with-sampling-frequency-when-i-use-acme-jl/62082 "2021-05-30T20:12:04Z")

</div>

Dear friends, I am simulating a simple electrical circuit in EMTP-RV software which is used in electrical engineering as follows: and the voltage waveform of resistor is as follows: now I just used ACME.jl packag…

---

## [I have the problem with frequency sampling](https://discourse.julialang.org/t/i-have-the-problem-with-frequency-sampling/62090)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 0\
**Last updated:** [May 30, 2021, 1:37pm UTC](https://discourse.julialang.org/t/i-have-the-problem-with-frequency-sampling/62090 "2021-05-30T13:37:09Z")

</div>

Dear friends, I simulated a full-bridge rectifier in EMTP-RV and the layout as well as current waveforms passing through diode 1 are as follows: while when I wrote the code by using ACME.jl package in julia as f…

---

## [How can I get a plot for y when I use ACME package](https://discourse.julialang.org/t/how-can-i-get-a-plot-for-y-when-i-use-acme-package/61996)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 5\
**Last updated:** [May 30, 2021, 5:21am UTC](https://discourse.julialang.org/t/how-can-i-get-a-plot-for-y-when-i-use-acme-package/61996 "2021-05-30T05:21:23Z")

</div>

Hello everyone, I am using an example of a ACME.jl package to use for my project in which I should simulate a RLC circuit in Julia, but I don’t know how can I plot y according to time. this is the code which I use from…

---

## [Performance of Ensemble Simulations on GPUs](https://discourse.julialang.org/t/performance-of-ensemble-simulations-on-gpus/61426)

<div class="topic-metadata">

**Author:** [@knn](https://discourse.julialang.org/u/knn)\
**Replies:** 4\
**Last updated:** [May 28, 2021, 7:13am UTC](https://discourse.julialang.org/t/performance-of-ensemble-simulations-on-gpus/61426 "2021-05-28T07:13:10Z")

</div>

We are currently analyzing the performance of ensemble simlations on CPUs and GPUs. In our case, we noticed that the ensemble simulation on the GPU with EnsembleGPUArray only stresses the GPU for about 6s. Nevertheless, …

---

## [Parametric or normal types for dispatching on materials](https://discourse.julialang.org/t/parametric-or-normal-types-for-dispatching-on-materials/61808)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 1\
**Last updated:** [May 27, 2021, 5:54am UTC](https://discourse.julialang.org/t/parametric-or-normal-types-for-dispatching-on-materials/61808 "2021-05-27T05:54:42Z")

</div>

When generating a type representing a material would it be better to generate types for every material or to create a parametric material type. What would you suggest and why? abstract type Material end struct Gold \<:…

---

## [Is there a workaround to render symbols from Symbolics.jl in Pluto.jl](https://discourse.julialang.org/t/is-there-a-workaround-to-render-symbols-from-symbolics-jl-in-pluto-jl/61198)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 4\
**Last updated:** [May 26, 2021, 8:27pm UTC](https://discourse.julialang.org/t/is-there-a-workaround-to-render-symbols-from-symbolics-jl-in-pluto-jl/61198 "2021-05-26T20:27:35Z")

</div>

When I use Symbolics.jl in Pluto.jl I get an invalid latex expression (at least for Mathjax). Is there a workaround to remove the text part from the output? I basically makes Symbolics.jl very bothersome to use. I …

---

## [Modeling Thermodynamic System in MTK](https://discourse.julialang.org/t/modeling-thermodynamic-system-in-mtk/61095)

<div class="topic-metadata">

**Author:** [@mbologna](https://discourse.julialang.org/u/mbologna)\
**Replies:** 1\
**Last updated:** [May 26, 2021, 8:21pm UTC](https://discourse.julialang.org/t/modeling-thermodynamic-system-in-mtk/61095 "2021-05-26T20:21:44Z")

</div>

I’m working on converting an existing Julia model using DifferentialEquations.jl and solving Stiff ODEs to using MTK. There seems to be some nuance to setting up ODESystems that I don’t understand. I’m modeling pressure …

---

## [JumpProblem with large number of jumps crashes](https://discourse.julialang.org/t/jumpproblem-with-large-number-of-jumps-crashes/61444)

<div class="topic-metadata">

**Author:** [@gzagatti](https://discourse.julialang.org/u/gzagatti)\
**Replies:** 13\
**Last updated:** [May 25, 2021, 8:00am UTC](https://discourse.julialang.org/t/jumpproblem-with-large-number-of-jumps-crashes/61444 "2021-05-25T08:00:06Z")

</div>

Hello, I am trying to solve a JumpProblem defined on a network. The problem consists of a SIR model in which I am trying to model every node of the network separately. I have a working code that works with a small net…

---

## [How to implement a real time DAE solver](https://discourse.julialang.org/t/how-to-implement-a-real-time-dae-solver/61719)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 12\
**Last updated:** [May 24, 2021, 4:13pm UTC](https://discourse.julialang.org/t/how-to-implement-a-real-time-dae-solver/61719 "2021-05-24T16:13:27Z")

</div>

I have the following solver: differential\_vars = ones(Bool, 36) prob = DAEProblem(residual!, yd0, y0, tspan, differential\_vars=differential\_vars) solver = IDA(linear\_solver=:Dense) @time sol = solve(prob, solver, save…

---

## [Macro capturing intermediate values](https://discourse.julialang.org/t/macro-capturing-intermediate-values/61715)

<div class="topic-metadata">

**Author:** [@MeinAccount](https://discourse.julialang.org/u/MeinAccount)\
**Replies:** 0\
**Last updated:** [May 24, 2021, 10:15am UTC](https://discourse.julialang.org/t/macro-capturing-intermediate-values/61715 "2021-05-24T10:15:30Z")

</div>

I just wanted to show of a fun little macro I wrote. Doing a course on stochastic simulation, I’m writing small functions that simulate some process. For performance reasons I don’t want to emit all the intermediate valu…

---

## [JuliaCon2020 Dynamical Modelling BoF summary](https://discourse.julialang.org/t/juliacon2020-dynamical-modelling-bof-summary/44099)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 5\
**Last updated:** [January 26, 2021, 9:14am UTC](https://discourse.julialang.org/t/juliacon2020-dynamical-modelling-bof-summary/44099 "2021-01-26T09:14:34Z")

</div>

Hi everyone, below you will find the summary of the BoF session of JuliaCon2020. I’ve tried to make everything sensible, feel free to correct me in the comments! Our working definition of “dynamical modelling” is: Mod…

---

## [Experience with using SimJulia](https://discourse.julialang.org/t/experience-with-using-simjulia/20232)

<div class="topic-metadata">

**Author:** [@stroebel](https://discourse.julialang.org/u/stroebel)\
**Replies:** 1\
**Last updated:** [May 23, 2021, 1:54am UTC](https://discourse.julialang.org/t/experience-with-using-simjulia/20232 "2021-05-23T01:54:19Z")

</div>

I am trying to follow along with one of the examples in the documentation of the library and in the code sample below I have the problem that the function silently “vanishes” at the line val = @yield ... and the simulati…

---

## [Parameters of IDA DAE solver](https://discourse.julialang.org/t/parameters-of-ida-dae-solver/61366)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [May 18, 2021, 6:45pm UTC](https://discourse.julialang.org/t/parameters-of-ida-dae-solver/61366 "2021-05-18T18:45:05Z")

</div>

I have the following code: using DifferentialEquations, Sundials, StaticArrays using Revise if ! @isdefined KPS3 includet("../src/KPS3.jl") using .KPS3 end my\_state = KPS3.get\_state() clear(my\_state) y0, yd0 =…

---

## [Help with solving a DDE](https://discourse.julialang.org/t/help-with-solving-a-dde/60205)

<div class="topic-metadata">

**Author:** [@Hossein\_Haghi](https://discourse.julialang.org/u/Hossein_Haghi)\
**Replies:** 10\
**Last updated:** [May 18, 2021, 4:44am UTC](https://discourse.julialang.org/t/help-with-solving-a-dde/60205 "2021-05-18T04:44:02Z")

</div>

Hi! I am trying to use Julia’s DifferentialEquations.jl package to solve DDE. I was able to solve my problem for two objects using the code below clearconsole() @time using DifferentialEquations const two\_bubble = le…

---

## [What recommended format of input parameters/options of a large hydrological model compiled as a Julia Package?](https://discourse.julialang.org/t/what-recommended-format-of-input-parameters-options-of-a-large-hydrological-model-compiled-as-a-julia-package/60561)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 2\
**Last updated:** [May 16, 2021, 10:59pm UTC](https://discourse.julialang.org/t/what-recommended-format-of-input-parameters-options-of-a-large-hydrological-model-compiled-as-a-julia-package/60561 "2021-05-16T22:59:55Z")

</div>

The question is what format (e.g. .csv, .txt etc…) would you recommend to read Inputs options/ parameters values of a large model https://github.com/manaakiwhenua/SoilWater\_ToolBox.git ? I was informed in Discourse that…

---

## [Julia packages for Multiscale Modelling of Multicellular Tissues?](https://discourse.julialang.org/t/julia-packages-for-multiscale-modelling-of-multicellular-tissues/61067)

<div class="topic-metadata">

**Author:** [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Replies:** 4\
**Last updated:** [May 13, 2021, 8:31pm UTC](https://discourse.julialang.org/t/julia-packages-for-multiscale-modelling-of-multicellular-tissues/61067 "2021-05-13T20:31:13Z")

</div>

I’m using Julia to program multicellular simulations. It’s working well and the simulations are very fast, but basically I was never able to use other packages in the core of my simulations. I read this preprint: whi…

---

## [Converting a toy example to DifferentialEquations](https://discourse.julialang.org/t/converting-a-toy-example-to-differentialequations/61070)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 16\
**Last updated:** [May 13, 2021, 5:16pm UTC](https://discourse.julialang.org/t/converting-a-toy-example-to-differentialequations/61070 "2021-05-13T17:16:23Z")

</div>

I am trying to convert the following Python example to Julia: """ Tutorial example showing how to use the implicit solver RADAU. It simulates a falling mass. """ import numpy as np import pylab as plt from assimulo.pro…

---

## [Getting started with Differential Equations](https://discourse.julialang.org/t/getting-started-with-differential-equations/61055)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [May 13, 2021, 1:25am UTC](https://discourse.julialang.org/t/getting-started-with-differential-equations/61055 "2021-05-13T01:25:36Z")

</div>

I am trying to port a simple example from Python to Julia, but already the first example from the Tutorial fails: using DifferentialEquations function lorenz(t, u, du) du\[1\] = 10.0(u\[2\]-u\[1\]) du\[2\] = u\[1\]\*(28.0…

---

## [Rodas5 and ModelingToolkit much slower than Sundials' IDA on large systems](https://discourse.julialang.org/t/rodas5-and-modelingtoolkit-much-slower-than-sundials-ida-on-large-systems/60712)

<div class="topic-metadata">

**Author:** [@bmetherall](https://discourse.julialang.org/u/bmetherall)\
**Replies:** 7\
**Last updated:** [May 13, 2021, 1:21am UTC](https://discourse.julialang.org/t/rodas5-and-modelingtoolkit-much-slower-than-sundials-ida-on-large-systems/60712 "2021-05-13T01:21:38Z")

</div>

I’m trying to solve a 1-D advection-diffusion-reaction equation which has been discretized into a set of ODEs. My code below is about 30x slower for n~1000 than a similar implementation as a DAEProblem solved with IDA().…

---

## [Diff eq parameter estimation](https://discourse.julialang.org/t/diff-eq-parameter-estimation/60730)

<div class="topic-metadata">

**Author:** [@isentropic](https://discourse.julialang.org/u/isentropic)\
**Replies:** 2\
**Last updated:** [May 10, 2021, 10:06am UTC](https://discourse.julialang.org/t/diff-eq-parameter-estimation/60730 "2021-05-10T10:06:30Z")

</div>

Dear DiffEq.jl users, I have N-body parallel (independent) simulation. Roughly, after applying most important optimizations like non-allocating and avoiding globals, my simulation for N=1000 runs for 5mins. This is all …

---

## [Optimization help: porting fmincon() to Julia](https://discourse.julialang.org/t/optimization-help-porting-fmincon-to-julia/60739)

<div class="topic-metadata">

**Author:** [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Replies:** 2\
**Last updated:** [May 9, 2021, 3:48pm UTC](https://discourse.julialang.org/t/optimization-help-porting-fmincon-to-julia/60739 "2021-05-09T15:48:39Z")

</div>

Problem I’m having problems porting fmincon() statements that appear to require “Generic nonlinear constraints” (using nonlcon). Here are the references I have used: https://www.mathworks.com/help/optim/ug/fmincon.html …

---

## [Question about structural\_simplify in ModelingToolkit](https://discourse.julialang.org/t/question-about-structural-simplify-in-modelingtoolkit/60568)

<div class="topic-metadata">

**Author:** [@CodeLenz](https://discourse.julialang.org/u/CodeLenz)\
**Replies:** 3\
**Last updated:** [May 5, 2021, 12:25pm UTC](https://discourse.julialang.org/t/question-about-structural-simplify-in-modelingtoolkit/60568 "2021-05-05T12:25:39Z")

</div>

It should be something simple, but I really cannot spot the error. Lets suppose I want to solve a simple mass-spring-damper problem m D2(x) + c D(x) + k x = f(t) Following MTK documentation I can use @parameters …

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

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