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.
465
questions
42
votes
6
answers
9k
views
Are there simple ways to numerically solve the time-dependent Schrödinger equation?
I would like to run some simple simulations of scattering of wavepackets off of simple potentials in one dimension.
Are there simple ways to numerically solve the one-dimensional TDSE for a single ...
40
votes
23
answers
10k
views
Good examples of "two is easy, three is hard" in computational sciences
I recently encountered a formulation of the meta-phenomenon: "two is easy, three is hard" (phrased this way by Federico Poloni), which can be described, as follows:
When a certain problem is ...
24
votes
5
answers
6k
views
What language should I use when teaching an undergraduate course in computer programming?
Going to teach students of undergraduate level a course titled Introduction to Computer Programming. I am confused a bit. In Computational Physics scientists use C/C++ or Python or Fortran,CUDA etc.......
16
votes
1
answer
3k
views
Why is leapfrog integration symplectic and RK4 not, if the latter is more accurate?
In a system where energy theoretically should be conserved, the most accurate simulation would conserve energy (as well as giving accurate positions, velocities and etc). RK4 is more accurate than ...
15
votes
1
answer
2k
views
Conserving Energy in Physics Simulation with imperfect Numerical Solver
I am creating a C++ Physics Simulation where I need to move an rigid body through an acting force field.
Problem: simulation does not conserve energy.
Quesiton: abstractly, how is conservation of ...
14
votes
2
answers
461
views
Quality of linear congruential generators for random numbers
I'm doing some simulations of the Langevin equation, for various external forces. Being told that C's rand() from stdlib.h can ...
11
votes
2
answers
11k
views
How do I plot the surface of a 4D plot?
I am trying to plot the wave function for a particle in a 3D box. This requires me to plot 4 variables: x, y, z axes and the probability density function.
The probability density function is:
...
10
votes
3
answers
4k
views
Calculating the log-determinant of a large sparse matrix
I need to calculate $\log(\det (\mathbf M_i))$ where the $\mathbf M_i$'s are large sparse matrices, which are real, symmetric and positive semi-definite. I hope to have between $10$ and $100$ of ...
9
votes
4
answers
698
views
Finite-difference software for solving custom equations
Are there any good, easy to use, software for simulating the evolution of systems of generic differential equations? I know there are custom programs for various specific circumstances (such as ...
9
votes
3
answers
5k
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 ...
9
votes
3
answers
13k
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 ...
9
votes
3
answers
2k
views
What are the differences between CFD simulations and realistic ocean/atmosphere model simulations?
The field of computational fluid dynamics (CFD) is dedicated to solving the Navier-Stokes equations (or some simplification of them). A subset of CFD, ocean and atmospheric models numerically solve ...
8
votes
0
answers
588
views
DIIS method to accelerate SCF convergence for stretched geometries
I am implementing from scratch an Hartree-Fock calculation in the STO-3G basis set to perform Born-Oppenheimer molecular dynamics. I have a Restricted Hartree-Fock procedure that can reproduce very ...
7
votes
4
answers
1k
views
Euler integration of the three-body problem
Me and one of my colleague are trying to simulate the three-body problem with a C++ program in order to compare different integration schemes. At the moment we are trying to use the Euler's method, ...
7
votes
4
answers
824
views
Introductory book on computational physics [duplicate]
I'm currently working on my MS in CS and have developed an interest in astrophysics. Luckily one of my professors is a astrophysicist and is currently doing research through computational physics and ...