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
1
vote
2answers
1k views

Leapfrog method in Particle-in-cell

Recently, I wanted to write a 3D electromagnetic Particle-in-cell code with C++. I know that I should use leapfrog method, for example, when I calculate the position and velocity of particles,I should ...
1
vote
1answer
335 views

How does the Lennard Jones Potential changes for interaction between particles of different sizes?

I am interested in incorporating a Lennard-Jones potential in a simulation. When the interaction only involves the same type of particle, with same characteristics, we can use reduced units, scaling ...
0
votes
2answers
766 views

How Much Computing Power would be Required to Fully Simulate a Cubic Meter? [closed]

Imagine you want to simulate a cubic meter down to the particle. By following the Standard Model and other basic physical equations, how much computing power would be required to do this, in say, a ...
0
votes
2answers
89 views

Big Data Handling at the LHC

My understanding is that much of the data that is is collected at the Large Hadron Collider is similar to that in the image below, and that a vast amount of the data contains little of specific and ...
0
votes
2answers
309 views

Numerical Tools and Related Resoures for Bohmian Mechanics

I am trying to do some simulations using the de Broglie - Bohm formalism and am wondering if there are computational tools that already exist in this area. I generally use Python, but will consider ...
0
votes
4answers
312 views

How to propagate $E_x (x,t) = \exp(-t^2/\tau^2-i\omega_0 t) \exp(-x^2/w_0^2)$ in finite difference time domain (FDTD) analysis

Finite difference time domain (FDTD) allows to solve differential equations for time evolution. For example, we can analyze ultra-short pulses in free space by solving the Maxwell's equations. The ...
0
votes
1answer
128 views

Possibility of simulating quantum physics and relativity [closed]

I must be clear; this is not a 'specific' question, but rather a hypothetical one. As of now, computer physics simulations are becoming more and more advanced, and I am programming one now. I was ...
0
votes
1answer
136 views

Montecarlo simulation, Metropolis algorithm

I'm trying to study the thermodynamics of an N particles system in a fixed volume. In particular, I'm using Metropolis algorithm for simulating the dynamics of such system. My interest is to calculate ...
0
votes
1answer
101 views

How to simulate gravitational interaction of bodies in space?

I want to try simulating some bodies in space using the basic formulas I learned in my college mechanics class. So I know Newton's Law and some basic mechanics equations: $\vec{F} = G\frac{m_1m_2}{r^...
0
votes
2answers
642 views

What is meant by Time/Length scales in Numerical/Computational Physics?

What is meant by the 'natural' time/length scales which some mathematical equations define?
0
votes
2answers
747 views

Must-know topics for Computational Fluid Dynamics (CFD)

My undergrad major was Electrical Engineering. My MS thesis is related to simulation of hydrogen movement in a complex geometry. I did take a course on Fluid Dynamics but I have to say it wasn't one ...
0
votes
3answers
748 views

Meaning of “Gradient with respect to coordinates of particle” in SPH

I'm currently trying to implement a simple SPH simulation based on a variety of papers. However as I'm not a trained physicist nor mathematician I have a small issue with the following notation and ...
0
votes
1answer
48 views

Are numerical relativity solutions actual solutions to the Einstein Field Equations?

Perhaps this requires a more advanced knowledge of differential equations, but are solutions in numerical relativity (for example, the merger of two black holes) actual solutions to the Einstein Field ...
0
votes
1answer
38 views

Units in orbital modeling

I'm trying to make a simulation of simple planetary orbits in Python (with only Earth and Jupiter) and was wondering if there are any convenient units one could use? I currently have the gravitational ...
0
votes
1answer
63 views

Useful resources and softwares for computational astrophysics

I am recently working on computational astrophysics. My research is mainly focused on accretion processes around compact objects (black holes & neutron stars), radiative transfer and modelling of ...
0
votes
2answers
67 views

Evaluating the quality of Monte Carlo simulations for 3D Ising model

Suppose I have developed a new Monte Carlo method, and I plan to test this method on studying the magnetization of a 3D Ising model at some non-zero temperature $T$. The coupling is nearest neighbor, ...
0
votes
1answer
120 views

Can anyone tell me how can draw shadow of black hole like in presented in Intersteller movie? Is there any code for it in Mathematica or in Python? [closed]

