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
3
votes
2answers
136 views

Why is my two body model not working? [closed]

I have created a simple 1 Dimensional two body particle model in C++. In the model, particle 1 starts at position (0,0) and particle 2 starts at position (1,0). The particles are accelerated towards ...
3
votes
2answers
357 views

Boundary Element Method or Boundary Integral Method Computational Aspects

I have to solve a Helmholtz equation inside a simply connected domain. I know that in general the boundary integral can be written as, $$\phi(x)=\int_V G(x,x') \rho(x')\ d^3x'+\int_S \left[\phi(x')\...
3
votes
1answer
608 views

Update velocity or position first in computation?

I am trying to make a simulation of a vibrating string. The string is divided into $n$ points, and each point along the string is acted upon by a force due to the positioning of its neighbors. I ...
3
votes
2answers
221 views

Why are Markov chains better than naive algorithm for Random picking?

I have a question about the problem of coming up with a random distribution of non-overlapping coins in a given two dimensional space. I don't understand why using the random sequential adsorption ...
3
votes
1answer
199 views

The acceleration of the particles by finite difference [closed]

I would like to approximate the acceleration of a molecular dynamics system. I'm following an online tutorial to solve a set of equations for molecular dynamics. I can use $F=ma$ to calculate the ...
3
votes
1answer
121 views

Jackknife estimation of variance very different from expected variance

I was rapidly introduced to the Jackknife procedure for data analysis and I stumbled upon a problem I'm not able to understand. Let's consider a very simple case: the estimation of the average of a ...
3
votes
1answer
88 views

Is it possible to derive curvature of spacetime from EFEs to create a computer simulation of the solar system? [duplicate]

Background I am a professional scientist (biologist), statistician and a computer programmer, but an amateur physicist so pardon me if this question appears silly. In order to understand general ...
3
votes
2answers
175 views

Numerical modelling of a step function in time in a hydrodynamic system. (Runge Kutta fourth order)

So I'm trying to model a hydrodynamic system that introduces a sudden "jump" in the value of a function at a specific time. The system is solved with a Runge-Kutta fourth order method. I have a ...
3
votes
3answers
722 views

Adding rotation to internal coordinates

I'm optimizing the geometry of a system composed of several interacting masses (a molecule). The energy of the system depends on the relative position of the masses, and all velocities are zero. In a ...
3
votes
1answer
209 views

Looking for a good introductory-level review of pseudopotential methods

I'm looking for a good introductory-level review of pseudopotential methods. In particular, I'd like to understand how the self-consistent pseudopotential methods work.
3
votes
1answer
1k views

Numerical computation of the Rayleigh-Lamb curves

The Rayleigh-Lamb equations: $$\frac{\tan (pd)}{\tan (qd)}=-\left[\frac{4k^2pq}{\left(k^2-q^2\right)^2}\right]^{\pm 1}$$ (two equations, one with the +1 exponent and the other with the -1 exponent) ...
3
votes
1answer
82 views

Can we estimate the coefficient of friction between two objects/materials?

I remember reading that it was impossible to theoretically estimate the coefficient of friction between materials even if their structure was known. The book where I've read this was The Feynman ...
3
votes
1answer
242 views

How to approach a 2-body problem in General Relativity?

I am aware that closed form solution for 2-body problem does not exist. What I am looking for is a numerical solution. I was thinking on how to start to approach this very problem. I am aware of ...
3
votes
1answer
260 views

Why are physical simulations more accurate with floating point numbers “closer to one”?

I've often heard it said that any sort of "dimensional" (involving length, time, mass, charge, etc.) calculation should be put in a dimensionless form for two reasons Getting a value ~ 1e14 when all ...
3
votes
1answer
196 views

What are good ways to check the validity of code to simulate the time-dependent Schrödinger equation?

Recently, I've made some code that can do simple quantum mechanics simulation as written in the title. I wanna check if this code correctly solves time-dependent Schrödinger equation and satisfies ...
3
votes
3answers
723 views

Meaning of transmission coefficient greater than one in a potential well problem

