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
0 votes
0 answers
12 views

Is there such a thing as infinitesimal electric field?

I am interested in calculating some response properties, namely, susceptibility and polarizability. In principle, susceptibility should be the functional derivative of the electron density to a ...
user avatar
0 votes
0 answers
10 views

Adding an Impurity as a Perturbation to a Simulation

I am working on some plots corresponding to superconductors (of many kinds). If we insert a vortex, we can view this as an impurity and observe the Quasi-Particle-Interference (QPI). How I go about ...
user avatar
  • 189
0 votes
0 answers
21 views

Orbital animation

I'm no long able to follow the differentials and derivation of orbital mechanics. Given a heavy star like mass W located at (x1, y1, z1) and a small mass at (x2, y2, z2) with a motion/velocity of (dx,...
user avatar
0 votes
0 answers
19 views

3D FDTD - how do I compute number of variables and required number of iterations?

I am trying to solve a an electromagnetism problem via 3D FDTD. I can't quite get (c) and (d). (note: 106 cuts per wavelength has been taken) Here is my solution: I computed (a) and (b) I believe ...
user avatar
0 votes
0 answers
12 views

Shifting polynomials in Fast Multipole Method

There is one thing I don't get about the FMM algorithm (of coulombic potential in 2D - https://cims.nyu.edu/~donev/Teaching/WrittenOral/Projects/JasonKaye-WrittenAndOral.pdf). Suppose we have ...
user avatar
  • 1
3 votes
1 answer
46 views

Cosmology context - MCMC code : Recomputation of covariance matrix after each point accepted

I am working on a MCMC code (basically with Metropolis-Hastings) and I would like to understand different important points. We always mention the covariance matrix which is used in the computation of ...
user avatar
  • 19.2k
0 votes
1 answer
64 views

What does it mean for equations to have not advanced to the point where one could plug them into a computer?

In this article about the EMC effect (in no way relevant to my question), the statement is made: The problem is that the complete QCD equations describing all the quarks in a nucleus are too difficult ...
user avatar
1 vote
1 answer
30 views

Numerical solution to integro-differential equation (Wigner Weisskopf Problem)

The time dynamics of an atom interacting with a reservoir of spectral density $J(\omega)$ are obtained by solving the following integro-differential equation $[1]$: $$ \dot{c}(t) = \int_0^t dt'\int_0^{...
user avatar
  • 99
0 votes
1 answer
24 views

Hartree-Fock on a lattice: how to deal with non-diagonal charges

For a Hubbard hamiltonian, $$\hat{H} = \sum_{i,j,\sigma} t_{i j} \hat{c}^\dagger_{i \sigma} \hat{c}_{j \sigma} + \sum_i U_i \hat{n}_{i \uparrow} \hat{n}_{i \downarrow}, $$ the mean-field solution can ...
user avatar
  • 1,167
0 votes
0 answers
31 views

ODE solver for Hamiltonian evolution of a finitely-dimensional pure quantum state

I want to simulate evolution of a finitely-dimensional pure quantum state: $$\frac{d\psi}{dt} = - i H(t) \psi$$ The wavefunction $\psi$ is a $n$ dimensional complex vector, and the Hamiltonian $H$ is ...
user avatar
  • 6,300
0 votes
0 answers
25 views

Efficient ways of numerically calculating eigenenergies?

I want to calculate the eigenenergies of the ground state, first excited state and second excited state for the Hamiltonian: $$ H = (1-s)H_x + sH_z$$ for $s=0, 0.01, 0.02, ..., 1$. The Hamiltonian $...
user avatar
  • 43
0 votes
0 answers
24 views

How do I solve this nonlinear ODE given the asymptotic series solutions as follows? [closed]

