Skip to main content

Questions tagged [physics]

Physics is a science that studies the interactions of energy and matter. The physics tag should be used for questions about how physics can be simulated or implemented in programming.

2 votes
2 answers
113 views

I'm calculating the injectors, and I've added the complete calculation code and tested it using pytest. Can you suggest a better way to structure the code so that I ...
Андрей Александров's user avatar
6 votes
1 answer
295 views

I've implemented a fractal renderer with a physics-based animation system that creates a never-ending "timelapse" effect, here is an example video. The function uses pseudo-physics to move ...
NeKon's user avatar
  • 641
7 votes
2 answers
808 views

I have made a quick and basic working demo on calculating the moment of inertia of a 2D convex polygon. This was for the purpose of learning physics engines, more specifically rigid body dynamics (2D) ...
kasjolaman's user avatar
2 votes
0 answers
65 views

I have written a N-body simulator in Rust implementing Barnes Hut algorithm and Leapfrog integrator. My code seems to work fine, but I'd like to review on techniques which can improve performance ...
epestr's user avatar
  • 21
3 votes
1 answer
171 views

I am making a simple physics solver (haven't gotten to collision resolution or detection yet, just finished making it mt'ed), and when I apply forces through "W", "A", "S"...
misInformationSpreader's user avatar
0 votes
1 answer
102 views

Are the formulas used in getTemperature() and setTemperature() correct? ...
user366312's user avatar
1 vote
2 answers
230 views

Please review this C++ listing of an implementation of Leapfrog integration. This C++ listing is rewritten according to this review. ...
user366312's user avatar
6 votes
2 answers
907 views

Can you review the following code to check to see if the Minimum Image Convention is properly implemented? ...
user366312's user avatar
3 votes
1 answer
159 views

Background I'm attempting to write a physics simulation code, one portion of which involves simulating the triggering system of some equipment. The equipment works as follows: environmental noise (...
MomentumEigenstate's user avatar
6 votes
2 answers
556 views

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 ...
mjksho's user avatar
  • 61
2 votes
1 answer
219 views

The goal is to simulate a real flat plate capacitor in 2D. The potential of the armature is fixed to +V and -V, on the edges of the simulation cell the potential is zero. Between the plates of the ...
Pietro Scapolo's user avatar
20 votes
3 answers
4k views

I have created a program in python that calculates forces between bodies (i.e earth, moon and a hypothetical moon) and make them move according to the changes in velocity and forces. This is the code ...
Hale's user avatar
  • 303
5 votes
1 answer
286 views

The problem The partition function for the quantum harmonic oscillator can be written in the path integral formulation as $$Z\propto\int Dx(\tau)\exp\left(-\frac{S_E}{\hbar}\right)=\int Dx(\tau)\exp\...
My Code is a Flying Circus's user avatar
1 vote
1 answer
321 views

Is there any improvement that can be made to the following code, written to simulate the harmonic oscillator in the path integral formulation with Monte Carlo methods? ...
My Code is a Flying Circus's user avatar
11 votes
3 answers
567 views

I am a junior Software Engineer, C++ is usually my main jam but I started picking up Python for a research project I am doing in college. I am eager to learn as much Python syntax, tricks, best ...
hexaquark's user avatar
  • 213

15 30 50 per page
1
2 3 4 5
11