# Questions tagged [simulation]

Simulation is the imitation of the operation of a real-world process or system over time.

294 questions
Filter by
Sorted by
Tagged with
20 views

### Including absorbing boundary (surface) for a continuous stochastic process on a complex domain

Often of interest are stochastic processes with absorbing boundaries (states). However, Mathematica does not natively include functionality to deal with absorption. In one spatial dimension there is a ...
79 views

### Inclusion of absorbing boundary in continuous stochastic process simulation

While I'm now aware of the great functions Mathematica has for simulating stochastic processes on an unbounded domain, a common problem is a bounded domain with absorbing boundaries. In particular, ...
1 vote
88 views

### Problem using NestList

I have the following code with an error appearing for the 'simulation' line command regarding the use of NestList. I get a message regarding 'Objects of unequal length' and 'not valid variables' found....
39 views

### NBodySimulation with pair-wise force a function of acceleration?

How does one construct an NBodySimulation in which the custom PairwiseForce law involves acceleration? I'm attempting to ...
• 121
1 vote
370 views

### Gillespie (stochastic simulation) algorithm

I want to apply the Gillespie algorithm to a set of reactions. First, I run the source code presented here, and then run my model: ...
1 vote
127 views

### Python code of plot of Fisher KPP equation [closed]

I have the following system: $x'=y$, $y'=-y+x^2-x$ and I tried using Python code to display the phase portrait along with the stable manifold (point(1,0) for the provided system of differential ...
• 65
51 views

### Ising Model Simulation Increase Efficiency

I implemented a 2d simulation of Ising Model for zero external magnetic field. Below you can find the function I wrote to calculate the energy (periodic conditions) ...
161 views

### Regarding the interactive operation of a four-bar linkage mechanism

I have a four-bar linkage mechanism, where when the left locator is moved, the right locator moves accordingly, and when the right locator is moved, the left locator moves accordingly. I have ...
• 874
1 vote
59 views

### Troubleshooting NDSolveValue::rdelay Error in a Dengue Epidemic Model with Delay Differential Equations in Mathematica

I am modeling the vector dynamics of a dengue epidemic using a system of delay differential equations (DDEs) in Wolfram Mathematica. My model includes a complex interplay of host-vector interactions, ...
1 vote
66 views

• 411
80 views

### Exploring Variability: 100 Stochastic Simulations of Cumulative Incidence

We know $R_0=0.75$ and $\gamma=0.4$. So with the following code I calculate $\beta$ ...
386 views

### Simulating the Conduction of Heat on a Metal Rod

Consider the one-dimensional heat equation $$\frac{\partial u(x,t)}{\partial t}=\alpha\frac{\partial^2 u(x,t)}{\partial x^2}, \quad (x,t)\in (0,L)\times (0,\infty),$$ subject to the ...
• 373
93 views

### Fast Multipole Methods [closed]

My goal is to model electrostatic containment of point charges (protons). I understand the basic N-body potential calculation is O[N^2}, and a potential of q/|ri-rj| (constant mass and charge, ...
109 views

### Need an equation for modeling Tytler's Cycle

In all cultures over all time there appears, in different languages for different countries, the maxim "Shirtsleeves to shirtsleeves in three generations." This is a function with three ...
• 940
390 views

### Gravitation simulation and interaction of N (1000) massive objects

Is there an implementaion of the Barnes-Hut algorithm running with Mathematica? Thanks a lot
• 345
1 vote
122 views

### Simulating the card game War with $m$ suits and $n$ values

I am trying to simulate the card game War to find approximations to the stopping time distribution for different types of decks, and study conditional probabilities of winning given a certain deck. (...
• 114
1 vote
212 views

### Colored plot with Wolfram Mathematica

I saw this image thus I guess that it is possible to color some regions in a plot. What kind of command can I use to have a similar plot?
• 95
107 views

### Simulating a discrete time stochastic process

I would like to simulate and plot many paths of a discrete random variable $\tau_{t}$ that follows the following process: with probability $\tau_{t-1}$, $\tau_{t}$ is either $0.6$ with probability $x$...
• 37
83 views

### Evaluating an integral of geometric Brownian motion

I am a Mathematica novice. For an operations research application, I am trying to work with the following wealth process in Mathematica, $$d W_t = (\rho W_t + P_t) dt\ ,$$ where $P_t$ is a stream ...
• 231
102 views

### How do I simulate an ItoProcess that is not supposed to become negative?

I have a process that is similar to a Cox Ingersoll Ross process. Like a CIR process this process does not become negative. However, when I define the process with ItoProcess and I simulate it with ...
• 21
195 views

### FEM Capacitor Not Converging with Parallel Plate Model

I am trying to model a 3D electrostatics finite element model of a capacitor to see if I can accurately model the behavior of a parallel plate capacitor before I alter the geometry of the electrodes ...
73 views

### Non-linear regression simulation

I have a sequence of data: data = {{20, 291}, {21, 440}, {22, 571}, {23, 830}, {24, 1287}, {25, 1975}, {26, 2744}, {27, 4515}, {28, 5974}, {29, 7711}}; The data is ...
• 33
1 vote
55 views

### Plot the graph with two best response functions, Mathematica

I have another doubt regarding Mathematica. This is probably another question that can be easily answered, but since I'm a beginner it's a while that I'm stuck. Since I'm using Mathematica online, the ...
83 views

### Table generation with random variates inside. Mathematica [closed]

I'm new on this forum, and I'm also a new user of the software Mathematica. For this reason, I'm sorry if my question will be unclear and / or dumb. I have to make a numerical simulation with random ...
1 vote
36 views

• 2,205
536 views

...
• 27k
183 views

### How to use the option ExternalForce in NBodySimulation

I want to simulate the movement of a small ball on a curved track like the following: This is my current code: ...
• 27k
1 vote