# Modelling & Simulations

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

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

**Page:** 21

---

## [Solving coupled PDEs with implicit time-dependence](https://discourse.julialang.org/t/solving-coupled-pdes-with-implicit-time-dependence/115191)

<div class="topic-metadata">

**Author:** [@Danny\_Han](https://discourse.julialang.org/u/Danny_Han)\
**Replies:** 1\
**Last updated:** [July 5, 2024, 6:26pm UTC](https://discourse.julialang.org/t/solving-coupled-pdes-with-implicit-time-dependence/115191 "2024-07-05T18:26:57Z")

</div>

I’m trying to implement a time-dependent Landau model for ferroelectric materials on a 2D cartesian domain, where the time-dependent Landau equation \\frac{dP}{dt} = -\\eta (\\alpha P+\\beta P^3 + \\gamma P^5 - k\_x \\frac{\\pa…

---

## [Detecting Function Composition in Symbolics.jl](https://discourse.julialang.org/t/detecting-function-composition-in-symbolics-jl/115885)

<div class="topic-metadata">

**Author:** [@nicrummel](https://discourse.julialang.org/u/nicrummel)\
**Replies:** 5\
**Last updated:** [July 5, 2024, 6:06pm UTC](https://discourse.julialang.org/t/detecting-function-composition-in-symbolics-jl/115885 "2024-07-05T18:06:05Z")

</div>

Motivation I have a system of differential equations \\dot{U} = F(U,w) where U\\in \\mathbb{R}^D are dependent variables and w \\in\\mathbb{R}^J are parameters. And I can quickly build (in-place) Julia functions from Symbol…

---

## [Boundary condition in Trixi with imported mesh with P4estmesh()](https://discourse.julialang.org/t/boundary-condition-in-trixi-with-imported-mesh-with-p4estmesh/116528)

<div class="topic-metadata">

**Author:** [@Kelian\_Renoux](https://discourse.julialang.org/u/Kelian_Renoux)\
**Replies:** 6\
**Last updated:** [July 5, 2024, 2:29pm UTC](https://discourse.julialang.org/t/boundary-condition-in-trixi-with-imported-mesh-with-p4estmesh/116528 "2024-07-05T14:29:35Z")

</div>

Hello, i have a special case in Trixi where I want to use boundary conditions with a mesh imported via GMSH, i was wondering if it was possible with a Trixi function ? Thanks

---

## [Solving differential equations for multi-component fluid flow](https://discourse.julialang.org/t/solving-differential-equations-for-multi-component-fluid-flow/116254)

<div class="topic-metadata">

**Author:** [@DanaO](https://discourse.julialang.org/u/DanaO)\
**Replies:** 7\
**Last updated:** [July 4, 2024, 8:28am UTC](https://discourse.julialang.org/t/solving-differential-equations-for-multi-component-fluid-flow/116254 "2024-07-04T08:28:12Z")

</div>

Hello everyone, I would like to model a multi-component, isothermal gas flow in a 1D pipeline. To do this, I would like to solve the following simplified differential equations: \\quad \\frac{\\partial p}{\\partial t} = -…

---

## [Gridspace search different distance in each dimension](https://discourse.julialang.org/t/gridspace-search-different-distance-in-each-dimension/116287)

<div class="topic-metadata">

**Author:** [@sea\_slug](https://discourse.julialang.org/u/sea_slug)\
**Replies:** 2\
**Last updated:** [July 4, 2024, 3:50am UTC](https://discourse.julialang.org/t/gridspace-search-different-distance-in-each-dimension/116287 "2024-07-04T03:50:28Z")

</div>

I’m using agents.jl to create an ABM. Looking at the help for GridSpace I should be able to search different distances for each of the dimensions in my GridSpace (assuming metric = :chebyshev) with functions nearby\_ids() …

---

## [Problem constructing reaction system from SBML Biomodel](https://discourse.julialang.org/t/problem-constructing-reaction-system-from-sbml-biomodel/116548)

<div class="topic-metadata">

**Author:** [@jchitpin](https://discourse.julialang.org/u/jchitpin)\
**Replies:** 2\
**Last updated:** [July 3, 2024, 1:16pm UTC](https://discourse.julialang.org/t/problem-constructing-reaction-system-from-sbml-biomodel/116548 "2024-07-03T13:16:12Z")

</div>

I am encountering difficulties loading an SBML file from BioModels (see here). Following the SBMLToolKit instructions, I loaded the SBML file but am having issues constructing the reaction system with warnings that certa…

---

## [Wrong largest Lyapunov exponent?](https://discourse.julialang.org/t/wrong-largest-lyapunov-exponent/116523)

<div class="topic-metadata">

**Author:** [@rpalmaa](https://discourse.julialang.org/u/rpalmaa)\
**Replies:** 0\
**Last updated:** [July 2, 2024, 1:32pm UTC](https://discourse.julialang.org/t/wrong-largest-lyapunov-exponent/116523 "2024-07-02T13:32:55Z")

</div>

I’m calculating the Lyapunov exponents of the Rössler oscillator using chaostools lyapunovspectrum, but I’m getting a weird result: For the fixed point, the largest Lyapunov exponent (LLE) is smaller than the LLE for th…

---

## [Running agents.jl model with run!()](https://discourse.julialang.org/t/running-agents-jl-model-with-run/116477)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 6\
**Last updated:** [July 2, 2024, 1:01pm UTC](https://discourse.julialang.org/t/running-agents-jl-model-with-run/116477 "2024-07-02T13:01:10Z")

</div>

How can I avoid saving data after run in agent based model. I thought if we don’t give adata. It should automatically not save data and its not saving as in end dataframes are 0\*0 in size but its taking same amount of t…

---

## [ERROR: type NameState has no field symbolify\`](https://discourse.julialang.org/t/error-type-namestate-has-no-field-symbolify/116484)

<div class="topic-metadata">

**Author:** [@AndreaRH](https://discourse.julialang.org/u/AndreaRH)\
**Replies:** 2\
**Last updated:** [July 2, 2024, 9:42am UTC](https://discourse.julialang.org/t/error-type-namestate-has-no-field-symbolify/116484 "2024-07-02T09:42:37Z")

</div>

Hello, I ran into the following ERROR: type NameState has no field symbolify when trying to create an ODEProblem. The stack trace seemed to me impossible to decipher, any help would be appreciated! Example below: usi…

---

## [Modifying OrnsteinUhlenbeckBridge in DifferentialEquations.jl](https://discourse.julialang.org/t/modifying-ornsteinuhlenbeckbridge-in-differentialequations-jl/116168)

<div class="topic-metadata">

**Author:** [@dleather](https://discourse.julialang.org/u/dleather)\
**Replies:** 5\
**Last updated:** [June 29, 2024, 8:00am UTC](https://discourse.julialang.org/t/modifying-ornsteinuhlenbeckbridge-in-differentialequations-jl/116168 "2024-06-29T08:00:53Z")

</div>

Suppose X(t) is an Ornstein-Uhlenbeck (OU) process, and Y(t; t\_0, T, u, v) is the respective OU bridge process such that Y(t\_0) = u, Y(T) = v, and 0 \\lt t \\lt T. I’ve had great use of simulating Y(t) using DiffEqNoisePr…

---

## [MTK: how to get all observed and unknown variable as a dataframe](https://discourse.julialang.org/t/mtk-how-to-get-all-observed-and-unknown-variable-as-a-dataframe/116250)

<div class="topic-metadata">

**Author:** [@wangyunyueyueniao](https://discourse.julialang.org/u/wangyunyueyueniao)\
**Replies:** 1\
**Last updated:** [June 29, 2024, 2:23am UTC](https://discourse.julialang.org/t/mtk-how-to-get-all-observed-and-unknown-variable-as-a-dataframe/116250 "2024-06-29T02:23:13Z")

</div>

As the documentation said, a solution can be exported to a dataframe of unkowns. Also I am able to export a couple of observed variables as long as there name is known. But now I want to export all of the observed and u…

---

## [Issues with porting Turing.jl to RxInfer.jl](https://discourse.julialang.org/t/issues-with-porting-turing-jl-to-rxinfer-jl/115696)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 3\
**Last updated:** [June 28, 2024, 9:49pm UTC](https://discourse.julialang.org/t/issues-with-porting-turing-jl-to-rxinfer-jl/115696 "2024-06-28T21:49:51Z")

</div>

Hi everyone, I’m trying to port a Turing.jl example to RxInfer.jl. However, the following throws an error; any tips on how to reformat? using OrdinaryDiffEq using SciMLSensitivity using RxInfer Y = \[7, 6, 10, 8, 13, 17…

---

## [Errors on 2nd Iteration of EnsembleGPUArrays when using Lux](https://discourse.julialang.org/t/errors-on-2nd-iteration-of-ensemblegpuarrays-when-using-lux/116280)

<div class="topic-metadata">

**Author:** [@TicTac](https://discourse.julialang.org/u/TicTac)\
**Replies:** 2\
**Last updated:** [June 28, 2024, 1:54pm UTC](https://discourse.julialang.org/t/errors-on-2nd-iteration-of-ensemblegpuarrays-when-using-lux/116280 "2024-06-28T13:54:03Z")

</div>

I’ve been trying to get some Lux UDEs trained using EnsembleGPUArray problems. I’m mostly following the SciML Automatic Model Discovery workflow to approximate an unmodeled disturbance in ODEs using some measured data. S…

---

## [Problem with ForwardDiff and a custom vector type in OrdinaryDiffEq](https://discourse.julialang.org/t/problem-with-forwarddiff-and-a-custom-vector-type-in-ordinarydiffeq/116260)

<div class="topic-metadata">

**Author:** [@JonasWickman](https://discourse.julialang.org/u/JonasWickman)\
**Replies:** 5\
**Last updated:** [June 26, 2024, 8:07pm UTC](https://discourse.julialang.org/t/problem-with-forwarddiff-and-a-custom-vector-type-in-ordinarydiffeq/116260 "2024-06-26T20:07:58Z")

</div>

I have an ODE system tracking the densities of a number of species. If certain criteria are fulfilled I add more species to the system and run the new slightly bigger ODE system, and repeat this process until certain oth…

---

## [Using Integrator in EventQueueABM model](https://discourse.julialang.org/t/using-integrator-in-eventqueueabm-model/116249)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 0\
**Last updated:** [June 26, 2024, 9:14am UTC](https://discourse.julialang.org/t/using-integrator-in-eventqueueabm-model/116249 "2024-06-26T09:14:30Z")

</div>

Hello everyone, I want to include some differential equation based model to my agents model. I want to integrate both of them. so at some points in simulation time, agent model get feed some info from differential model…

---

## [Writing AD rules for Rotations.jl](https://discourse.julialang.org/t/writing-ad-rules-for-rotations-jl/116222)

<div class="topic-metadata">

**Author:** [@sonofwatt](https://discourse.julialang.org/u/sonofwatt)\
**Replies:** 1\
**Last updated:** [June 26, 2024, 5:14am UTC](https://discourse.julialang.org/t/writing-ad-rules-for-rotations-jl/116222 "2024-06-26T05:14:46Z")

</div>

I’m trying to create a coordinate transformation, via LinearAlgebra and Rotations.jl (Home · Rotations.jl), and can be optimized via Zygote.jl, or the like. I’m running into a problem because some of the functions in Ro…

---

## [How is the parameter p\_steps evaluated in Morris method?](https://discourse.julialang.org/t/how-is-the-parameter-p-steps-evaluated-in-morris-method/116124)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 3\
**Last updated:** [June 26, 2024, 5:03am UTC](https://discourse.julialang.org/t/how-is-the-parameter-p-steps-evaluated-in-morris-method/116124 "2024-06-26T05:03:24Z")

</div>

It is not clear from the tutorial how the p\_steps parameter is evaluated in Morris method. Usually, the parameters that are defined are the total number of trajectories and the number of trajectories with the highest spr…

---

## [Structural SImplify Unable to perform broadcast equation](https://discourse.julialang.org/t/structural-simplify-unable-to-perform-broadcast-equation/115967)

<div class="topic-metadata">

**Author:** [@HSnowden](https://discourse.julialang.org/u/HSnowden)\
**Replies:** 1\
**Last updated:** [June 24, 2024, 3:48pm UTC](https://discourse.julialang.org/t/structural-simplify-unable-to-perform-broadcast-equation/115967 "2024-06-24T15:48:06Z")

</div>

Hello, In a model I habe been building, I go to perform structural simplify upon it and it results in the following error MethodError: no method matching length(::SymbolicUtils.BasicSymbolic{Any}). The code to blame fo…

---

## [Media properties and component encapsulation in MTK](https://discourse.julialang.org/t/media-properties-and-component-encapsulation-in-mtk/83557)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 6\
**Last updated:** [June 24, 2024, 9:36am UTC](https://discourse.julialang.org/t/media-properties-and-component-encapsulation-in-mtk/83557 "2024-06-24T09:36:29Z")

</div>

Hi, Modelica has a Media library that captures the properties of various materials. It implements the equations given in IF97 (a version of was apparently implemented in Julia). It provides e.g. calculation of the Cp, C…

---

## [Fitting Potentials into \`ModelingToolkit\` Types](https://discourse.julialang.org/t/fitting-potentials-into-modelingtoolkit-types/105213)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 7\
**Last updated:** [June 23, 2024, 6:55am UTC](https://discourse.julialang.org/t/fitting-potentials-into-modelingtoolkit-types/105213 "2024-06-23T06:55:31Z")

</div>

I’m writing a package that will be a library of common galactic dynamics potential models, e.g. the harmonic oscillator potential. The equation for this potential is \\Phi = \\frac{1}{2} \\omega^2 x^2. I want to write this …

---

## ["Instability detected. Aborting" when increasing the dimension of an ODE system](https://discourse.julialang.org/t/instability-detected-aborting-when-increasing-the-dimension-of-an-ode-system/115800)

<div class="topic-metadata">

**Author:** [@PierreQuevreux](https://discourse.julialang.org/u/PierreQuevreux)\
**Replies:** 14\
**Last updated:** [June 22, 2024, 10:46pm UTC](https://discourse.julialang.org/t/instability-detected-aborting-when-increasing-the-dimension-of-an-ode-system/115800 "2024-06-22T22:46:26Z")

</div>

Hello, I am modelling soil bacteria degrading substrates with a spatially explicit model (i.e. a grid with one colony of bacteria in each grid cell). I have 15 equations to describe dynamics in each grid cell and I firs…

---

## [ExtraVariablesSystemException: The system is unbalanced. There are 47 highest order derivative variables and 44 equations](https://discourse.julialang.org/t/extravariablessystemexception-the-system-is-unbalanced-there-are-47-highest-order-derivative-variables-and-44-equations/115890)

<div class="topic-metadata">

**Author:** [@Hosseinmghasemi](https://discourse.julialang.org/u/Hosseinmghasemi)\
**Replies:** 0\
**Last updated:** [June 19, 2024, 9:43pm UTC](https://discourse.julialang.org/t/extravariablessystemexception-the-system-is-unbalanced-there-are-47-highest-order-derivative-variables-and-44-equations/115890 "2024-06-19T21:43:52Z")

</div>

Hi, I am solving a large nonlinear system of equations. It contains 44 variables and equations. But I face the error : ExtraVariablesSystemException: The system is unbalanced. There are 47 highest order derivative var…

---

## [Register\_array\_symbolic changing arrays into arrays of single length 'tuples'](https://discourse.julialang.org/t/register-array-symbolic-changing-arrays-into-arrays-of-single-length-tuples/115858)

<div class="topic-metadata">

**Author:** [@HSnowden](https://discourse.julialang.org/u/HSnowden)\
**Replies:** 1\
**Last updated:** [June 19, 2024, 1:16pm UTC](https://discourse.julialang.org/t/register-array-symbolic-changing-arrays-into-arrays-of-single-length-tuples/115858 "2024-06-19T13:16:19Z")

</div>

Hello, When I use register\_array\_symbolic and define the size of the array to equal the length of an input, rather than returning a single array of length(x) it returns an object that is composed of x 1-length subarrays…

---

## [Is time in continuous ABM model is really continuous?](https://discourse.julialang.org/t/is-time-in-continuous-abm-model-is-really-continuous/115849)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [June 19, 2024, 11:41am UTC](https://discourse.julialang.org/t/is-time-in-continuous-abm-model-is-really-continuous/115849 "2024-06-19T11:41:28Z")

</div>

Hello. everyone , I’m working with eventbasedmodel for continuous time. Initially i thought in case of continuous time unlike standard ABM time step doesn’t goes like 0, 1,2, 3, 4, 5…but something like 0.0, 0.1, 0.2, …

---

## [MTK -- change in \`linearize\`?](https://discourse.julialang.org/t/mtk-change-in-linearize/115760)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 7\
**Last updated:** [June 19, 2024, 10:14am UTC](https://discourse.julialang.org/t/mtk-change-in-linearize/115760 "2024-06-19T10:14:39Z")

</div>

I have some MTK code including linearization that used to work, but doesn’t work any more. I’m trying to understand the changes by doing it differently, but I get a weird error message… Here is a model with input md\_i l…

---

## [Error: Position is outside space extent](https://discourse.julialang.org/t/error-position-is-outside-space-extent/115790)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [June 18, 2024, 9:07am UTC](https://discourse.julialang.org/t/error-position-is-outside-space-extent/115790 "2024-06-18T09:07:57Z")

</div>

I’m working with continuous time ABM. For my model just changing radius of agent lead to this error which doesn’t make sense. Error: ERROR: position is outside space extent! Stacktrace: \[1\] error(s::String) @ Bas…

---

## [@mtkmodel-ize LimPI](https://discourse.julialang.org/t/mtkmodel-ize-limpi/113440)

<div class="topic-metadata">

**Author:** [@gruemelmonster](https://discourse.julialang.org/u/gruemelmonster)\
**Replies:** 8\
**Last updated:** [June 17, 2024, 7:49pm UTC](https://discourse.julialang.org/t/mtkmodel-ize-limpi/113440 "2024-06-17T19:49:20Z")

</div>

I am playing around to get some motor control simulations running with modeling toolkit. Last time I did that it was 2y ago so the syntax has changed (and got more simple to read). While trying to implement a timediscre…

---

## [ParallelStencil @init\_parallel\_stencil Workflow](https://discourse.julialang.org/t/parallelstencil-init-parallel-stencil-workflow/115713)

<div class="topic-metadata">

**Author:** [@jdm204](https://discourse.julialang.org/u/jdm204)\
**Replies:** 3\
**Last updated:** [June 17, 2024, 9:46am UTC](https://discourse.julialang.org/t/parallelstencil-init-parallel-stencil-workflow/115713 "2024-06-17T09:46:39Z")

</div>

Hi, ParallelStencil is great, but I’ve ran into a development pain point and was wondering if anyone can guide me. Say I’m developing a package that exports a diffuse! function that calculates an iteration of diffusion …

---

## [Julia throws MethodError: no method matching, with CoolProp using NonlinearSystem](https://discourse.julialang.org/t/julia-throws-methoderror-no-method-matching-with-coolprop-using-nonlinearsystem/115721)

<div class="topic-metadata">

**Author:** [@Bumlebi](https://discourse.julialang.org/u/Bumlebi)\
**Replies:** 3\
**Last updated:** [June 16, 2024, 10:12pm UTC](https://discourse.julialang.org/t/julia-throws-methoderror-no-method-matching-with-coolprop-using-nonlinearsystem/115721 "2024-06-16T22:12:00Z")

</div>

Hi all, I’m trying to get Julia’s NonlinearSolve to play well with CoolProp. I am very new at Julia, coming from many years of Python, so I am still learning the ropes. This is the code that is giving me trouble: usin…

---

## [MethodOfLines issue with coupled non-linear PDE system](https://discourse.julialang.org/t/methodoflines-issue-with-coupled-non-linear-pde-system/115681)

<div class="topic-metadata">

**Author:** [@Ryan\_B](https://discourse.julialang.org/u/Ryan_B)\
**Replies:** 2\
**Last updated:** [June 16, 2024, 4:15am UTC](https://discourse.julialang.org/t/methodoflines-issue-with-coupled-non-linear-pde-system/115681 "2024-06-16T04:15:18Z")

</div>

Hi. I am trying to solve a coupled system of nonlinear PDEs. I have attached the code, and I am happy to answer any questions. I have a 2D domain (x,z) and time dependence. My two variables are c (x,z,t), a 2D concentrat…

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

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