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
2 votes
2 answers
33 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
0 votes
0 answers
22 views

Using matlab to simulate a spinning top [closed]

The hamilton equation of inclined angle theta of a spinning top is written in Classical mechanics Kibble 5th edition p.285 (https://physicaeducator.files.wordpress.com/2018/02/classical-mechanics-by-...
user avatar
0 votes
0 answers
14 views

Whole body CT dataset with slicelocation tag [closed]

I'm trying, without results, to find a whole body CT dataset, and being able to import on fluka 2.5 and flair 2.30b, to build then a voxel file. I literally registered to all possible websites, but ...
user avatar
0 votes
0 answers
27 views

Readings on Lattice Scaling for QFT Simulations [closed]

Does anyone have any intuitive and clear readings on how to practically incorporate lattice scaled/non-dimensional units into a lattice QFT program? I'm trying to write some code for small QFT ...
2 votes
1 answer
73 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
49 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
43 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
43 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
28 views

Paper on numerical simulation of metallic hydrogen [closed]

I want to simulate the collision between two gas giant and the inner part of gas giant is metallic hydrogen and solid core, I want to simulate the metallic hydrogen can you please recommend some ...
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
37 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
28 views

Numerical methods for modelling non-linear sound 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
61 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
29 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
30 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
74 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
  • 179
3 votes
4 answers
750 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
22 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
50 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
79 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
49 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
48 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
45 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
50 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
62 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
36 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 vote
1 answer
94 views

A pendulum with the moving pivot

I want to simulate a pendulum whose pivot moves along $x$-direction with some given trajectory $x_p(t)$. The connecting rode is rigid. I derived the following system of equations: $$y^2 + (x_p-x)^2 = ...
user avatar
  • 159
2 votes
0 answers
100 views

Self-Consistent gap equation: numerical solution

I'm trying to calculate the simple self-consistent gap equation in Python. $$\Delta = \lambda \int_{-Ec}^{Ec} \Delta \frac{\tanh\left(\frac {\sqrt{\xi^2 + |\Delta|^2}}{2K_{b}T}\right)}{2\sqrt{\xi^2 + ...
user avatar
0 votes
0 answers
18 views

Calculate optimal new vector for a virtual spaceship

I'm working on a 3D game as a demo for some unrelated technology. In it I have a spaceship that I move in the game engine by applying a force along a vector $(x,y,z)$. So I'm happily flying along ...
user avatar
  • 251
0 votes
2 answers
114 views

Graphing the motion of a driven damped pendulum

$ \ddot{\phi}+2 \beta \dot{\phi}+\omega_{0}^{2} \sin \phi=\gamma \omega_{0}^{2} \cos \omega t$ The equation of movement is written above. I´m trying to plot the value of $\phi$ for different values of ...
user avatar
  • 45
0 votes
1 answer
72 views

Numerical solution of the 2D linear partial differential equation of first order

It is an actual geophysical problem where we study the liquid flow. We measure at each 2D grid point and each time interval three components of the liquid velocity and we want to compute how the ...
user avatar
  • 3
-1 votes
1 answer
73 views

Simulation algorithm question

I have been looking at various simulation algorithms, like Barnes-Hut and a few others, and the Laplace operator, the wave equation, etc., and I was wondering why it's necessary to compute the mass/...
user avatar
1 vote
0 answers
34 views

Sequential updating breaks ergodicity of Metropolis–Hastings algorithm of the Ising model

I believe I have this question under control but I am puzzled at why I have not found people pointing this out. For simplicity consider a 1D ferromagnetic Ising model with periodic boundary conditions:...
user avatar
  • 186
1 vote
0 answers
67 views

How do I visualize a stepwise rotation on the Bloch Sphere using $SO(3)$ and $SU(2)$?

Searching for an implementation (that helps me to understand how $SO(3)$ and $SU(2)$ relate to each other) I came across this interesting question Visual interpretation, on the Bloch sphere, when ...
user avatar
0 votes
0 answers
50 views

Algorithm for solving Poisson's equation numerically

I need an algorithm to solve Poisson's equation for gravitational potential. $$ \nabla^2\phi = 4\pi G\rho $$ where, $\phi$ is Gravitational Potential. I am trying PDE for the first time so, I need ...
user avatar
  • 13
0 votes
1 answer
47 views

Numerical solution to the equation of curvature perturbation

Numerical solution to Mukhanov-Sasaki equation In the above link, an equation is given which is the evolution equation of curvature perturbation as a function of $N$ (number of e-folds). In order to ...
user avatar
  • 11
1 vote
1 answer
64 views

Numerical Solution of least action principle

I am trying to numerically find the path of least action between two points (ignoring the time step normalizing factor): $$S=\sum_i (x_{i+1}-x_{i})^2/2-V(x_i)$$ I don't have the potential in explicit ...
user avatar
  • 1,226

1
2 3 4 5
32