Questions tagged [simulation]
Simulation is the imitation of the operation of a real-world process or system over time.
293
questions
1
vote
0
answers
85
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....
0
votes
0
answers
57
views
Help me figure out how to solve the gravitational lens equations [migrated]
I want to simulate gravitational lensing. In the article LENSINGGW: a PYTHON package for lensing of gravitational waves there is this fragment [page 3]:
My research: As far as I understand, this is a ...
0
votes
0
answers
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 ...
1
vote
1
answer
364
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
2
answers
125
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 ...
0
votes
0
answers
45
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)
...
2
votes
1
answer
159
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 ...
1
vote
1
answer
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
0
answers
59
views
How can I set up and simulate an Ornstein–Uhlenbeck process that depends on the proportional deviations from the steady state?
I'm trying to set up a stochastic differential equation and run numerical simulations for the following process:
$$\frac{dV_t}{V_t}=\left[M+\gamma\left(M-\left(\frac{V_t}{V_{t-1}}-1\right)\right)\...
1
vote
1
answer
111
views
How can I simulate merging of droplets pressed between two slides? [closed]
I'd like to study the evolution and merging of multiple droplet outlines, while confined and pressed between two planparallel slides.
Does anyone have an idea how to code an interactive script by MMA ...
0
votes
0
answers
29
views
Simulation of a discrete pdf
I have 3 random variables (b,c,d) that capture a discrete pdf over 4 possible realizations. In every period, they evolve according to the random process described in the code below. I would like to ...
0
votes
1
answer
172
views
Plot roots of polynomials [closed]
I am a newbie with Mathematica.
I would like to simulate/plot the distribution of the roots of both the polynomials and the derivatives of polynomials. In particular, I would like plot the ...
1
vote
1
answer
77
views
Integrating Over a Conditional Time-Dependent Region
I'm experimenting with integrating over regions so I can check some physics simulations. Here's the rundown of what I'm attempting to do.
I have a rectangle that I'm rotating with a parameter:
...
1
vote
1
answer
148
views
Parallelized Monte-Carlo
I'm trying to do a little Monte-Carlo, and the code is working great, but slows down when I try to increase the number of iterations, any suggestions on how I can parallelize this? Every way I've ...
1
vote
2
answers
317
views
Graphing curves formed by a rolling polygon
I am trying to make a Mathematica graphing function that would generalize common phenomena. How would I do this?
From a circle, we can generate a cycloid (if rolling on a line) or a sine wave (if ...