# Questions tagged [modeling]

Questions about approaches for simulating physical systems or phenomena by building from related understanding and basic principles.

204 questions
Filter by
Sorted by
Tagged with
1k views

### In what way can M11.3's system modelling features be used by those who don't have SystemModeler?

Mathematica 11.3 includes some functionality from SystemModeler, but not the full SystemModeler environment. I assume that most people here are familiar with Mathematica, but not SystemModeler, or ...
• 233k
15k views

### My Girlfriend is going to prison...Save her with Math

Salacious title, but true story. ...
4k views

### Mathematica Implementations of the Random Forest algorithm

Is anyone aware of Mathematica use/implementation of Random Forest algorithm?
• 403
3k views

### Backtesting a Probability of Default (PD) model

Background PD models Financial institutions use Probability of Default (PD) models for various purposes such as client acceptance, provisioning and regulatory capital calculation as required by the ...
• 65.6k
2k views

### Couple a PDE and ODE in NDSolve

I would like to solve an example of non-stationary heat transfer with a coupled PDE and ODE. Let's assume that we have 1 dimensional bar of length $L$ with uniform initial temperature. The right end ...
• 6,483
954 views

### Large deformation of solids

Link to notebook with this question and code I'd like to understand how large deformations of solid mechanics work and how they are implemented. For this am looking at the following reference problem: ...
• 39.1k
5k views

### How to do System Dynamics simulations / diagrams in Mathematica?

System Dynamics is an approach to understanding the behaviour of complex systems over time. It deals with internal feedback loops and time delays that affect the behaviour of the entire system. What ...
• 918
1k views

### How to perturb a Dynamic System?

I'm trying to model a basic feedback system with delayed feedback. I've done the initial setup and now want to add a few more advanced features to my system. Currently, it's just a simple delayed-...
• 321
2k views

### How does Mma compute Confidence Intervals?

I am trying to understand how Mma computes the Confidence Intervals after a NonlinearModelFit. Consider the following example: ...
• 2,128
2k views

### Speed up NDSolve compared to Python (calls to LSODA)

