All Questions
37 questions
3
votes
5
answers
2k
views
How do I speed up this simulation program
This is a program to solve a differential equation numerically using Euler method. As of now, it is very slow, and I need to run 10000 Monte Carlo simulations.
The differential equation is called ...
0
votes
1
answer
253
views
Python Logic Gate Circuit Simulator [closed]
I have recently become interested in simulating logic circuits because of a electronics class at school. I have created a functioning simulator for logic gate circuits in Python. My implementation ...
6
votes
2
answers
512
views
Means square displacement (MSD)
I have written a code to calculate the MSD of some molecules. The code averages over multiple time origins (sliding time window) and over all the molecules. I have also made it do one extra thing: do ...
2
votes
1
answer
391
views
Simulation of sand particle collision
I am making a module that allows you to create sand and simulate it. I have successfully done this, but it runs very slowly. I need this to be able to simulate at least 1000 particles, at a fps higher ...
5
votes
1
answer
804
views
Monte-carlo simulation code - simple exercise
I created a quick monte-carlo simulation which seems to do what I want (simple version below). The code basically simulates a Poisson distribution, say this results in a simulation of ...
5
votes
1
answer
131
views
The python code simulates an environment of a disease and calculates how many people get infected
The python code simulates an environment of an X number of persons with an Y number of places they can go to, puts the persons randomly in the places and calculates how many persons get infected, die ...
10
votes
1
answer
341
views
From Hummingbirds to Ornithopters: Simulating the Aerodynamics of Flapping Wings
Ptera Software
A Flapping Wing Aerodynamics Simulator Written in Python
Motivation
About a year ago, I became fascinated by how animals fly. As an aerospace engineering student, it surprised me that ...
2
votes
0
answers
71
views
How can I shorten the runtime of my simulation?
Before you read the code below, note the following explanation:
I have three classes: Driver, Vehicle, and ...
3
votes
0
answers
82
views
Monte Carlo Simulation of a Markov Process
A 1D binary string has the following dynamics
$$1100 \to 1010,\quad 1101\to 1011$$
each with rate \$p<1\$. That is if we see \$110\$ in the string, then we change to \$101\$ with probability \$p\$....
3
votes
1
answer
355
views
Particle simulator using Python - Why is the NumPy version slower than pure Python?
This is an interesting example from G.Lanaro's book, Python High Performance. The program is a simple simulator which describes movement of particles based on their positions and angular velocities (<...
8
votes
2
answers
1k
views
Schelling's model of Segregation Python implementation with Geopandas (Follow-up)
This is the repost of the following question as suggested by @HoboProber .
Again, if you don't know what is Schelling's model of segregation, you can read it here.
The Schelling model of ...
4
votes
2
answers
395
views
Simple spatial grid for particle system
I am going to simulate a particle system, the particles are infinitesimal points which apply forces on the neighbors and I need a fast way of making proximity checks, they are going to have a maximum ...
16
votes
3
answers
1k
views
Razzle Dazzle simulator
Inspired by the video from Scam Nation and James Grime from Numberphile, I tried to make a Razzle Dazzle simulator.
Razzle Dazzle is a scam in the form of a game. Per turn, the player pays a fee and ...
13
votes
1
answer
347
views
Population dynamic simulation on biological information maintenance 2
This question is the follow-up to this previous question.
Background
Using this simulation I investigate a system in which enzymes proliferate in cells. During the replications of enzymes, ...
9
votes
1
answer
220
views
Population dynamic simulation on biological information maintenance
Background
Using this simulation I investigate a system in which enzymes proliferate in cells. During the replications of enzymes, parasites can come to be due to mutation. They can drive the system ...