# Modelling & Simulations

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

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

**Page:** 39

---

## [DifferentialEquations extracting coefficients of dense interpolant](https://discourse.julialang.org/t/differentialequations-extracting-coefficients-of-dense-interpolant/93365)

<div class="topic-metadata">

**Author:** [@Bernard\_GODARD](https://discourse.julialang.org/u/Bernard_GODARD)\
**Replies:** 9\
**Last updated:** [February 26, 2023, 7:51pm UTC](https://discourse.julialang.org/t/differentialequations-extracting-coefficients-of-dense-interpolant/93365 "2023-02-26T19:51:16Z")

</div>

From the solution of a differential equation using Vern6, Vern7, Vern8 or Vern9, how can I extract the dense interpolant polynomial coefficients? Of course I could evaluate the polynomial on a grid of size order+1 insi…

---

## [Selecting a specific cycle to perform operation during a callback](https://discourse.julialang.org/t/selecting-a-specific-cycle-to-perform-operation-during-a-callback/94804)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 1\
**Last updated:** [February 25, 2023, 3:33pm UTC](https://discourse.julialang.org/t/selecting-a-specific-cycle-to-perform-operation-during-a-callback/94804 "2023-02-25T15:33:03Z")

</div>

Hi all, Below is a simple example of me performing a Kalman filtration on 3 periodic cycles of a model. We generate data for all 3 cycles and perform a Kalman filtration forcing the time step and utilising the integrato…

---

## [How to differentiate through the ODE solver (Discretize-then-Optimize)?](https://discourse.julialang.org/t/how-to-differentiate-through-the-ode-solver-discretize-then-optimize/95178)

<div class="topic-metadata">

**Author:** [@kcqpo](https://discourse.julialang.org/u/kcqpo)\
**Replies:** 1\
**Last updated:** [February 25, 2023, 10:01am UTC](https://discourse.julialang.org/t/how-to-differentiate-through-the-ode-solver-discretize-then-optimize/95178 "2023-02-25T10:01:08Z")

</div>

Does anyone know how to differentiate through the solver? I wanted to try to implement this technique over here Opening the Blackbox: Accelerating Neural Differential Equations by Regularizing Internal Solver Heuristics.…

---

## [Diode model not working as expected with ModelingToolkit](https://discourse.julialang.org/t/diode-model-not-working-as-expected-with-modelingtoolkit/95125)

<div class="topic-metadata">

**Author:** [@RagibHasin](https://discourse.julialang.org/u/RagibHasin)\
**Replies:** 4\
**Last updated:** [February 24, 2023, 1:49pm UTC](https://discourse.julialang.org/t/diode-model-not-working-as-expected-with-modelingtoolkit/95125 "2023-02-24T13:49:49Z")

</div>

I am trying to port Modelica.Electrical.Analog.Semiconductors.Diode. The code I came up with is: using ModelingToolkit using ModelingToolkitStandardLibrary.Blocks using ModelingToolkitStandardLibrary.Electrical using Or…

---

## [MathematicalSystems.jl with input constraint only](https://discourse.julialang.org/t/mathematicalsystems-jl-with-input-constraint-only/95123)

<div class="topic-metadata">

**Author:** [@bienpierre](https://discourse.julialang.org/u/bienpierre)\
**Replies:** 0\
**Last updated:** [February 24, 2023, 11:12am UTC](https://discourse.julialang.org/t/mathematicalsystems-jl-with-input-constraint-only/95123 "2023-02-24T11:12:58Z")

</div>

Dear all, I would like to know if there is a mathematical system structure with only input constraints, for instance: julia\> using LazySets julia\> using MathematicalSystems julia\> A = \[1 1; 0 0.9\] julia\> B = \[1; 0.5\] j…

---

## [Invariant manifolds for hyperbolic equilibria/fixed points](https://discourse.julialang.org/t/invariant-manifolds-for-hyperbolic-equilibria-fixed-points/95068)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 0\
**Last updated:** [February 23, 2023, 9:42am UTC](https://discourse.julialang.org/t/invariant-manifolds-for-hyperbolic-equilibria-fixed-points/95068 "2023-02-23T09:42:17Z")

</div>

I looked in DynamicalSystems.jl to find a function for calculating the invariant manifolds of a hyperbolic equilibrium point or a fixed point for a discrete system, but there doesn’t seem to be one. Is there a package de…

---

## [Agents.jl: Establishing a new space type](https://discourse.julialang.org/t/agents-jl-establishing-a-new-space-type/93915)

<div class="topic-metadata">

**Author:** [@Atiyah](https://discourse.julialang.org/u/Atiyah)\
**Replies:** 12\
**Last updated:** [February 22, 2023, 6:36pm UTC](https://discourse.julialang.org/t/agents-jl-establishing-a-new-space-type/93915 "2023-02-22T18:36:25Z")

</div>

I am attempting to establish a space type relevant to a sophisticated large-scale case study in SocioEconomics field, The existing code has been translated from Python code and now I am attempting to integrate Agents.jl …

---

## [Reinit! dynamicalsystems.jl](https://discourse.julialang.org/t/reinit-dynamicalsystems-jl/94620)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 4\
**Last updated:** [February 21, 2023, 6:01am UTC](https://discourse.julialang.org/t/reinit-dynamicalsystems-jl/94620 "2023-02-21T06:01:37Z")

</div>

Hello, I want to write code for an orbit diagram for a continuous system with a detailed setting, and I have a questions. Where can i find source code for function \_poincaresos from produce\_orbit diagram.jl? How do I bu…

---

## [How to create agents with rigid shape](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666)

<div class="topic-metadata">

**Author:** [@John\_Thomas](https://discourse.julialang.org/u/John_Thomas)\
**Replies:** 7\
**Last updated:** [February 16, 2023, 2:25am UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666 "2023-02-16T02:25:07Z")

</div>

Hello, recently I try to simulate the random walk movement of human cells. I need to make agents(cells) with certain radius and they have to move randomly. I want the cells to not overlap in their respective radii as t…

---

## [InteractiveDynamics: Unknown agent position type in Forest Fire and Game of Life](https://discourse.julialang.org/t/interactivedynamics-unknown-agent-position-type-in-forest-fire-and-game-of-life/94481)

<div class="topic-metadata">

**Author:** [@Jfschue](https://discourse.julialang.org/u/Jfschue)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 8:32pm UTC](https://discourse.julialang.org/t/interactivedynamics-unknown-agent-position-type-in-forest-fire-and-game-of-life/94481 "2023-02-14T20:32:34Z")

</div>

Hey folks, I am having an issue with one of my models that seems to work fine using just Agents.jl functionality (e.g., run!(), etc.), but fails when trying any of the animation or interactive functionality from Interact…

---

## [MethodOfLines & default vs. WENO scheme](https://discourse.julialang.org/t/methodoflines-default-vs-weno-scheme/94566)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 1\
**Last updated:** [February 13, 2023, 3:43pm UTC](https://discourse.julialang.org/t/methodoflines-default-vs-weno-scheme/94566 "2023-02-13T15:43:33Z")

</div>

OK – I solved a “stupid” gas pipe example with manual semi-discretization + ModelingToolkit and lots of help from @baggepinnen, “MTK & vector equations…”. Now, I have figured out the basic solution of the problem using…

---

## [The heat equation solution use MethodOfLines.jl](https://discourse.julialang.org/t/the-heat-equation-solution-use-methodoflines-jl/94331)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 12\
**Last updated:** [February 13, 2023, 11:31am UTC](https://discourse.julialang.org/t/the-heat-equation-solution-use-methodoflines-jl/94331 "2023-02-13T11:31:56Z")

</div>

the solution looks weird in https://docs.sciml.ai/MethodOfLines/stable/tutorials/heatss/ why its u(1, 1) = 0?

---

## [Using interpolation with unit verification in ModelingToolkit](https://discourse.julialang.org/t/using-interpolation-with-unit-verification-in-modelingtoolkit/93837)

<div class="topic-metadata">

**Author:** [@contradict](https://discourse.julialang.org/u/contradict)\
**Replies:** 1\
**Last updated:** [February 12, 2023, 10:46pm UTC](https://discourse.julialang.org/t/using-interpolation-with-unit-verification-in-modelingtoolkit/93837 "2023-02-12T22:46:59Z")

</div>

I am trying to build a simulation driven by tabulated data and use unit validation. This requires interpolation of the table, and it seems DataInterpolation.jl is the intended tool (Interpolations.jl could work, but I th…

---

## [Seems the new update SciMLBase results in the error of DiffEqOperators.jl](https://discourse.julialang.org/t/seems-the-new-update-scimlbase-results-in-the-error-of-diffeqoperators-jl/94463)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 2\
**Last updated:** [February 11, 2023, 2:41pm UTC](https://discourse.julialang.org/t/seems-the-new-update-scimlbase-results-in-the-error-of-diffeqoperators-jl/94463 "2023-02-11T14:41:13Z")

</div>

I understand that DiffEqOperators.jl will be deprecated but it is still useful for me to solve some PDEs. Can anyone suggest to me how to resolve this problem? using DiffEqOperators dx = 0.1 Δ1 = UpwindDifference(1,2, d…

---

## [Mu synthesis with RobustAndOptimalControl?](https://discourse.julialang.org/t/mu-synthesis-with-robustandoptimalcontrol/94427)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 9\
**Last updated:** [February 11, 2023, 2:23pm UTC](https://discourse.julialang.org/t/mu-synthesis-with-robustandoptimalcontrol/94427 "2023-02-11T14:23:18Z")

</div>

µ synthesis is a generalization of the controller design done using H infinity control. Is there a way to do µ synthesis using the RobustAndOptimalControl package?

---

## [About the implementation of SciMLOperators.FunctionOperator](https://discourse.julialang.org/t/about-the-implementation-of-scimloperators-functionoperator/93738)

<div class="topic-metadata">

**Author:** [@sbrisard](https://discourse.julialang.org/u/sbrisard)\
**Replies:** 8\
**Last updated:** [February 11, 2023, 10:30am UTC](https://discourse.julialang.org/t/about-the-implementation-of-scimloperators-functionoperator/93738 "2023-02-11T10:30:26Z")

</div>

I am looking into SciMLOperators to define convolution linear operators. I was wondering why FunctionOperator requires prototypes of the input and output. Would the sizes not be sufficient? Also, it seems to me that t…

---

## [Initial conditions as functions of parameters in ModelingToolkit?](https://discourse.julialang.org/t/initial-conditions-as-functions-of-parameters-in-modelingtoolkit/94438)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 2\
**Last updated:** [February 10, 2023, 10:23pm UTC](https://discourse.julialang.org/t/initial-conditions-as-functions-of-parameters-in-modelingtoolkit/94438 "2023-02-10T22:23:32Z")

</div>

Hi everyone, Is it possible to have initial conditions as functions of the parameters in ModelingToolkit?

---

## [MTK & vector equations -- get error message on "axes of broadcast not known"](https://discourse.julialang.org/t/mtk-vector-equations-get-error-message-on-axes-of-broadcast-not-known/94343)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 9\
**Last updated:** [February 9, 2023, 9:15pm UTC](https://discourse.julialang.org/t/mtk-vector-equations-get-error-message-on-axes-of-broadcast-not-known/94343 "2023-02-09T21:15:23Z")

</div>

OK… I’m finally trying to learn MTK by re-implementing old models from Modelica (i.e., the models work). Now, I’m doing a manual discretization of an advection PDE/simple gas pipe. It is not super realistic, but that is…

---

## [OpenFAST with Julia](https://discourse.julialang.org/t/openfast-with-julia/94267)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [February 8, 2023, 10:42am UTC](https://discourse.julialang.org/t/openfast-with-julia/94267 "2023-02-08T10:42:17Z")

</div>

OpenFAST is the standard wind turbine simulation tool from NREL, written in Fortran. OpenFAST · GitHub If I want to use it in Julia on Linux, what is the best approach? There are wrappers for Matlab and Python, but not…

---

## [ModelingToolkit: algebraic equations in likelihood and reverse-mode AD](https://discourse.julialang.org/t/modelingtoolkit-algebraic-equations-in-likelihood-and-reverse-mode-ad/94203)

<div class="topic-metadata">

**Author:** [@Brian\_Hartley](https://discourse.julialang.org/u/Brian_Hartley)\
**Replies:** 2\
**Last updated:** [February 7, 2023, 8:30pm UTC](https://discourse.julialang.org/t/modelingtoolkit-algebraic-equations-in-likelihood-and-reverse-mode-ad/94203 "2023-02-07T20:30:20Z")

</div>

TLDR - Is it possible to use both state / observed variables from ODESolution in a likelihood, without concatenating them ex post or using mutation? Maybe there is something dead-simple I’m missing! I’m starting to con…

---

## [ModelingToolkit - DiscreteUpdate](https://discourse.julialang.org/t/modelingtoolkit-discreteupdate/94183)

<div class="topic-metadata">

**Author:** [@jondavis847](https://discourse.julialang.org/u/jondavis847)\
**Replies:** 3\
**Last updated:** [February 7, 2023, 7:04pm UTC](https://discourse.julialang.org/t/modelingtoolkit-discreteupdate/94183 "2023-02-07T19:04:24Z")

</div>

Hello. I’m trying to implement discrete control in MTK using the DiscreteUpdate operator. It failed to update on my more complex model, seems to fail for a very basic MWE as well. using ModelingToolkit, DifferentialEqua…

---

## [MTK: interpolation of observed variables?](https://discourse.julialang.org/t/mtk-interpolation-of-observed-variables/94193)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 1\
**Last updated:** [February 7, 2023, 11:01am UTC](https://discourse.julialang.org/t/mtk-interpolation-of-observed-variables/94193 "2023-02-07T11:01:55Z")

</div>

Suppose I do a simulation of a model using ModelingToolkit.jl, where x is the state, y is an observed variable, and the solution object is sol. Then sol\[x\] sol\[y\] give vectors of the solution of x and y at the time poi…

---

## [Generating derived variables from ModelingToolkit.jl - variable of interest eliminated during structural\_simplify](https://discourse.julialang.org/t/generating-derived-variables-from-modelingtoolkit-jl-variable-of-interest-eliminated-during-structural-simplify/93939)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 8\
**Last updated:** [February 2, 2023, 10:56pm UTC](https://discourse.julialang.org/t/generating-derived-variables-from-modelingtoolkit-jl-variable-of-interest-eliminated-during-structural-simplify/93939 "2023-02-02T22:56:04Z")

</div>

Hi everyone, I’m trying to generate variables that are functions of my state variables in an ODE. Here’s my example. using ModelingToolkit using OrdinaryDiffEq @parameters t β c γ @variables S(t) I(t) R(t) λ(t) D = Di…

---

## [Combining ContinuousSpace with discrete grid property in InteractiveDynamics](https://discourse.julialang.org/t/combining-continuousspace-with-discrete-grid-property-in-interactivedynamics/93684)

<div class="topic-metadata">

**Author:** [@Niall](https://discourse.julialang.org/u/Niall)\
**Replies:** 7\
**Last updated:** [January 30, 2023, 5:27pm UTC](https://discourse.julialang.org/t/combining-continuousspace-with-discrete-grid-property-in-interactivedynamics/93684 "2023-01-30T17:27:10Z")

</div>

Hi, I’m writing simulations for a course on Agent-Based Modeling, and I’m struggling to combine discrete heatmaps with movement in a ContinuousSpace. In the following code, everything works fine until I add the final li…

---

## [Integral equations in ModelingToolkit](https://discourse.julialang.org/t/integral-equations-in-modelingtoolkit/74346)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 3\
**Last updated:** [January 30, 2023, 1:36pm UTC](https://discourse.julialang.org/t/integral-equations-in-modelingtoolkit/74346 "2023-01-30T13:36:26Z")

</div>

Hi Everyone, I’d like to know how/if the following integral equation can be solved in ModelingToolkit: using ModelingToolkit using DomainSets @parameters t β γ @variables S(..) I(..) R(..) It = Integral(t in DomainSet…

---

## [What's wrong with this system/circuit?](https://discourse.julialang.org/t/whats-wrong-with-this-system-circuit/93569)

<div class="topic-metadata">

**Author:** [@sh2pro](https://discourse.julialang.org/u/sh2pro)\
**Replies:** 7\
**Last updated:** [January 30, 2023, 11:52am UTC](https://discourse.julialang.org/t/whats-wrong-with-this-system-circuit/93569 "2023-01-30T11:52:08Z")

</div>

I’ve defined a system as follows: using ModelingToolkit, ModelingToolkitStandardLibrary using DifferentialEquations using ModelingToolkitStandardLibrary.Electrical using ModelingToolkitStandardLibrary.Blocks function C…

---

## [Turing.jl Warning: The current proposal will be rejected due to numerical error(s). isfinite.((θ, r, ℓπ, ℓκ)) = (true, false, false, false)](https://discourse.julialang.org/t/turing-jl-warning-the-current-proposal-will-be-rejected-due-to-numerical-error-s-isfinite-r-true-false-false-false/93472)

<div class="topic-metadata">

**Author:** [@pfarndt](https://discourse.julialang.org/u/pfarndt)\
**Replies:** 4\
**Last updated:** [January 29, 2023, 12:26pm UTC](https://discourse.julialang.org/t/turing-jl-warning-the-current-proposal-will-be-rejected-due-to-numerical-error-s-isfinite-r-true-false-false-false/93472 "2023-01-29T12:26:14Z")

</div>

I slightly modifies the gdemo example in Turing.jl to accept more data to # Import packages. using Turing # Define a simple Normal model with unknown mean and variance. @model function gdemo(x) s² ~ InverseGamma(2,…

---

## [Constraints in NeuralPDE.NNODE?](https://discourse.julialang.org/t/constraints-in-neuralpde-nnode/92723)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 4\
**Last updated:** [January 25, 2023, 4:49pm UTC](https://discourse.julialang.org/t/constraints-in-neuralpde-nnode/92723 "2023-01-25T16:49:27Z")

</div>

Hi everyone, I’m trying to implement a toy example of running NeuralPDE.NNODE to add to my repository of SIR models. Here’s what I have, which doesn’t work well. using OrdinaryDiffEq using NeuralPDE using Flux using Op…

---

## [Performing Global Sensitivity Analysis on a big reaction network imported as a SBML file](https://discourse.julialang.org/t/performing-global-sensitivity-analysis-on-a-big-reaction-network-imported-as-a-sbml-file/93000)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 21\
**Last updated:** [January 23, 2023, 9:22pm UTC](https://discourse.julialang.org/t/performing-global-sensitivity-analysis-on-a-big-reaction-network-imported-as-a-sbml-file/93000 "2023-01-23T21:22:06Z")

</div>

Hi everyone, I have been using Julia language for the last couple of months to simulate a big biochemical reaction network, which is generated by using BioNetGen (around 500 species and 170 parameters but the numbers ca…

---

## [Julia wrapper for SU2 (The Open-Source CFD Code) (Stanford University Unstructured)](https://discourse.julialang.org/t/julia-wrapper-for-su2-the-open-source-cfd-code-stanford-university-unstructured/93318)

<div class="topic-metadata">

**Author:** [@Mr.Benz](https://discourse.julialang.org/u/Mr.Benz)\
**Replies:** 0\
**Last updated:** [January 21, 2023, 3:40pm UTC](https://discourse.julialang.org/t/julia-wrapper-for-su2-the-open-source-cfd-code-stanford-university-unstructured/93318 "2023-01-21T15:40:20Z")

</div>

Python wrapper is available for SU2 (The Open-Source CFD Code). Please provide Julia wrapper for SU2. SU2 is a suite of open-source software tools written in C++ for the numerical solution of partial differential equat…

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

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