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
6 views

Sublattice model for ternary system

Much like in an earlier post of mine, I'm now calculating the phase diagram of a ternary system (Ag-Al-Cu, to be specific), which has some phases modelled as sublattices (using this publication for ...
asbjos's user avatar
  • 25
1 vote
0 answers
52 views

Off-Axis magnetic field ($B_z$ @ $\rho=0.5 R$) of a finite solenoid

I am doing mathematical modelling in MS Excel Spreadsheet for axial magnetic field (Bz) at different distances away from the centre for a finite model. I see small hump at the fringe (i.e. just ...
aronza's user avatar
  • 11
-5 votes
0 answers
32 views

How does theory add to Monte Carlo codes?(in neutrino physics) [closed]

Monte-carlo simulation technique for neutrino physics
Angelo RALAIKOTO's user avatar
0 votes
0 answers
35 views

ODE solver for SHM Oscillator (Leapfrog Method) [closed]

I am struggling with this coding problem requiring me to extend my Simple Harmonic Motion solver to the first nonlinear correction using the leapfrog method. It requires me to introduce an the ...
JNW's user avatar
  • 1
0 votes
0 answers
38 views

Use of Binder Cumulant for Determining Critical Temperature

I am completing a computational project where I am simulating the Ising model using Monte Carlo methods, namely the Metropolis-Hastings algorithm, and the Wolff algorithm. For the Metropolis-Hastings ...
Thomas's user avatar
  • 125
0 votes
1 answer
90 views

Mysterious Action Optimization [closed]

I've been running some simple computational experiments to better understand the principle of stationary action, and have encountered some mysterious examples. Specifically, I'm running an ...
William Lewis's user avatar
-1 votes
0 answers
35 views

I'm having trouble forming skyrmions after relaxation while simulating with Ubermag. Could you help me check if there's an error in my code? [closed]

import oommfc as oc import discretisedfield as df import micromagneticmodel as mm Definition of parameters L = 500e-9 # sample length (m) w = 500e-9 # sample width (m) d = 2.5e-9 # discretisation ...
xiaoxin8949's user avatar
1 vote
1 answer
45 views

Euclidean LQCD not on a lattice?

How much the idea of calculating Euclidean path integrals in LQCD is fundamentally tied to using formulations based on the discretized spacetime lattice? In computational approaches to quantum many-...
mavzolej's user avatar
  • 2,812
-1 votes
0 answers
12 views

Problems performing 1D-FDTD for dispersive dielectric using lorentz model in Julia [closed]

So I am trying to model a dispersive dielectric using the Lorentz model in Julia, more specifically I am trying to obtain the frequency-dependent reflectivity of the material. I am ultimately trying ...
Emre Durmus's user avatar
-2 votes
0 answers
43 views

Python script for a binary orbit [closed]

I am a very beginner in Python. The following code should reproduce the orbit of a binary system. However, when I plot it, I just see straight lines. Are there problems in the for loop or in plot ...
gravitone123's user avatar
1 vote
0 answers
46 views

Intertial finite-size effects in fluid simulations

A gradient $\nabla \rho$ in the density field $\rho$ of fluids at thermodynamic equilibrium is suppressed at a rate given by $D \nabla^{2} \rho$, allowing to measure the diffusivity $D$ of the fluid ...
YoussefMabrouk's user avatar
0 votes
1 answer
44 views

How optimal launching angle is affected by mass?

I'm writing a code to calculate the maximum optimal angle for motion under linear drag and how it's affected by mass. It appears that for the most part this angle is independent of mass and not of ...
KatJ11's user avatar
  • 1
1 vote
0 answers
49 views

Brightness of the light source at twilight computation

I would like to determine the brightness of the light source at twilight based upon its apparent magnitude. In the question here: What are the average wavelengths and brightnesses of sunlight across ...
Geographos's user avatar
-1 votes
0 answers
34 views

Need help in Debugging Fourth-order Runge-Kutta for a differential equation in Python [migrated]

I have been trying to solve this differential equation using Runge Kutta method on Python and have been stuck on it for days now. I haven't been able to get the right result with the code I wrote. ...
Haru's user avatar
  • 1
-1 votes
0 answers
65 views

Deep learning in astrophysics reference request

I am looking for an introductory and possibly comprehensive book/review article for deep learning techniques in astrophysics. I don't know much of the argument, so it should start from the very basis ...
0 votes
0 answers
33 views

Math and Pseudo code paper on black hole binary simulation

I want to do a short practice to see how mass evolve space and how space curvature evolve mass distribution. Most of the GR simulations were rather complicated but I think the black hole binary had ...
ShoutOutAndCalculate's user avatar
0 votes
0 answers
14 views

Computing matter power spectrum using FFT

I have a 3-dimensional density field from a big N-body simulation, and I would like to compute the matter power spectrum $P(k)$ to see how it compares with the one observed by Planck etc. I know that ...
Frogfire's user avatar
  • 147
0 votes
1 answer
50 views

Prime operator for sinusoidal testing function in self-term approximation for Thin Wire using Method of Moments (MoM) $s_m^{'}(x_p)$?

I am implementing thin wire method of moments using W.Gibson's "Method of Moments in Electromagnetics". The approximation for self-term using piecewise sinusoidal basis function is given as ...
Ashish Magar's user avatar
2 votes
1 answer
51 views

Is it possible to solve numerically the classical Yang-Mills for a generic source?

The classical Yang-Mills equation in the presence of a source $J^\nu(x)$ can be written as $$ \partial_\mu F^{\mu \nu} - i g [A_\mu, F^{\mu \nu}] = J^\nu (x), $$ where $F^{\mu \nu} = \partial^\mu A^\...
aruera's user avatar
  • 81
1 vote
1 answer
88 views

Understanding the left-canonical matrix product state

I am trying to understand how to represent any quantum state as an MPS while working through this review by Schollwöck. My goal is to take any random $2^N$ dimensional vector and construct its MPS ...
quics-ilver's user avatar
1 vote
1 answer
59 views

How small is $\eta$ when we say $\eta\to 0^+$ in Green's functions

When we convert Matsubara's imaginary time Green's function to the retarded Green's function, we perform an analytical continuation by substituting $i\omega_n$ with $\omega + i\eta$, with $\eta\to0^+$....
Luqman Saleem's user avatar
0 votes
0 answers
39 views

Inverting a bubble interface to recover the level set function

I have access to some high quality CFD data that includes 2D and 3D level set functions for simulations of bubbles. Masking the level set function using a heaviside is easy and it is a fast way to get ...
Logan's user avatar
  • 1
0 votes
1 answer
63 views

Special relativity velocity addition formula precision [closed]

I tested the special relativity addition formula $$u_{\text{total}}=\frac{v+u}{1+\frac{vu}{c^2}}$$ and found that addition of small numbers converges to smaller speed, but bigger numbers to bigger ...
Vadim Ostanin's user avatar
2 votes
0 answers
68 views

Initial condition of the millenium simulation

I would like to know the initial conditions used for the millenium simulation. More specifically, I would like to know the amplitude of the initial power spectrum $\mathcal{A}$. I have found the ...
konstle's user avatar
  • 758
0 votes
0 answers
42 views

Finding the bound state energies in the MIT bag model numerically for a general bag shape

The MIT Bag Model is a simple model used to describe the properties of bound quarks in Hadrons, without considering the strong interaction between the quarks with the following boundary condition $$(1+...
Amirhossein Rezaei's user avatar
0 votes
1 answer
59 views

How to calculate mean squared displacement (MSD) value as function of Tau (lag-time)

I'm doing a research on Brownian motion (in 2D) and I want to calculate the MSD values in order to find the diffusion coefficient $D$. However, online I find different approaches on how to calculate ...
Naitzirch's user avatar
1 vote
2 answers
150 views

Point load distribution inside elastic solid continuum medium in finite elements method

In finite elements method, when point load is applied to a particular node of elastic solid continuum medium (e.g. soil), does it affect nodal forces in the rest of the mesh (i.e. does each node ...
bigmazi's user avatar
  • 11
1 vote
0 answers
38 views

Numerical evolution of Einstein-Boltzmann equations for cold dark matter

I'm trying to numerically evolve the Einstein-Boltzmann equations for cold dark matter perturbations using Runge-Kutta method of the fourth order. There are 5 standard equations: \begin{align} \dot{\...
hidenori's user avatar
1 vote
0 answers
44 views

Electromagnetic fields in voltage biased conducting strip

Consider a conducting rectangular strip of length $L$ (along x-axis) and width $W$ (along y-axis), with a potential difference (rather EMF $\int E.dx$) V(t) applied. We can assume that V(t) changes ...
evening silver fox's user avatar
0 votes
0 answers
51 views

Understanding chapter 3.1 (Laplace's equation) in Introduction to electrodynamics Griffiths 4 ed [duplicate]

I really need help to understand chapter 3.1. What is the method of relaxation? How can I use the method of relaxation to solve Laplace's equation? How can I use the first and second uniqueness ...
aaa's user avatar
  • 9
0 votes
0 answers
53 views

Regarding Metropolis-Hasting Algorithm

This is motivated by this post Metropolis-Hastings and underlying Markov process. I am also trying to compute the stationary state of the Boltzman distribution by the method discussed in the post. ...
zerozero's user avatar
1 vote
0 answers
38 views

Limit of solving the 1D Heisenberg chain to find the dynamics numerically

I am trying to simulate the dynamics of a 1D Heisenberg chain using Python. I am going step-by-step. There is an external magnetic field along +Z direction. At first we consider a single classical ...
QuestionTheAnswer's user avatar
2 votes
0 answers
51 views

Frequency Response of a Stochastic Oscillator Numerically

I am willing to obtain a frequency response plot for a stochastic oscillator governed by the following equation numerically. $$ \ddot{x}+2\Gamma \dot{x}+\omega_{0}^{2}x=f(t) $$ where $f(t)$ is a ...
Sourin Dey's user avatar
0 votes
1 answer
41 views

Calculating Scattering matrix of a nuclear fusion reaction using Fortran

I am trying to find out the $S$-matrix elements for the reaction: $${}^{19}\textrm{F} + {}^{208}\textrm{Pb}. $$ The model followed is Direct reaction model where the optical potential is: $$ V_{op}(r) ...
Meera Manikandan's user avatar
2 votes
0 answers
38 views

Hydrodynamic interactions and finite-size corrections

In molecular dynamics simulations of fluids it is known that diffusion coefficient $D$ of fluid simulated under periodic boundary conditions in a cubic box with size $L$ decays with a factor $\frac{1}{...
YoussefMabrouk's user avatar
0 votes
0 answers
77 views

Setting up a wall with a slit inside the domain of a 2D wave being solved using the fourier-spectral method

The wave equation is given by: $$ \frac{\partial^2 u}{\partial t^2} = \alpha^2 \cdot \left( \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} \right)$$ If we assume the solution to ...
Thenu Kaluarachchi's user avatar
1 vote
0 answers
34 views

Free energy as a function of temperature over phase transition in molecular dynamics simulation

I've constructed a low density standard MD simulation (in Python), using the Lennard-Jones potential with an Andersen thermostat, of 10 particles in a box V = 10 $\times$ 10 $ \times$ 10 in the NVT ...
erkoo's user avatar
  • 113
2 votes
0 answers
81 views

How non-local can the interactions be for Density Matrix Renormalization Group (DMRG) to still work?

I know that Density Matrix Renormalization Group (DMRG) / Tensor Networks (TN) work well for local Hamiltonians, where on each site I have a fermion or boson, which only have nearest-neighbor ...
mavzolej's user avatar
  • 2,812
2 votes
0 answers
62 views

Diffusive finite-size effects of fluids in periodic boundary conditions

Consider a fluid of given density $\rho [\frac{kg}{cm^{3}}]$ in thermal equilibrium at a given temperature $T [K]$. If at time $t_{0}$ we apply a force $f(\vec{r}, t) = f_{0}\delta(t-t_{0})\delta(\vec{...
YoussefMabrouk's user avatar
5 votes
1 answer
104 views

Acoustic finite-size effects of simulated fluids under periodic boundary conditions

Consider a fluid simulated in a finite box of specific size. An impulse to the fluid element at the center in a given direction is physically expected to propagate at the speed of sound and attenuate ...
YoussefMabrouk's user avatar
1 vote
1 answer
52 views

Is this finite-difference treatment of the variable-permittivity Poisson equation on a nonuniform grid valid?

Consider the 1D Poisson equation$$\partial_x (\epsilon\partial_x u) = -\rho$$Each site on our 1D grid has an interval to the left $h_l$ and to the right $h_r$. Using a near-central-difference scheme ...
DJames's user avatar
  • 411
2 votes
2 answers
142 views

Book on numerical solution of PDEs

I would like to learn how to solve partial differential equations (first and second order, e.g. Poisson, etc...) numerically with finite differences. Which book can be recommended if one want it to ...
0 votes
0 answers
42 views

How do you solve the eigenproblem for the adiabatic Grover algorithm?

The adiabatic version of Grover's algorithm relies on a straightforward solution of the Schrodinger equation when the Hamiltonian is allowed to linearly vary from its initial state to its final state. ...
requiemman's user avatar
0 votes
0 answers
41 views

Predicting atomic dipole transition properties (reference request?)

I am interested in the question of how to predict the strengths of atomic transitions. A quantum 101 approach to solving this problem involves calculating an integral like $$ \int R_{nl}(r)R_{n'l'}(r) ...
Jagerber48's user avatar
  • 13.8k
1 vote
1 answer
65 views

Does anyone have a good source for writing a Finite Volume Solver

As a pet project I want to try and write my own finite volume solver for a two-phase flow problem. However, while I understand the basics of FEM I have never written a code that solves anything before....
0 votes
0 answers
23 views

How do you determine the Pull Direction for a GROMACS umbrella sampling simulation to generate the most accurate free energy value?

I am trying to calculate the free energy between a protein and aptamer using GROMACS. Literature has indicated that one of the best way to do so is by performing an umbrella sampling MD simulation ...
unit vector's user avatar
0 votes
1 answer
71 views

Numerical simulations of standard model

Is standard model simulation a current and possible branch of research, or is it just lattice QCD?
Matteo's user avatar
  • 65
1 vote
1 answer
121 views

Finite Differencing with Incompressible Navier-Stokes Equations (Only Advection)

I'm trying to improve the advection method in a 2D-windfield. The Navier-Stokes Equations (NSE) are currently used for the influence of pressure, viscosity,... I am just focusing on the convective ...
CFD98's user avatar
  • 13
0 votes
0 answers
30 views

Dealing with discontinuous phase issue in computing winding number numerically

Consider a 1D SSH model with winding number given by $$\nu = \frac{1}{2\pi i}\int_{-\pi}^\pi d\phi,$$ where $d\phi$ is the change in phase of the eigenvectors between nearby $k$ points. The phase is ...
Sean's user avatar
  • 101
1 vote
2 answers
96 views

Questions regarding a derivation in Understanding Molecular Simulation: From Algorithms to Applications, 3rd ed, pp 141-143

Recently, I've been learning molecular dynamics using the third edition of the book, Understanding molecular simulation: from algorithms to applications. During reading your book, I have encountered ...
Izzy Tse's user avatar

1
2 3 4 5
36