Questions tagged [computational-physics]

Questions with this tag should be about computational physics, which is the study of physical situations with the use of software (commercial or in-house). Please note that details of writing and/or debugging code is OFF-TOPIC and should be asked at either Computational Science, Code Review or Stack Overflow.

Filter by
Sorted by
Tagged with
19
votes
5answers
6k views

What do theoretical physicists need from computer scientists?

I recently co-authored a paper (not online yet unfortunately) with some chemists that essentially provided answers to the question, "What do chemists need from computer scientists?" This included the ...
17
votes
1answer
7k views

Solving Schrödinger's equation with Crank-Nicolson method

I am trying to numerically solve Schrödinger's equation with Cayley's expansion ($\hbar=1$) $$\psi(x,t+\Delta t)=e^{-i H\Delta t}\psi(x,t)\approx\frac{1-\frac{1}{2}i H\Delta t}{1+\frac{1}{2}i H\Delta ...
13
votes
5answers
1k views

Numerical simulation of the double-slit experiment including watching the electrons

The double-slit "thought experiment" described by Feynman in Lectures on Physics Volume 3 section I-6 Watching the electrons consists in firing electrons through a double-slit to observe the ...
10
votes
1answer
1k views

Ljapunov exponent of driven damped pendulum

I have written a computer simulation of the driven damped pendulum, pretty much as the one shown here, only that I did it Python. Next, I have found some parameters for which the pendulum behaves ...
4
votes
1answer
1k views

Integral of Sedov's self-similar solution to the spherical blast wave problem

I'm studying the Taylor-Sedov self-similar solution to the problem of a strong explosion in a homogenoeus atmosphere. The problem is discussed in Landau & Lifschitz VI (in the 2nd edition it's §...
2
votes
2answers
647 views

Why can't we set the lattice spacing 'a' in lattice QCD?

My question is to do with lattice QCD. In the lattice action there is a parameter, 'a', the lattice spacing in physical units. However, if we want to generate a configuration with a certain lattice ...
9
votes
2answers
4k views

How do I calculate the Reynolds number in multiphase flows?

I am modeling a gas flowing through a liquid. How do I calculate the Reynolds number in multiphase flows? And, at what Reynolds number should I consider the flow to be turbulent? The problem is of a ...
7
votes
2answers
10k views

Solving one dimensional Schrodinger equation with finite difference method

Consider the one-dimensional Schrodinger equation $$-\frac{1}{2}D^2 \psi(x)+V(x)\psi(x)=E\psi(x)$$ where $D^2=\dfrac{d^2}{dx^2},V(x)=-\dfrac{1}{|x|}$. I want to calculate the ground state energy(...
7
votes
3answers
1k views

How to include random force in the simulation (Classical Molecular Dynamics)

I need to implement a random force in my code according to the fluctuation dissipation theorem. I have a Gaussian distribution function ready width average 0 and distribution 1 and I know I need to ...
4
votes
2answers
473 views

Can computers accurately model all of the details (to the subatomic level) of macro objects in collisions?

Frequently when trying to solve cosmology questions physicists turn to computer simulations of the universe (albeit massively simplified) in order to verify or disprove their hypotheses. This got me ...
4
votes
3answers
455 views

Lexical/ontological/semantic knowledge base for physics

Are there lexical/semantic knowledge bases for physics that can be used for automated reasoning and AI (like Princeton's Wordnet and MIT's Conceptnet for common sense English usage)? If not in ...
4
votes
1answer
2k views

Some hints/introductions/textbooks for LBM (Lattice Boltzmann methods) fluid simulation?

I come from a computer science background and I want to learn details about LBM in fluid simulation. I have been searching around for a concise tutorial that tells me how LBM is used to solve a ...
11
votes
1answer
516 views

Computability of physics

As far as I understand a Universal Quantum Simulator can simulate any quantum system and thus anything that exists in the universe. Also, a quantum computer can implement such a quantum simulator. ...
6
votes
1answer
1k views

Discretizing the Wave Equation in polar coordinates

I want to discretize the wave equation $$\frac{1}{c^2}\frac{\partial^2\psi\left(\vec{r},t\right)}{\partial t^2}=\triangle\psi\left(\vec{r},t\right)$$ in polar coordinates. I find the following ...
6
votes
4answers
866 views

Monte Carlo use [closed]

Where is the Monte Carlo method used in physics?
6
votes
2answers
502 views

In condensed matter simulations, how is particle number density computed in practice?

I have been reading a recent paper. In it, the authors performed molecular dynamics (MD) simulations of parallel-plate supercapacitors, in which liquid resides between the parallel-plate electrodes. ...
5
votes
1answer
462 views

Least action principle — numerical simulation strangeness

I'm trying to get some experience with the least action principle, and for this I chose a simple 1-dimensional problem of a particle moving in some field. The least action principle would then look ...
5
votes
2answers
3k views

Quantum XOR: How do you generalize it?

Consider the classical XOR Gate: Given a 2 bit system: $G = [u_1, u_2]$ $$XOR(G) = (u_1 + u_2) \ mod \ 2$$ Is the following a good generalizaiton of a Quantum XOR Gate: Given a 2-qubit system: $...
3
votes
3answers
604 views

Langevin Equation - Stochastic Differential Equation. What are the subtleties?

I am trying to find out the motion of a particle in 3D governed by the Langevin equation, numerically. Anyway, the Langevin equation is given by $$m \ddot{x} = -(6\pi a\nu) \dot{x} + F_b $$ where $...
3
votes
2answers
3k views

Gas viscosity at high pressure, high temperature

EDIT 1 PER COMMENTS I am wanting to model nitrogen gas viscosity as a function of pressure and temperature OR learn of an existing equation that models nitrogen viscosity for the pressure and ...
2
votes
1answer
1k views

How is acceleration computed in the leap-frog algorithm in computer simulations of particles?

I am reading the book Computer Simulation of Liquids by Allen and Tildesley (here is another link). On page 80, the authors describe the leap-frog algorithm, which is used extensively in molecular ...
2
votes
3answers
3k views

Textbook recommendation for computational physics

Can anyone recommend some good textbooks for undergraduate level computational physics course? I am using numerical recipe but find it not a very good textbook.
2
votes
1answer
118 views

Numerical relativity in causally pathological spacetimes

To perform numerical relativity simulations one almost universally adopts the so called "3+1" approach: spacetime is divided up into spacelike slices, each representing a "moment in time". After some ...
8
votes
1answer
171 views

Minimal Extension of Wave Equation to Include Dispersion

Let's say you are modeling some process with the wave equation $\frac{1}{c^{2}}\frac{\partial^{2}\psi}{\partial t^{2}} = \nabla^{2}\psi$. You wish to improve your model by including dispersive effects,...
3
votes
0answers
84 views

How are boundary consitions implemented correctly in time dependent hydrodynamics?

I posted this question more than one year ago and got an answer recently. This answer looks good to me, but indicates that something is wrong in my original approach to the problem. Can someone tell ...
1
vote
1answer
303 views

How to produce a 3D density map of a time-depenent system of particles?

I have a time-dependent system of varying number of particles (~100k particles). In fact, each particle represents an interaction in a 3D space with a particular strength. Thus, each particle has $(X,...
1
vote
1answer
424 views

Rigid body collision, 3 circles in contact

I'm working on a 2d physics simulation. It's a continuous time simulation, that is, it uses swept shapes over the time-frame and geometrical/vector 'analysis' to determine most immediate time of ...
1
vote
1answer
1k views

Turning a finite difference equation into code (2d Schrodinger equation)

I am trying to convert the following finite difference equations into code (taken from the bottom of page 12 of this thesis by Maike Schulte Numerical Solution of the Schrodinger Equation on Unbounded ...
1
vote
1answer
134 views

Finding Transition states from Saddle points

I have a set of saddle points of molecule with corresponding energy values. I would like to find the transition state of the molecule. I understand that transition state is the first-order saddle ...
0
votes
1answer
92 views

Discretization of the induction equation using the Finite Volume Method (FVM)

I am trying to discretize the induction equation using the finite volume method. The equation with the quasi-static assumption is given as $$( \mathbf{B} \cdot \nabla)\mathbf{u} - (\mathbf{u} \cdot \...
0
votes
1answer
94 views

How to model Solar System formation accurately and realistically, Part 2

I've been working on a crude N-body simulator which allows N bodies of equal masse​s to interact gravitationally in 2 dimensions. My goal is to model the formation of Solar System. Each body is ...
-2
votes
2answers
128 views

Standards for scientific metadata in common-use image formats? [closed]

I have a bunch of JPEG, JPEG2000 GIF and PNG files that in theory could be used for some types of science analysis if there were temporal and spatial information in them. Years ago, I had looked into ...
6
votes
2answers
304 views

How can I include variable particle number in a Brownian dynamics simulation?

I programmed a Brownian dynamics simulation in two dimensions. (Coarse-grained proteins on surfaces with interaction potentials i.e. patchy particles.) Now I want to allow particles to leave or enter ...
6
votes
1answer
265 views

How close to the critical point is sufficient close for measuring critical exponents?

I am learning Monte Carlo and just manage to simulate a phase transition by computing the heat capacity or the susceptibility. I wish I can also compute critical exponents.To this purpose, I have read ...
4
votes
1answer
225 views

Difference between a Fixed Point and a Limit Point in implementations of the Renormalization Group (RNG) in Large Eddy Simulation (LES) model

In the introduction of this paper, it is explained that and how the application of a dynamic subrid scale model for turbulence into a large eddy simulation (LES) model corresponds to doing one ...
4
votes
2answers
547 views

Sample the Maxwell-Jüttner distribution

The Maxwell-Bolztmann distribution is easy to sample numerically, as it can be expressed directly with a unique variable $mv^2/k_B T$. One simply has to tabulate the cumulative distribution function ...
2
votes
1answer
421 views

Diagonalization of Hubbard model for spinless fermions in 1D k-space

In real space we write basis vector for spinless fermions in binary notation for example if there are M=4 sites in system and N=2 fermions then basis vectors will be: $0011, 0101, 0110, 1001, 1010, ...
2
votes
0answers
289 views

Schrödinger equation in spherical coordinates using Numerov's method?

So I need to solve the Schrödinger equation using Numerov's method. However, the problem I have assigned to me is in spherical coordinates. As it seems, I only need to take into account the dependance ...
2
votes
1answer
90 views

Do infinities occur when Quantum Field Theory is treated numerically?

What puzzles me regarding QFT and the occuring of infinte integrals when treated in a perturbatative manner is if these infinties would also occur when the theory is treated numerically, maybe even in ...
2
votes
2answers
2k views

how does human brain compare to a modern CPU in energy per bit?

Can someone compare the energy efficiency of human brain as a computer ? What is the energy in joules / flop ? may be some reasonable assumptions on the computational load of common tasks such as ...
2
votes
2answers
268 views

What is a good model for computing water dropping on a surface?

Before introducing my question I would like to outline the fact that I'm a coder, so I can be wrong when using some kind of terminology. What is a good model for computing the flow, the shape and all ...
2
votes
2answers
131 views

Wave simulation without reflection on the boundaries [duplicate]

I would like to numerically simulate a wave (let's say in a string) with different boundary conditions: Fixed endpoints Periodic Boundless $\varphi(x, t)$ is the value of the wave (vertical ...
2
votes
0answers
148 views

Coordinate system for numerical simulation of general relativity

Lets say i want to simulate the differential equations of GR with some numerical method. I can express the Einstein tensor in terms of the christoffel symbols which in turn can be expressed in terms ...
1
vote
0answers
145 views

Numerical exact diagonalization of tight binding Hamiltonian

I want to exactly diagonalize the following Hamiltonian for $10$ number of sites and $4$ number of spinless fermions $$H = -t\sum_i^{L-1} \big[c_i^\dagger c_{i+1} - c_i c_{i+1}^\dagger\big] + V\sum_i^{...
1
vote
1answer
118 views

Getting nonphysical results when solving for the index of refraction of a slab?

I'm trying to computationally find the refractive indices (real and imaginary) for a thin slab suspended in air (so the only indices to deal with are air and my material's). I've experimentally taken ...
1
vote
2answers
154 views

Clarification on the Lid-Driven Cavity Problem in CFD

I need some clarifications on The Lid-Driven Cavity Problem. What does it actually mean? I know cavities are bubbles created when a fluid moves through liquid in low pressure zones, but what does the ...
1
vote
1answer
418 views

Thermal conduction through 1D rod with changing thermal diffusivity?

I've been working with solving partial differential equations in 1D numerically using the finite difference scheme. My case is for example this: I've got a rod that's insulated around the sides such ...
1
vote
1answer
802 views

Single slit diffraction simulation (mathematica) [closed]

I'm trying to simulate the Fraunhoffer diffraction at slits(single,double,triple) with Mathematica. In the picture, the red one is analytical result and the green one is numerical result. The ...
1
vote
1answer
76 views

How to model Solar System formation accurately and realistically, Part 1

I've been working on a crude N-body simulator which allows N bodies of equal masse​s to interact gravitationally in 2 dimensions. My goal is to model the formation of Solar System. Each body is ...
1
vote
0answers
1k views

Hysteresis Curve and how to implement it using Preisach model or other models

As a homework I need to draw a hysteresis curve (preferably an interactive one) using Matlab or any other programming language. The problem is I have trouble finding a good algorithm to do so. I need ...