Questions tagged [computational-physics]

Computational physics is the study and implementation of numerical algorithms to solve problems in physics for which a quantitative theory already exists.

374 questions
Filter by
Sorted by
Tagged with
1k views

Why there are people that still prefer fortran 77 over new versions?

I am reading some notes from a course in numerical analysis for physical sciences and it is my impression that there are still people that prefer Fortran 77 over new version due to the implicit ...
156 views

68 views

Dealing with simultaneous collisions in N-body sim

I have written an 2d N-body simulation in Python which allows collisions between the bodies. A body is modeled as a circle whose area is proportional to its mass. Each time the sim advances by one ...
845 views

One Dimensional Schrodinger's Equation solution using Numerov Method

I have been trying to solve Time Independent Schrodinger's equation in one dimension using Numerov Method as discussed in this excellent lecture notes I found on net. The Numerov method can solve an ...
172 views

Computational Physics: Finding the Diffusion Coefficient from the Discretized Diffusion Equation

I'm pretty new to translating simulation to reality so please forgive the perhaps naive approach I'm taking here. If we have a (quasi-2D) experimental video of a certain concentration changing with ...
4k views

Galerkin method: Test functions vs. Basis functions

I'm a novice to finite element and I'm finding quite hard to find the actual difference between Test function(s) and Basis function(s). I would be glad if somone could explain me that and point out ...
126 views

Numerically finding constants of motion

Given a set of ODE's $\dot{z} = f(z)$ (or discrete time $z_{t+1} = f(z_t)$), is there a way to numerically find constants of motion? For $f(z_t) \approx M z_t$, diagonalizing the matrix $M$ ...
163 views

Oil/Water interface simulation using GROMACS

I would like to perform a decane/water(tip4p) interface simulation using GROMACS to analyse the fluctuation of the interface over a long period of time (50ps - 1ns). Though I have a rough idea on ...
6k views

Calculating partial trace of array in NumPy

A simulation I'm doing requires me to calculate the partial trace of a large density matrix. I am trying to calculate it using tools from numpy, but my code seems to be having some problems. For ...
211 views

Second Quantization in Matlab

This question may be more suited for physics.stackexchange, but I saw this post was recommended for StackOverflow or Computational Science, so I'm asking my question here. I am trying to write a ...
94 views

188 views

How to avoid negative roots with a Newton's method?

I'm currently trying to solve a system of (3) nonlinear equations of (3) variables which are the baryonic density, the isospin asymmetry and and the density of a fluid with the Broyden's method (a ...
380 views

Higher-order Verlet integration

I'm using a simple version of Verlet integration for a particle–particle interaction system with collisions. At the end of each iteration, I integrate like this: ...