I migrated a numerical model code from Python to Mathematica and am surprised how much faster the Python version runs. Profiling of the Python version tells me that it is about 100 times faster (120 ...
• 7,663
537 views

### Implementing the Biham–Middleton–Levine traffic model as CellularAutomaton

In an attempt to understand how to make rules for CellularAutomaton[], I set out to try to implement the Biham–Middleton–Levine traffic model. It is a 2D, ...
• 517
910 views

### What's the analogue of UML in Mathematica land?

What's the analogue of Unified Modeling Language (UML) in Mathematica land? Mathematica has elements of object-orientation, but most Mathematica programs or applications aren't of object-oriented ...
• 8,666
849 views

### How to Create Kapitza's Pendulum?

Hi, I have never worked on a project of this kind before. I am having difficulty using Kapitza's Pendulum (inverted pendulum with moving vertical base). It is hard for me to make the model equations, ...
• 143
3k views

### Mathematica Package for Bayesian Networks

Are there any packages that allow the simulation of Bayesian Networks with Mathematica? I found what seemed to be a promising package (Dynamics) on a Brown University URL, http://www.cs.brown.edu/...
580 views

### Mass Transport Model

I've asked similar questions before about Mathematica's Mass Transport model. My aim is to model these systems and show how they change by manipulating various parameters. This time it's the following ...
• 351
310 views

### Generating random sequence of integers with ordering constraints

I would like to write a Mathematica routine for generating random musical melodies that obey (some of) the constraints of traditional tonal harmony. For simplicity's sake, I'm interested only in ...
• 1,857
901 views

### Modelling the effect of a structure on a "tsunami" (hyperbolic wave equation)

So, the hyperbolic wave equation can be quite easily solved in Mathematica like this: ...
• 5,321
548 views

### Sinusoid modelling

There are lots of great demonstrations that show how to get periodic functions in the unit circle. I'm wondering how hard it would be to simulate a "moving grid" similar to this video on youtube (...
• 3,748
4k views

### RSquared: LinearModelFit vs NonlinearModelFit

I'm trying to understand the differences between LinearModelFit and NonlinearModelFit. One thing I notice is that the ...
• 411
1k views

### Modelling Hysteresis with a Differential Equation

I want to implement the bulk ferromagnetic hysteresis model (mostly the Jiles-Atherton Model), see http://drum.lib.umd.edu/bitstream/1903/6043/1/PhD_99-1.pdf page 44 equation (30). The needed ...
• 273
676 views

### Why does NonlinearStateSpaceModel linearise?

The documentation for NonlinearStateSpaceModel says: In NonlinearStateSpaceModel[eqns, ...] the Taylor linearization is with ...
• 1,234
662 views

### Can I use a differential equation as a model to make a fit to experimental data?

I've done an experiment where I swung a pendulum under air resistance. Is it possible to model the data using the following differential equation and find a b-value? ...
• 135
993 views

### Approximate minimum degree permutation algorithm in Mathematica

In MATLAB there is a nice implementation of the so called AMD (approximate minimum degree permutation) algorithm named amd (see Online MATLAB Documentation). There is an alternative algorithm called ...
• 2,861
511 views

### Use a picture as the initial distribution of an agent based model

I am trying to make an agent based model similar to http://demonstrations.wolfram.com/DiffusionLimitedAggregationARealTimeAgentBasedSimulation/ http://demonstrations.wolfram.com/...
• 687
420 views

### How to add an attractive potential (migration term) named component to Mass Transport PDE

Wolfram Mathematica 12.2 now features "Named Partial Differential Equation Terms" For specific physics fields, relevant PDE terms have been packaged as components and augmented with ...
• 36.2k
299 views

### Alternative Material Models for Finite Element

The Solid Mechanics capabilities of Mathematica make it an interesting alternative to using other software especially when considering multi-physics problems. I would like to collect here (for the ...
• 3,923
717 views

### Computing launch parameters for hitting a point in 3D with projectile under influence of wind

The end goal of this problem is to compute functions which describe the launch parameters which are needed to hit a specified goal in 3D in the presence of wind disturbances. This is as far I have ...
• 462
2k views

### Modelling a Rocket Launch using NDSolve

I'm trying to model a rocket launch with Mathematica but I've run into a little problem since I don't know how to turn the thrust off. I'm using Newton's Law of Universal Gravitation plus an added ...
• 1,557
531 views

### Fitting multiple data with model and NDSolve with different initial conditions, and other shared parameters

I know that there are already questions about fitting multiple datasets and about NDSolve and about shared and non shared parameters, but I tried to apply them and some things are still not clear. ...
• 1,265
353 views

### Two-dimensional Laplacian coupled with another equation leading to a BVP with integral bc(s)

I have the two-dimensional Laplacian $(\nabla^2 T(x,y)=0)$ coupled with another equation. The Laplacian is defined over $x\in[0,L], y\in[0,l]$. On manipulating the second equation (which I have ...
• 297
423 views

### Can LearnDistribution learn conditionality?

I would like to apply LearnDistribution to multivariate conditional distributions. Here's a simple artificial example: ...
• 31.2k
1k views

### Time dependent Schrödinger equation in 2D

I have the following Schrödinger equation in $2D$: \begin{cases} \partial_t \Psi(x,t) = V(x,t) \Psi(x,t) \quad x \in [-10,10]^2\\ \Psi(x,0)=\exp( \frac{1}{2} (-x^2+y^2)) \end{cases} where the ...
• 421
514 views

### Sound synthesizer using Manipulate

Sound synthesizers, both digital and analog, often include a parameter section for shaping the amplitude of a sound wave over time. This parameter section is commonly known as an "ADSR EG" (attack, ...
• 415
340 views

### Refining mesh size leads to absurd results for a coupled heat transfer FEM model

I have been recently solving a conjugate heat transfer problem, which involves fully-reversing or reciprocating flow of fluid over a heated block of solid. The problem is 2D and the temperature field ...
• 297
1k views

### Find fit of an experimental PDF

After quite some struggle, I managed to put up a code that is syntaxically correct. The goal is to find the parameters for a gamma distribution that best match experimental data. The data is a set of ...
• 167
473 views

### Numerically solving a system of SDE's with Levy noise?

Consider this system from the following paper titled: The long-time behaviour of a stochastic SIR epidemic model with distributed delay and multidimensional L´evy jumps https://arxiv.org/pdf/2003....
• 407
296 views

### Modelling heat transfer in periodically reversing flow

This is a heat transfer problem, which involves reciprocating (fully-reversing) fluid flow over a heated block of solid. The objective is to determine the temperature field in the solid and the fluid ...
• 297
466 views

### How can I model the volatility, using a GARCH(1,1), of a time series of returns (and plot it) using Mathematica? [closed]

I know that if I use this code: tsm = TimeSeriesModelFit[ret, {"GARCH", {1, 1}}]; I can get the parameters using this: ...
594 views

### Showing that a Hopf bifurcation exists?

I have the following system of ODEs: dx/dt = a/(1 + z) - Q*z dy/dt = Qx - qy dz/dt = qy - cz/(K + z). Assuming K = 1, Q = q < c, and a = c*(Sqrt[c/Q] - 1), is there a way to use Mathematica to test ...
• 431
215 views

### ToDiscreteTimeModel fails following video

Following the systems-modeling video here at about 15 min, 20 seconds in, the presenter (Bob Sanhedrick, I think) shows a model for an "Asteroids-game"-like 2D spacecraft. The model is ...
• 8,651
630 views

### Problem exporting and re-importing STL file

I wrote all code and there're no errors in code. Result of code is like first picture(left). But I can't Import that structure. The result of import stl file is second one(right one). How can I import ...
• 105
809 views

### Plot two functions within manipulate

I just want to plot all stochastic processes and their average process. The original code without the average is: ...
• 361
641 views

### Problem with SARIMA Time Series Model

I'm in the process of becoming familiar with some on the version 10 new functionality. I have two data sets, datasetA and datasetC, of time series data that I would like to make forecasts on. Here is ...
• 1,407
1k views

### Sensitivity Analysis: Global Sensitivity and Screening

I have a model which accepts several input parameters and now I want to study the sensitivity to certain parameters as described in here: Cross Validated Answer and in Wikipedia. There is also a link ...
• 688
254 views

### Plotting Incidence function of the SIR Model

I am working on the SIR model and I am trying to plot the incidence function on a specific time interval. ...
1k views

### How to model Macroeconomic dynamics?

I am rather new to Mathematica and I wanted to see if I could get some help with the following. I am trying to generate a model of macroeconomic indicators defined by the following functions, but I ...
804 views

### Mathematica code for bifurcation diagram in 3D

Good day. I need help with the code in mathematica to plot the bifurcation diagram (e vs z*) or (e vs x*), for the system ...
• 99
1k views

### Problem with WhenEvent

I am trying to add a time dependent fraction to a parameter in NDSolve, i.e. when 10 < t< 20, add ...
• 769