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
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....
Math's user avatar
  • 455
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: ...
user21's user avatar
  • 39.2k
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
3 votes
2 answers
486 views

Lagrangian of three-mass system with Mathematica

Before proceeding to calculations in Mathematica, I would like to clarify with knowledgeable people. There is an ordinary linear three-mass system. If we write its Lagrangian, we get the following ...
dtn's user avatar
  • 2,344
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
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: ...
Sos's user avatar
  • 2,118
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 ...
rhermans's user avatar
  • 35.9k
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
  • 232k
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
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 ...
Sjoerd C. de Vries's user avatar
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, ...
Tetrasreal's user avatar
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: ...
dearN's user avatar
  • 5,311
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. ...
J.A's user avatar
  • 1,245
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 ...
Avrana's user avatar
  • 297
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 ...
Avrana's user avatar
  • 297
3 votes
1 answer
1k views

Model fitting to noisy data with a custom minimization function

I'm looking into fitting some data with Mathematica. I've got my head around how NonlinearModelFit works (I've been using the Levenberg-Marquardt algorithm for some ...
dr.blochwave's user avatar
  • 8,698
2 votes
1 answer
431 views

Caclulate second partial derivatives of a numerically defined function

I am performing a chi square minimisation with respect to some parameters x,y,z that are themselves part of the kernel involved in a numeric integral. I therefore ...
CAF's user avatar
  • 510
2 votes
1 answer
159 views

Fitting data with 3 linear fits

I have a dataset that can be easily approximated by a piecewise function composing of 3 linear functions, but i am unable to get an accurate fit once the third linear function is required. The model ...
william tepe's user avatar
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
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
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
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 ...
qazwsx's user avatar
  • 8,626
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
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 ...
Julian's user avatar
  • 462
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 ...
Avrana's user avatar
  • 297
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 ...
Vefhug's user avatar
  • 411
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
4 votes
1 answer
341 views

How can I calculate the maximum number of grid layout possibilities?

I am doing some modelling where I am trying to randomly layout some points on a grid. What I know: How big the grid is The number of objects that have to be laid out on the grid, at a point The ...
H2OBorne's user avatar
4 votes
2 answers
895 views

How do I represent a system dynamics feedback loop?

In System Dynamics, if I want represent the relationship between Speed and Distances, I create a Flow (Speed) and a Stock (Distance) as you can see in this Insight Maker Sample . Heres an Image of how ...
Luxspes's user avatar
  • 918
4 votes
2 answers
12k views

Curve fitting using an asymmetrical sigmoid function

This is probably going to sound trivial, as I am new to Mathematica and still busy reading the Getting Started materials. I have a series of observations: [(duration, speed sustained for duration), ....
L_R_T's user avatar
  • 43
4 votes
2 answers
885 views

Non-linear-Model-Fit problem in mathematica

I have written the following code to fit the function g2 to data (a,b,c,d) but I don't realize where I have made a mistake,without ...
user45561's user avatar
4 votes
2 answers
954 views

FindFit and NMinimize to fit a parametric model (minimize the distance of two curves)

I am trying to find a fit to the cumulative distribution of a set of points using FindFit or NMinimize. In particular, I would like to find the parameters of the cdf of the Beta Distribution that ...
Kass's user avatar
  • 661
3 votes
0 answers
165 views

FindDistribution analog: automated data modeling with all Wolfram statistical distributions

BOUNTY GOAL To get bounty I am asking to build a function that serves as an analog of FindDistribution. You can also simply re-implement ...
Vitaliy Kaurov's user avatar
2 votes
1 answer
174 views

NDSolve Convergence Issue for Coupled Field Problems

I have tried to use NDSolve to solve a coupled field Eqs (see the attached Codes). The MMA solver seems to failed to converge to the requested accuracy or precision within 100 iterations ...
ABCDEMMM's user avatar
  • 1,816
2 votes
1 answer
145 views

How to model the movement of a mass over a dome?

I'm trying to replicate the graphs and animation found in this page that studies the movement of a mass over a dome solving numerically the differential equation ...
Edgar Castro's user avatar
2 votes
1 answer
395 views

Find best equation for data and the area under curve

How can I find the best formula that describe the following Figure and also find the area under the curve (the numerical value): The data for the figure can be found here: https://pastebin.com/...
John's user avatar
  • 421
2 votes
1 answer
140 views

Directly calculating the cyclic steady state of a time-periodic conjugate heat transfer problem

Context The following transient problem is the reciprocating (i.e., fully reversing) flow of a fluid $0<x<L, 0<y<d$ over a thick heated block $0<x<L, -e<y<0$ until the system ...
Avrana's user avatar
  • 297
2 votes
3 answers
206 views

Fitting two equations to diferent parts of the same dataset

I have a system that transit between two different states. Each state output varies linearly with time, given by $m t+c$, where both lines intersect the $x$ axis in the same point. The output of this ...
BPinto's user avatar
  • 1,022
1 vote
1 answer
88 views

Strange error not found in a monte carlo code, Infinite expression 1/0 encountered

I've been trying to code a kinetic monte carlo simulation for a dimerization reaction, 2M ---> D. However I have a kinetic Monte Carlo code for a first order decomposition reaction of AIBN (that's ...
Nebula's user avatar
  • 13
1 vote
3 answers
203 views

Finding a continuous distribution that fits the empirical density of dataset $1,1/4,1/9,1/16\ldots$

I have a list of coefs of the form $1,1/4,1/9,1/16,\ldots,1/d^2$ sampled with relative sampling frequencies $1,1/4,1/9,1/16,\ldots,1/d^2$. How do I find a nice continuous density whose CDF closely ...
Yaroslav Bulatov's user avatar
1 vote
1 answer
727 views

How to simulate Multifractional Brownian Motion?

The maximum I would ask, is hints, how to model MFBMotion. Link to paper Firstly, i wanted to simulate in MATLAB that code: ...
lyrgo ft's user avatar
1 vote
1 answer
615 views

Estimating parameters on system of differential equations

I am looking for some help estimating the parameters of a series of differential equations to assist fitting the experimental data I have collected. The Problem: The equations are based off of the ...
user3741793's user avatar
1 vote
3 answers
198 views

FindFit, FindFormula, Fit, NonlinearModelFit - Which one to use? (I got no good curves & plots)

See this code, what mistake I did? (I got no plot) ...
Hussain-Alqatari's user avatar
1 vote
1 answer
1k views

How do I properly use Sow and Reap within a Do loop?

The problem is that reap only returns one value when I was expecting a string resulting from Do. For context: This is a simple democratic deficiency model. Where m is the number of periods, n is ...
CharlesBouwer's user avatar
0 votes
1 answer
146 views

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

A great answer by Alex is to be found here for my original question: Numerically solving a system of SDE's with Levy noise? Now Let us perturb this system with time delays so the system is: \begin{...
Math's user avatar
  • 455
0 votes
0 answers
91 views

NDSolve for ODE-PDE Problem

happy holidays, I am solving a coupled ODE - PDE system -for simplicity all coefficients are taken as 1-. I checked other questions on the issue but couldn't find any suitable answer or comparison. ...
confused's user avatar
  • 191
0 votes
2 answers
1k views

How can I fit a differential equation to experimental data?

I would like to add a fit to the following data. Here is the differential equation I am using. g=9.81 l=0.2 m=0.09 ...
fidafa123's user avatar
  • 135