Differential Equation: $$-{\frac { \left( {\frac {\rm d}{{\rm d}R}}f \left( R \right) \right) ^{2}}{2\,f \left( R \right) }}+{\frac {{\rm d}^{2}}{{\rm d}{R}^{2}}}f \left( R \right) +{\frac {{\frac {...
user avatar
0 votes
1 answer
43 views

Program to generate graph of spring-mass-damper system

For a school project, I've been researching mass-spring-damper systems. For this I did an experiment in which I basically filmed a spring with a mass attached to it that went up and down and ...
0 votes
0 answers
10 views

JLA SNDATA working [closed]

Does anyone know how to use Joint Light Curve Analysis (JLA) SNData module (including the download)? I tried to look at the documentation http://supernovae.in2p3.fr/sdss_snls_jla/ReadMe.html#sec-2 ...
user avatar
0 votes
0 answers
17 views

Non-Hermitian eigenvalues from a Hermitian solver

I am using a numerical solver of large dense Hermitian matrices $H$ called ELPA. Is there a hacky way I can use it for non-Hermitian matrices $A$? Only basic matrix algebra is allowed. The best I came ...
user avatar
  • 1
5 votes
2 answers
410 views

What does it mean if the Fermi level crosses into the valence band? How about into the conduction band?

I've been working on this material to get more accustomed to Quantum Espresso, and I've gone on and performed calculations to get their band structures. Here are the band structures that I got for two ...
user avatar
2 votes
1 answer
75 views

How to derive the Lagrangian for a system of first order equations of motion?

Please be lenient if this question has been asked before in a similar manner. My background is in CS, but I am working on the physics-based modeling of complex systems and I am studying physics as an ...
user avatar
  • 121
1 vote
0 answers
53 views

How to calculate the new position at time $t$ of celestial bodies with variable acceleration?

Intro For an $N$-body simulation of celestial bodies I need to calculate on the one hand the accelerations of the celestial bodies based on the received gravitational forces [done] and on the other ...
user avatar
  • 11
0 votes
0 answers
44 views

Simulating microscopic interactions in semiconductors

My device physics book did not really reference QM and the simulation approach it gave basically amounted to solving a PDE under some assumptions in relation to charge flow, recombination/generation ...
user avatar
0 votes
0 answers
45 views

How to calculate the Kretschmann scalar in 3+1 decomposition?

Does anyone know a source for calculating the Kretschmann scalar and/or 4D Riemann tensor using the variables of the 3+1 decomposition? I need to monitor a curvature invariant and calculating it ...
0 votes
0 answers
20 views

Can finite element analysis predict whether flow is turbulent?

Finite Element Analysis in Simulation Software to predict the Reynold's number are computed using the formula$=pVD/u$ or there is a finite element method for this? I was just wondering whether it ...
user avatar
-1 votes
0 answers
23 views

Help in Rietveld refinement using xpert highscore

I work for a space and defence startup and we have been creating novel catalytic materials and performing XRD of the said materials. I have started using xpert highscore to perform Rietveld refinement ...
user avatar
  • 1
0 votes
0 answers
16 views

Are there any resources for simulating the Kuramoto model/solving the system of coupled ODEs for the oscillators?

I want to simulate the Kuramoto model and I am following a review by Strogatz to read up the theory. Are there resources that explain how to simulate the model and solve the coupled ODEs, or the mean ...
0 votes
0 answers
38 views

How to fit Tight-Binding parameters to DFT results in a general situation?

I've been searching for an answer to this for several days and couldn't find what I need. I'm explaining myself: I got the Bandstructure of a MoS2 monolayer using DFT (PBE functionals) and I wanted to ...
user avatar
3 votes
1 answer
142 views

Numerical package for backreaction in general relativity

I am looking for numerical packages (Python/Matlab or some common languages) that can simulate the backreaction of the matter on the Kerr black hole geometry: i.e. assume I have a given initial ...
1 vote
2 answers
55 views

Different fitmodels for different intervals

A number of points were measured and plotted on an XY graph. I want to have the best fit line for this graph. The best fit model for the first part of the graph is described by some function $f_{1}\...
user avatar
2 votes
0 answers
38 views

Numerical methods for modelling non-linear pressure wave propagation in fluids/solids

So far, I only have experience solving the Laplace/(inhomogeneous) Helmholtz/Maxwell equation with boundary conditions using the boundary element method (BEM). So far I have used open source tools for ...
user avatar
1 vote
1 answer
62 views

Using finite difference to solve Cahn-Hilliard Equation in 2D using Octave

I am trying to use the finite difference method to solve the Cahn-Hilliard equation in 2D to study phase separation in metallic glasses. The equation is given as follows. $$\frac{\partial c}{\partial ...
user avatar
0 votes
0 answers
30 views

Why is the unsteady Bernoulli equation inconsistent when applying at different points? I've probably misconceptualised the theory

Unsteady Bernoulli equation: $$\frac{P_1}{\rho}+\frac{{v_1}^2}{2}+gz_1 = \frac{P_2}{\rho}+\frac{{v_2}^2}{2}+gz_2 + \frac{f_hg}{\rho} +\int_{1}^{2}{{\frac{dv}{dt}}ds}$$ I've attempted to apply the ...
user avatar
1 vote
0 answers
31 views

Numerical calculation of berry curvature of Haldane model

I'm currently trying to simulate the Haldane model of graphene and am looking into the calculation of Berry curvature of the finite lattice. I'm using a tight-binding model of graphene with nearest-...
user avatar
1 vote
2 answers
70 views

When setting up 2nd order first derivative approximations in a finite differencing scheme, why are these equations equivalent?

In approximating a first derivative term (assuming $\delta z$ is the distance between two spatial grid points) using a finite differencing scheme I came up with these basic equations: $$\phi \frac{\...
user avatar
0 votes
1 answer
67 views

Calculate efficiency from discrete power, time and distance

I have a sequence of points from GPS and OBD for some vehicles. Each point has the instantaneous power of the engine $(P)$, the time elapsed from the last points $(T)$ and the distance traveled from ...
user avatar
0 votes
1 answer
75 views

Particle number conservation in matrix product state

I've been trying to understand how particle number conservation is enforced in matrix product state algorithms. As far as I understand, if the Hamiltonian commutes with the number operator, you can ...
user avatar
  • 1
0 votes
0 answers
10 views

Issues with imposing periodic boundary conditions in the presence of a gauge field

The issue is if there is a phase winding (like a $U(1)$ vortex), then the PBC are broken due to different phase windings across the lattice. Open BC should be used and these can be built out of the ...
user avatar
  • 189
3 votes
4 answers
751 views

What does is really mean to say that a 3-body problem is not solvable? [duplicate]

What does it really mean to say that a three-body problem (the Sun, the earth, and the moon) is not solvable? Why is it not possible to solve the differential equations on a computer with adequate ...
user avatar
0 votes
0 answers
24 views

How to take care of singularities or discontinuities in a numerical Time-Dependent Schrodinger Equation simulation using the Split-Operator method?

I am currently trying to numerically simulate a two-dimensional Hydrogen atom using a split-operator method (elaborated below). I have tested that the code produces a good result for an isotropic ...
user avatar
  • 15
0 votes
0 answers
24 views

Do most climate models use the absolute temperature or the temperature anomaly under the hood?

Climate models for the climate impact of anthropogenic global warming almost never report the climate impacts of the average global temperature reaching some absolute threshold. Instead, they almost ...
user avatar
  • 41.3k
0 votes
0 answers
20 views

Where can I find a nice simulation of sloshing?

I'm self learning sloshing dynamics and trying to visualize the sloshing effects in rectangular tanks. There are many videos of sloshing simulations, but I want to change the parameters myself to see ...
user avatar
  • 45
0 votes
0 answers
5 views

How to deal with a BiGlobal linear (in)stability analysis (LSA) by spectral method?

I know some basic process of using Chebyshev spectral method to solve a two dimensional Poisson problem. Discritize the compotation domain by Chebyshev-Gauss-Lobatto points: $\pmb{x}=\cos\frac{j\pi}{...
user avatar
  • 1
11 votes
1 answer
849 views

Is the common formulation for (Ising Model) Monte Carlo simulations a bit off?

A common [Ising Model] Monte Carlo simulation repeats the following algorithm: randomly pick a [flip] event compute change in energy $\Delta E$ if new energy is lower than old energy, accept the ...
user avatar
1 vote
0 answers
52 views

In simple English what is meant by "tagging", "triggering", "selection criteria" and "reconstructed events/particles/masses" in particle physics? [closed]

I am currently reading the original Higgs boson discovery paper, "Observation of a new boson at a mass of $125$ GeV with the CMS experiment at the LHC", HIG-12-028, which can be found ...
user avatar
  • 2,181
1 vote
0 answers
34 views

Reference request: Numerical techniques, Monte-Carlo (MC), Density Matrix Renormalization Group (DMRG), Dynamical Mean-Field Theory (DMFT)

I am an undergraduate student and my previous learning in physics is more on theory instead of numerics. I would be very grateful if you can point me to good introductory lecture notes/lecture videos ...
0 votes
2 answers
80 views

How to compute errors from a fit?

I have a set of data with errors, how do I compute the error for the fit $f(x)=a$? I remember there are formulas for the errors in parameters for fit $f(x)=ax+b$, i.e. $\delta a$ and $\delta b$. Where ...
user avatar
0 votes
0 answers
51 views

Pointers for dealing with instability in fluid simulation?

I have been working on a 2D fluid simulator, and I have fallen victim to the problem of jumping in before doing enough research. I naively implemented a finite difference form of the continuity and ...
user avatar
0 votes
0 answers
21 views

Eigenvalue of transfer matrix using Monte Carlo in 2D Ising model

Montecarlo is an algorithm capable of numerical estimation of any quantity which can be written as the average of a state function like, for example, the magnetization or the internal energy in the 2D ...
user avatar
0 votes
0 answers
51 views

Overlap of Matrix Product States (Python)

I'd like to implement the TEBD (finite, real time evolution) by hand (in python) and want to compute the overlap of a reference MPS with the time evolved MPS. I want to regard a simple Ising Chain. ...
user avatar
  • 45
0 votes
1 answer
46 views

Boundary conditions and normalization of wavefunction in time-dependent Schrodinger equation

I came across this confusion when trying to numerically solve the time-dependent Schrodinger equation. The short version of my question is: when solving for time-dependent wavefunctions $\psi(t,x)$ on ...
user avatar
1 vote
0 answers
51 views

Numerical solution of Bethe ansatz equation

In this paper https://arxiv.org/abs/2003.14202, the authors plot the solution of coupled non-linear algebraic equation (Bethe Ansatz Equations): \begin{equation} k_j L=2\pi I_j -\sum_{\beta=1}^M \...
user avatar
2 votes
0 answers
63 views

Numerical calculation of spherical photon orbits near Kerr black hole

I'm using RK4 method for solving differential equation $$\frac{d\theta}{d\phi}=\pm(2-2r)\frac{\sqrt{Q-\left(\frac{\Phi^2}{\sin^2\theta}-1\right)\cos^2}\theta}{2r+\left(r^2+\cos^2\theta-2r\right)\frac{\...
user avatar
  • 177
0 votes
0 answers
38 views

How to determine courant number in a multiphase simulation?

How to determine the Courant number in multiphase flow simulation? I tried to simulate a fluid flow with two phases but it went divergent. How to make the simulation stable? I've read the courant ...
user avatar
  • 1

1
2 3 4 5
32