Questions tagged [modeling]
Questions about approaches for simulating physical systems or phenomena by building from related understanding and basic principles.
198
questions
42
votes
1
answer
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 ...
41
votes
5
answers
15k
views
My Girlfriend is going to prison...Save her with Math
Salacious title, but true story.
...
29
votes
5
answers
4k
views
Mathematica Implementations of the Random Forest algorithm
Is anyone aware of Mathematica use/implementation of Random Forest algorithm?
22
votes
1
answer
2k
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 ...
21
votes
1
answer
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 ...
20
votes
2
answers
892
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: ...
16
votes
4
answers
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 ...
15
votes
3
answers
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-...
15
votes
1
answer
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 ...
15
votes
1
answer
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, ...
14
votes
1
answer
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:
...
13
votes
3
answers
907
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 ...
13
votes
2
answers
818
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, ...
13
votes
2
answers
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/...
11
votes
3
answers
569
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 ...
11
votes
1
answer
307
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 ...
11
votes
1
answer
898
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:
...
10
votes
3
answers
545
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 (...
10
votes
1
answer
4k
views
RSquared: LinearModelFit vs NonlinearModelFit
I'm trying to understand the differences between LinearModelFit and NonlinearModelFit. One thing I notice is that the ...
10
votes
0
answers
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 ...
9
votes
2
answers
660
views
Why does NonlinearStateSpaceModel linearise?
The documentation for NonlinearStateSpaceModel says:
In NonlinearStateSpaceModel[eqns, ...] the Taylor linearization is with
...
9
votes
1
answer
644
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?
...
8
votes
3
answers
975
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 ...
8
votes
2
answers
510
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/...
8
votes
2
answers
412
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 ...
8
votes
2
answers
265
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 ...
8
votes
1
answer
702
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 ...
8
votes
1
answer
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 ...
8
votes
1
answer
523
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.
...
8
votes
2
answers
346
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 ...
8
votes
1
answer
393
views
Can LearnDistribution learn conditionality?
I would like to apply LearnDistribution to multivariate conditional distributions. Here's a simple artificial example:
...
7
votes
2
answers
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, ...
7
votes
1
answer
333
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 ...
7
votes
2
answers
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 ...
7
votes
1
answer
437
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....
7
votes
1
answer
284
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 ...
7
votes
0
answers
464
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:
...
6
votes
4
answers
522
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 ...
6
votes
3
answers
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 ...
6
votes
2
answers
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 ...
6
votes
1
answer
618
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 ...
6
votes
1
answer
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:
...
6
votes
1
answer
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 ...
6
votes
0
answers
997
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 ...
5
votes
3
answers
245
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.
...
5
votes
2
answers
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 ...
5
votes
1
answer
777
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 ...
5
votes
4
answers
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 ...
5
votes
1
answer
256
views
Conditional Random Walk
I am attempting to model a physical process I'm observing in the lab with a random walk generator. I need to find a way to impose a condition such that when the random walk runs into a point in the ...
5
votes
1
answer
247
views
How to use FindFit to optimize parameters of a WSM model via WSMLink for a parametric curve
I have I-V (current-voltage) data which I am trying to use to calibrate a PV solar cell model in WSM using WSMLink from mathematica. I am using the FindFit function which simulates the model with each ...