Consider the finite 1D wedge-shaped potential well given by $$V(x)=V_0\left(\frac{|x|}{a}-1\right) \hspace{10pt}\mathrm{for}\hspace{3pt} |x|<a;\hspace{6pt}V(x)=0 \hspace{10pt}\mathrm{for}\hspace{...
3
votes
1answer
86 views

Lattice Boltzmann/automaton derivation for $\omega_{t}+ v\cdot \nabla \omega=\mu \Delta \omega$

So as showed by Frisch et al. (a), the 2D Euler equation $$v_{t}+ v\cdot \nabla v=\mu \Delta v$$ can be derived by the Hexagonal-placed automaton (for low velocity). I am curious about the existence ...
3
votes
1answer
75 views

Symmetry in program for ewald summation

The formula for Ewald summation as given in Allen and Tildesley - $$ U = U^{(r)} + U^{(k)} + U^{(bc)} + U^{self} $$ where the k-space contribution of potential is given by $$ U^{(k)} = \frac{1}{\pi ...
3
votes
3answers
945 views

Why does GW-DFT give higher bandgaps in semiconductors

Usually the GW Density Functional Theory (DFT) gives larger band gaps in semiconductors compared to the LDA and GGA methods. This seems to be related to the screened potential in GW, but it is not ...
3
votes
2answers
304 views

Why is the objective function used in Nudged Elastic Band method reasonable?

In Nudged Elastic Band (NEB) method, which is used to find reaction pathways when both initial and final states are know, an objective function is first constructed and then minimized to find reaction ...
3
votes
1answer
71 views

Lattice Boltzmann Method: How is shear flow handled in D2Q5?

I've implemented 2-dimensional, incompressible, high-reynolds fluid-flow using the Lattice Boltzmann Method on a D2Q9 lattice. My main goal is just visual plausibility, not quantitative accuracy. The ...
3
votes
1answer
85 views

Geodesic equation in different coordinate systems

Suppose I have a Schwarzschild metric in Schwarzschild-coordinates and I obtain the geodesic equations for this metric. Suppose I transform the Schwarzschild metric into a different coordinate system,...
3
votes
1answer
299 views

Bethe-Bloch Equation plotting incorrectly at high energies

Hopefully this is a quick fix, but I've been working on this for 3 days to no avail, so perhaps some external perspective will help. Basically, I'm building a MatLab module to calculate mean ...
3
votes
1answer
244 views

How to code Tensor Networks?

I'm interested in learning tensor networks, I've been reading some introductory articles about this. The problem is that these articles mostly discuss the theoretical definitions for tensor networks ...
3
votes
1answer
109 views

SPH “normal viscosity” prevents rigid body rotation

I am making a half simulator and half game with fluid simulation, using smoothed particle hydrodynamics (SPH) as the model. I was using "artificial viscosity" as my viscosity mainly to dampen ...
3
votes
1answer
414 views

Computing Entropy properly during Molecular Dynamics simulation

When simulating simple system to test out Stat Mech (ie. non-coupled), I was able to compute entropy by binning the particles and using the Shannon entropy formula. For more complex systems, I ...
3
votes
1answer
166 views

Stable disk for $N$-body simulation

I want to simulate a Galaxy of $N$ particles which I have to generate first. What I have done so fare does not lead to the result I want to see. I probably did an error and don't see it. Here comes ...
3
votes
1answer
169 views

Collision between a “spring” and a particle

I am currently attempting to create a simple 2D physics engine, and I just need to know how to solve a certain collision. I have particles, and between any two particles, springs can be connected. ...
3
votes
1answer
752 views

Numerically solving a simple Schrodinger equation with fast Fourier transforms

While trying to solve a stochastic Gross-Piaevskii equation I have found a problem that can be tracked down to something buggy occurring in the simplest Schrodinger equation possible: $$\partial_t \...
3
votes
1answer
577 views

Calculation of long-range forces in Molecular Dynamics - Ewald summation

I am trying to write a code to calculate the potential and forces, for the same using ewald summation.For this purpose, the formula for potential and force I have used is : $$ U = U^{(r)} + U^{(k)} +...
3
votes
1answer
214 views

Complex semi-definite programming

I'm doing some calculations and I want to simulate them in python or matlab (or whatever). However I use hermitian matrices and I don't really manage to find a library which enables me to calculate ...
3
votes
1answer
344 views

confusion in discrete transform to solve kronig penney matrix equation in fourier space

I have a periodic potential $$V(x) =\sum_{K}e^{iKx}V_{K} =\sum_{n}e^{\iota2\pi nx/a}V_{n} $$ where $K =\frac{2\pi n}a$ is the reciprocal lattice vector and $a$ is the lattice constant and $n =\pm 0,\...
3
votes
1answer
149 views

How to determine predicted CP violation for a given SUSY point?

I'm currently studying at the spectra of some supersymmetric models, and would like to know whether the parameter points I'm looking at are ruled out due to excessive CP violation. I am using SPheno, ...
3
votes
1answer
1k views

live Kp index data

I need to create an online service displaying latest Kp index. Where I can take the data? The data should be in machine-readable format, i.e. text files, XML, or CGI gateways, for instance. No ...
3
votes
1answer
285 views

Using Relaxation Method to Model Negative Dielectrics in an electric field?

How can you use the relaxation method to model negative dielectrics? The relaxation method is usually used to model electrostatics problems but negative dielectrics are only see in dynamic systems. ...
3
votes
0answers
57 views

Implications of thermodynamic inconsistency in CFD calculations

During my PhD work I had to use tabulated values of thermodynamic properties of gases in some Computational Fluid Dynamics (CFD in short) simulations. CFD simulations consist in the numerical solution ...
3
votes
1answer
87 views

Choosing initial condition for Hamilton-Jacobi PDE from initial $x$ and $p$

For separable solutions to Hamilton-Jacobi PDE (say in 2D), we treat the Hamilton's principal function $S$ as $$S= W(x) + W(y) - E*t$$ and treat the separate parts as constants and find $W(x)$, $W(y)$...
3
votes
0answers
88 views

Calculate the matrix size for ground states BEC using difference with Gross–Pitaevskii equation

The Ground states BEC at $0$ temperature can be described by Gross–Pitaevskii equation as $(-\frac{\hbar^2}{2m}\nabla^2+V(r)+g|\psi|^2)\psi(r)=\mu\psi(r)$ We limit the BEC in 2D where $V(r)=\frac{1}{...
3
votes
1answer
80 views

Coupling Navier-Stokes and stochastic models for particle tracking in micro-scale free convection?

I have been using a commercially available software to simulate laminar free convection in a specific small domain (let's use channel w/ heated lower wall as an example). The scale is approx 50-100 ...
3
votes
0answers
69 views

What are common methods to remove discretization on experimental measures?

I have some experimental data, and since the measurements are digital, the data is discretized/quantized/rounded/truncated. I need to know if there are general methods, or common methods, to "smooth" ...
3
votes
0answers
57 views

Unexpected behaviour in numerical simulation of polymer

I noticed some strange behaviour when simulating the behaviour of a polymer subjected to an external pulling force at both ends, and would like to better understand its origin. I used LAMMPS to ...
3
votes
1answer
168 views

Solving the Schrödinger equation numerically on a non-uniform grid

I am currently developing a numerical solver, which solves the standard, one-dimensional, time-independent Schrödinger equation $$\frac{-\hbar^2}{2m}\frac{d^2\psi}{dx^2} + V(x)\psi = E\psi \tag{1}$$ ...
3
votes
0answers
388 views

Continuous-time loop computer for NP problems? [closed]

In NP problems we can cheaply (polynomial time) test if a given input is satisfying, but the difficulty is that there is an exponential number of possible inputs - the question is if e.g. there is a ...
3
votes
3answers
264 views

Initializing positions of $n$-body simulations

I'm working on an $n$-body simulation project, and I have a very basic question: How does an $n$-body simulation start? In the script I'm working on, there is a range of forces defined, but they all ...
3
votes
0answers
194 views

Calculating 2 particle Partial Trace for Density Matrix in Zeeman basis for a large number of Spins

I want to trace out all spins but 2 from a density matrix in the zeeman basis for N spins. For N=3 for example I would have the basisvectors: $ |S=1.5, m=-1.5\rangle =|000\rangle, |S=1.5, m=1.5\rangle ...
3
votes
0answers
304 views

Simulation of plasma in tokamak

I am reading some papers on numerical algorithms for simulation of plasma in the context of nuclear fusion in a tokamak. I am getting a little lost as there is a huge number of references, and it is ...
3
votes
0answers
49 views

The definition of fidelity for fermion

The definition of fidelity for two mixed ensembles is $F=Tr\sqrt{\sqrt{\rho_1}\rho_2\sqrt{\rho_1}}$. Now I came across a problem in numerical calculation, Systems A,B are identical, but attached to ...
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 ...