Equation of motion for photon $$ \Sigma \frac{dt}{d\lambda} = aL\left(1-\frac{r^2+a^2}{\Delta}\right) + \omega\left(\frac{\left(r^2+a^2\right)^2}{\Delta}-a^2 \sin ^2\theta\right)\ , $$ $$ \Sigma\frac{...
0
votes
2answers
433 views

Runge Kutta 4 for orbits and Newtonian Mechanics

How can I use the Runge Kutta 4 method to solve orbits of Newtonian Mechanics, with position vector $\mathbf x$, velocity vector $\mathbf v$ and acceleration vector $\mathbf a$? Do I still have to ...
0
votes
2answers
44 views

Programmatically generate valid density matrices of arbitrary dimension

I would like to generate a random $N\times N$ density matrix for a program. My current technique works for qubits but I suspect there are much more elegant ways. For a single qubit state, I write $\...
0
votes
1answer
93 views

Implementing a Monte Carlo Simulation for the Gaussian Model

I want to implement a Monte Carlo simulation of the 1D Gaussian Model (the continuous generalisation of the Ising Model). That is the statistical mechanical model with the following Hamiltonian: $$ H ...
0
votes
2answers
121 views

Evolution of the virial ratio in $N$-body sim

I have run an 2D $N$-body sim to simulate the cold collapse of a galaxy. Initial conditions: $N=500$, all velocities=0, positions generated randomly within a circle of radius $R$. The system is ...
0
votes
1answer
377 views

Energy gap in Hubbard model

Let's take a 1D Hubbard model $$H=-J\sum\limits_{i} \sum_\sigma (c_{i,\sigma}^{\dagger}c_{i+1,\sigma} +c_{i+1,\sigma}^{\dagger}c_{i,\sigma})+U\sum\limits_{i} n_{i,\uparrow} n_{i,\downarrow}$$ with $...
0
votes
2answers
153 views

Can someone please explain the second term of the expression for mass flow across the fluid element?

I've recently started studying from the text "An Introduction to Computational Fluid Dynamics" by Versteeg and Malalasekera. I'm currently on the topic of derivation of the fundamental governing ...
0
votes
2answers
364 views

Numerically solving a particle in a box problem

A particle in box problem can be simplified to second order differential equation as: $$ -\frac{d^2}{dx^2}\psi(x)=E\psi(x) $$ with the boundary conditions: $$ \psi(1)=\psi(0)=0 $$ The goal is to ...
0
votes
2answers
1k views

Diffusion of gas into vaccum

I'm interested in solving the diffusion equation for gas in vacuum. I have a general question and a more specific questions. What I know: The Diffusion Equation: For density function $\phi(\vec{\...
0
votes
1answer
56 views

The meaning of $\vec {\dot r}$ in the solution of a particle's movement in the space

Suppose I have a charged particle $q$ with mass $m$, and an infinite long wire that lies on the $z$ axis, in which flows a constant current $I$. My ODE that describes its motion is $$\vec {\ddot r}=\...
0
votes
1answer
676 views

How do we define capillary number in 2D (two dimensions)

In 3D the capillary number $Ca$ is defined as: $$Ca=\frac{\nu \rho U}{\gamma}$$ where $\nu$ is the kinematic viscosity ($m^2/s$), $U$ is the velocity ($m/s$)and $\gamma$ is the interfacial tension ($N/...
0
votes
1answer
322 views

Broken Thin Lens Algorithm [closed]

We all know the thin lens equation. For $o$ being a horizontal object distance and $f$ being the focal length, the horizontal image distance $i$ is described by: $$\frac{1}{f} = \frac{1}{o} + \frac{...
0
votes
3answers
150 views

How physical objects (e.g. Earth and Apple) are aware and do computation about each other? [closed]

For example, in Issac Newton's famous story, how Earth and Apple are aware that they are at distance r of each other? How they can compute their movements?! Above ...
0
votes
2answers
312 views

Grand canonical ensemble with interaction, simulation doubts

First of all, this is a follow-up of my first question. The idea is the same, every state would consist of some particles in a line (with an energy associated) and the particles can not be nearer than ...
0
votes
2answers
53 views

Simulation of Feynman path integral in literature

Can someone provide me a numerical simulation of Feynman path integral? Where the contribution of each path is added individually so that I can understand how much do the paths outside the light cone ...
0
votes
2answers
79 views

Equations of motion: Calculate location of point [closed]

The scenario is that a user is dragging an object on a touchscreen. I want to calculate the position of the object as the finger drags it across the screen. I also want to account for any acceleration ...
0
votes
1answer
50 views

Numerical simulation for spontaneous parametric down conversion

I want to numerically simulate the SPDC (spontaneous parametric down conversion) process. I have a basic background on nonlinear and quantum optics — I am a graduate student and just took a few ...
0
votes
2answers
68 views

Question about FFT analysis of a signal

In labs we had to measure the oscillations of a pendulum using an electric sensor. So basically, my data consists of time and voltage (which represents amplitude) pairs. The task was then to perform ...
0
votes
2answers
153 views

Numerical method for first-order non-linear differential equation

So I'm modeling a cycler on a 1000 m race track using the equation $$\frac{dv}{dt}=\frac{P}{m}\left(\frac{1}{v}\right)-\frac{k}{m}\left(v^2\right)-ug$$ where $P$ = power, $m$ = mass, $v$ = velocity of ...
0
votes
1answer
44 views

numerically integrating a trajectory in polar coordinates

So I've reduced my problem to not being sure how to integrate a trajectory in polar coordinates. Suppose I have a free particle and I express its Hamiltonian thus: $H =\eta_{ij}P^iP^j,$ where $\...
0
votes
1answer
62 views

Sampling Maxwell-Jüttner distribution for non-unity mass and speed of light

I am trying to sample Maxwell-Jüttner distribution using the Sobol method as described in Zenitani Loading relativistic Maxwell distributions in particle simulations (2015). Equation (2) in the paper ...
0
votes
1answer
36 views

Optical Logic Gates using Polarisers [closed]

I am trying to build an optical logic circuit using the horizontal or vertical orientations of light as the two binary states and laser as the source. Before I ask you my question I wanted to first ...
0
votes
1answer
108 views

How can I use Runge-Kutta4 to solve this orbit in polar coordinates?

I want to simulate a simple orbit of a planet moving around a star which is fixed in position. I have formulated the ODEs for this problem using Lagrangian Mechanics and have found the equations of ...
0
votes
2answers
66 views

How to animate a ball rolling down an incline?

I'm using Lagrangian mechanics to come up with the equations of motion for a ball rolling down an incline. I've come up with the following two equations. $$\begin{alignat}{1} \dot{x} &= \frac{2}{...
0
votes
1answer
59 views

Why does it become difficult to sample configuration during a phase change in Monte Carlo simulation?

I recently read in a paper that Monte Carlo integration is very slow near phase transitions. I couldn't understand the concept properly. The paper is Phys. Rev. B 95, 035105 (2017).
0
votes
1answer
40 views

Is it possible to efficiently update the ground state of an Ising lattice after a local change in the fields?

The Hamiltonian of an Ising model can be written as: $$H(\mathbf s) = \sum_{i<j}J_{ij}s_i s_j + \sum_i h_i s_i$$ where $s_i \in \{0,1\}$ are the spins on each site. The ground state is the spin ...
0
votes
1answer
61 views

When intersections of trajectories in Poincare sections are possible?

If we get intersections of some "trajectories" in non-standard 2D Poincare sections, that have been obtained from numerical integration of Hamilton equations for autonomous system in 2D coordinate ...
0
votes
1answer
74 views

Solving analytic solution to 1st, 2nd and 3rd order

I'm currently reading a review paper on quintessence (https://arxiv.org/abs/1304.1961) and in §3.1 he plots the evolution of the equation of state parameter $w$ with the scale factor $a$. He produces ...
0
votes
1answer
319 views

How to simulate a phase transition in Molecular Dynamics?

I am trying to simulate the phase transition for gold and silicon separately using LAMMPS. I got the melting point for gold right using the below code. ...
0
votes
1answer
179 views

“Non-smooth” flow of liquid poured from a milk carton

With milk poured from a newly opened carton, I have observed over the years that the flow of the liquid starts off flowing smoothly and continuously but after some time t becomes "sporadic" in such a ...
0
votes
1answer
2k views

What is a stoquastic Hamiltonian?

Recently, I've often read about the term 'stoquastic Hamiltonian'. But I couldn't find a precise definition anywhere. I found that the Ising-Hamiltonian is a stoquastic Hamiltonian, but that does not ...
0
votes
1answer
87 views

Are there some necessary and sufficient conditions that a system can be modeled using Monte Carlo Methods?

Is there a certain set of conditions a system need to follow such that it can be effectively modeled using any "general" Monte Carlo method, maybe to find some average value of a thermodynamic ...
0
votes
1answer
309 views

Double Pendulum - equation of angle with respect to time [closed]

First of all I am in grade 12, last year of my IB diploma programme. I'm familiar with derivatives and integrals but nothing as complex as these Lagrangians, Hamiltonians or other university-level ...
0
votes
2answers
733 views

How to use numerical methods to determine the eigenvalues of TISE?

I've successfully used numerical methods to derive the TISE solution for a Simple Harmonic Oscillator potential problem. I'm able to plot graphs of the Wave equation. Is there a way which I can make ...

1
15 16
17
18 19
24