Questions tagged [modeling]

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

Filter by
Sorted by
Tagged with
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 ...
Szabolcs's user avatar
  • 233k
41 votes
5 answers
15k views

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

Salacious title, but true story. ...
Prisoners Dilema's user avatar
29 votes
5 answers
4k views

Mathematica Implementations of the Random Forest algorithm

Is anyone aware of Mathematica use/implementation of Random Forest algorithm?
blackace's user avatar
  • 403
22 votes
1 answer
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 ...
Sjoerd C. de Vries's user avatar
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 ...
Pinti's user avatar
  • 6,483
20 votes
2 answers
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: ...
user21's user avatar
  • 39.1k
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 ...
Luxspes's user avatar
  • 918
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-...
Ashok M Rao's user avatar
15 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: ...
Sos's user avatar
  • 2,128
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 ...
Markus Roellig's user avatar
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, ...
HJensen's user avatar
  • 517
13 votes
3 answers
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 ...
qazwsx's user avatar
  • 8,666
13 votes
2 answers
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, ...
Tetrasreal's user avatar
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/...
Rasputin Jones's user avatar
11 votes
3 answers
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 ...
Walser's user avatar
  • 351
11 votes
1 answer
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 ...
Kim Fierens's user avatar
  • 1,857
11 votes
1 answer
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: ...
dearN's user avatar
  • 5,321
10 votes
3 answers
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 (...
Tom De Vries's user avatar
  • 3,748
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 ...
Tom Hayden's user avatar
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 ...
John's user avatar
  • 273
9 votes
2 answers
676 views

Why does NonlinearStateSpaceModel linearise?

The documentation for NonlinearStateSpaceModel says: In NonlinearStateSpaceModel[eqns, ...] the Taylor linearization is with ...
CarbonFlambe's user avatar
  • 1,234
9 votes
1 answer
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? ...
fidafa123's user avatar
  • 135
8 votes
3 answers
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 ...
Rainer's user avatar
  • 2,861
8 votes
2 answers
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/...
AzJ's user avatar
  • 687
8 votes
2 answers
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 ...
rhermans's user avatar
  • 36.2k
8 votes
2 answers
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 ...
Dunlop's user avatar
  • 3,923
8 votes
1 answer
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 ...
Julian's user avatar
  • 462
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 ...
InquisitiveInquirer's user avatar
8 votes
1 answer
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. ...
J.A's user avatar
  • 1,265
8 votes
2 answers
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 ...
Avrana's user avatar
  • 297
8 votes
1 answer
423 views

Can LearnDistribution learn conditionality?

I would like to apply LearnDistribution to multivariate conditional distributions. Here's a simple artificial example: ...
M.R.'s user avatar
  • 31.2k
7 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 ...
Vefhug's user avatar
  • 421
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, ...
useranonis's user avatar
7 votes
1 answer
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 ...
Avrana's user avatar
  • 297
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 ...
mattator's user avatar
  • 167
7 votes
1 answer
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....
Math's user avatar
  • 407
7 votes
1 answer
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 ...
Avrana's user avatar
  • 297
7 votes
0 answers
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: ...
Rodrigo Guinea's user avatar
6 votes
4 answers
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 ...
tardigrade's user avatar
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 ...
Reb.Cabin's user avatar
  • 8,651
6 votes
1 answer
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 ...
유민우's user avatar
  • 105
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: ...
Milan Ivica's user avatar
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 ...
Steve's user avatar
  • 1,407
6 votes
0 answers
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 ...
gogoolplex's user avatar
5 votes
3 answers
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. ...
Athanasios Paraskevopoulos's user avatar
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 ...
alanlujan91's user avatar
5 votes
1 answer
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 ...
Patrick's user avatar
  • 99
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 ...
tarhawk's user avatar
  • 769
5 votes
1 answer
264 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 ...
natedice's user avatar
5 votes
1 answer
254 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 ...
OllieNeedsHelp's user avatar

1
2 3 4 5