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

Refocusing light field images via Fourier Slice Photograph theorem

I am trying to refocus images from a microlens array light field using Ren Ng's Fourier Slice photograph theorem found in his thesis chapter 5, equation 5.7, which is available at https://stanford.edu/...
1
vote
1answer
44 views

Number of nodes in Hartree-Fock solution

The Hartree-Fock equation for atoms is of the form $\left[\frac{d}{dr^2}+f(r)-\epsilon\right]P(r)=g(r) \tag1$ Usually algorithms to solve this equation assumes that the number of nodes of $P(r)$, ...
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 ...
4
votes
1answer
56 views

Can you numerically compute a trajectory by direct minimization of the action functional?

Is there a numerical approach to compute simple projectile motion by directly minimizing the action functional? I was thinking that the trajectory is essentially a least cost path through phase ...
1
vote
0answers
30 views

Can I have detailed balance without reverse updates?

I am implementing a Markov Chain Monte Carlo algorithm and want to obtain a stationary distribution. In order to do this I want to have detailed balance, as this is a sufficient, although not ...
1
vote
1answer
36 views

Finite computational power of universe vs continuous nature of unbounded particles

I am not a physicist, but I've worked to make this an intelligible question for SE. What information is exactly and how it is stored in the universe is still being studied, but here Seth Lloyd gives ...
0
votes
0answers
28 views

Solve the 1D poisson equation by integrate twice the charge density

Let's say I have a set of data ((1-D)array) called charge density along the z direction (obtained from DFT calculation)and I want to integrate it twice with respect to z coordinates points (i.e., if $\...
1
vote
0answers
24 views

Can you explain how the pseudopotential method is used to calculate band structures for a senior physics student?

My senior project is about calculating the band structures using the pseudpotential technique through writing a mathematica code for some materials such GaAs. I have read about the topic and I knew ...
0
votes
0answers
21 views

Simulation of the Delta Kicked Rotor in Momentum Space

I am trying to work through this paper which goes through the Atom Optics Kicked Rotor. Starting with the Hamiltonian: $$ H = \frac{p^2}{2m}+ K \cos(2k_Lx)\sum \delta(t-nT)$$ This corresponds to a ...
1
vote
1answer
56 views

Gyroscope Equations of Motions

I want to compute the motion of a gyroscope system like in this figure to show the different motions for different initial condition and then study precession and nutation motions. The problem is that ...
0
votes
0answers
16 views

Solve two equations with bvp4c Matlab? [closed]

I need to solve two differential equations, where I have two boundary conditions for every equation. Because of that I choose Matlab method bvp4c to solve this system: ...
-2
votes
0answers
35 views

Given displacement find position [closed]

I'm programming projectile shooting game where I want to show the beginning distance d of a trajectory. Given start position, launch angle, direction vector, velocity vector, velocity magnitude and ...
0
votes
0answers
25 views

Solving the scattering field equations to get FDTD equations

I was going through a paper FDTD method for the scattered-field equation to calculate the radar cross-section of a three-dimensional target published in the Journal of Computational Electronics(2018)....
-1
votes
0answers
22 views

Unconditionally stable numerical method for 1st order non-linear coupled ODEs? [migrated]

I am attempting to numerically solve the following system of ODEs: $$\begin{gather}\frac{dT_1}{dt} = f_1(T_1,T_2), \quad T_1(t=0)=T_{1,0} \\[3pt] \frac{dT_2}{dt} = f_2(T_1,T_2), \quad T_2(t=0)=T_{2,0}...
0
votes
1answer
36 views

Fluctuating magnetization curve in ising model

I am working on Metropolis-Montecarlo algorithm for 2D Ising model in python partly based on this document. I ran the simulation for 100 times on a 25 x 25 lattice with external magnetic field B = 0. ...
2
votes
0answers
21 views

Is there a code for Ewald Summation for Dipoles?

Does anybody know if there exists a code that calculates the potential energy for a system with both point charges and point dipoles using Ewald summation? This would be a great help to my Master ...
0
votes
0answers
27 views

Does the degeneracy in dominant eigenvalues of MPS transfer matrix necessarily mean long-range correlation?

A short-range correlated MPS state generally has one non-degenerate dominant eigenvalue in its transfer matrix, and the degeneracy in transfer matrix generally leads to long-range correlation (I'm ...
0
votes
0answers
8 views

Using Implicit Euler with second order differential equations [migrated]

We can numerically integrate first order differential equations using Euler method like this: $$y_{n+1} = y_n + hf(t_n, y_n)$$ And with Implicit Euler like this: $$y_{n+1} = y_n + hf(t_{n+1},y _{n+...
3
votes
1answer
59 views

Extension of classical Liouville operator

Let us consider a classical Hamiltonian system described by the Hamiltonian \begin{equation} H(q,p) =\frac{p^2}{2m}+V(q) \end{equation} where we stick to the case of single particle for simplicity. I ...
2
votes
1answer
28 views

Calculate local linear accelerations from trajectory

I'm trying to simulate linear accelerations and angular velocity of a vehicle which drives on a flat surface. For this, I want to use a trajectory consisting of position ($x_i, y_i$) and orientation $\...
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 ...
3
votes
0answers
93 views

Can quantum computing solve the curse of dimensionality?

Edited version The curse of dimensionality is ubiquitous in machine learning (ML) modeling, stochastic control and reinforcement learning, arising in a probabilistic sense, with strong connections to ...
0
votes
1answer
59 views

Understanding the equations of motion for the Polyakov action in string theory

I want to make a small numerical simulation of how strings in theory move under their equations of motion but I'm getting stuck at implementing the constraints. The Polyakov action reads $$S=-\frac 1{...
0
votes
0answers
32 views

Two-body problem: equal mass keplerian orbit? [duplicate]

Sorry to post a question on this again but I am still struggling putting two equal mass objects in a keplerian orbit. To summarise: 1) I have placed two bodies of masses 0.5 at +- 10 units on the x-...
2
votes
0answers
23 views

Is there a good physical simulation software (mainly refers to the rigid body mechanics simulation)? [duplicate]

I want to simulate the examples in theoretical mechanics and analytical mechanics. I need a mechanical simulation software, which can customize the force field, spring, rigid body, connecting member ...
0
votes
0answers
21 views

Error in FWHM of photo peak

I have spectra for different sources I need to find the FWHM of to determine energy resolution of a scintillation detector. I have taken spectra and then fitted a gaussian to the photopeak: The scipy ...
2
votes
2answers
109 views

Solving Keplerian two-body problem numerically?

I'm trying to solve the two-body problem numerically, setting up G, m1 and m2 =1.0. The masses are placed at the positions -10 and 10 respectively along the x-axis and gave them both 0 on the y-axis. ...
-1
votes
1answer
45 views

Engineering Equation Solver (EES) Entropy returning NEGATIVE numbers [closed]

I am using Engineering Equation Solver (EES). When I try to find Entropy given Temperature and Quality (liquid) at saturation pressure for carbon dioxide I keep getting a negative number. s=...
1
vote
1answer
55 views

Phase-ordering dynamics: numerical solution of the Mazenko equation in $D=2$

I'm considering the Mazenko equation as it's written in https://doi.org/10.1103/PhysRevB.46.10594 (eq. 7) \begin{equation} \label{a} f''+\left(\frac{1}{x}+\frac x 4 \right)f'+\frac \lambda \pi \,\tan\...
3
votes
1answer
41 views

Solving projectile motion using least action principle and level sets

I'm trying to compute 1D projectile motion -- basically throwing a ball up and catching it in the same hand. I want to use Lagrangian dynamics and find a numerical solution out of interest. I ...
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
0answers
9 views

Simulating Thin Film Bulk Acoustic Resonator based on Lateral Field Excitation on COMSOL

I am a beginner to COMSOL and I have to simulate a Thin Film Bulk Acoustic Resonator based on Lateral Field Excitation on COMSOL. Can someone give me a detailed approach on how should I do the ...
0
votes
0answers
11 views

Why the Interaction potentials parametrisations for Bulk system is not working for Nano-systems?

I am studying several thermodynamics properties of crystalline iron oxides (Fe3O4, Gamma- Fe2O3) in their solid phases by MD simulations. At the moment, I am facing many difficulties in simulating the ...
0
votes
0answers
27 views

How to properly implement Newton Cooling in FTCS Heat Equation

I am attempting to model the temperature in 2D plate using the FTCS scheme for the heat equation. The plate is finite, and discretized squarely. I do not want the temperature fixed at the edges. ...
0
votes
1answer
59 views

Simulated gravity equations

I'm working on a game that'll have a (I probably naively believe) simple gravity component and am looking for a couple of equations for the task. Given 1) a ball rolling from point A down (or up) a ...
2
votes
0answers
44 views

“Unnatural” Hamiltonian systems from a statistician's perspective

I would like to learn more about "unnatural" Hamiltonian systems, that is, systems whose energies cannot be written as $$H(p,q) = K(q) + U(p).$$ I have seen the term "natural" applied to systems ...
1
vote
4answers
56 views

Selecting Direction to Avoid Other Moving Bodies

I have several point-bodies (shown below in black) moving at constant speed, with no change in orientation. Given an arbitrary point (such as the red point), how can I find which direction to move in ...
2
votes
0answers
38 views

Good resourse for Ising Problem Model

I am student of mathematics, and I will wrote theoretical article about Ising problem in Adiabatic Computation. Do you have a good resource where it is good explaining? In my context I have ...
1
vote
0answers
27 views

What's the point of observing independent samples in Ising Model for a Monte Carlo simulation?

Something about the uncorrelated samples of observations in Markov Chain Monte Carlo(MCMC) simulation of my Ising model has been confusing me. Before I start asking my question, I'll first describe ...
0
votes
0answers
28 views

Looking for a freeware software/app that can solve eigenvalue problems symbolically

I'm taking a quantum mechanics course and my homework involves extremely tedious algebra to solve symbolic eigenvalue problems. I'm looking for a software that I can give matrices with symbolic ...
1
vote
0answers
19 views

What is the difference between the rot_star and nrotstar class in LORENE (Numerical Relativity)

Im doing my final grade work about neutron stars simulations. I need to compute some simulations for different EoS. In the classes, I find two different classes: nrotstar-> I think the n means ...
1
vote
0answers
11 views

Calculating energies in Coulomb regime, is there an equivalent to the Fourier transform for free space?

In free space, one can find the energy decomposition of a wavefunction by using Fourier transform. Is there an equivalent common transformation to do this for a wavefunction in a Coulomb potential? ...
0
votes
0answers
10 views

Proper way of applying absorbing boundary conditions to discrete differential equation system

I have 2nd order $1+1$ dimensions PDE (a wave equation) that I have rewritten as a coupled system of first order equations and discretized the spatial dimension using a grid of $N$ points labeled by ...
1
vote
0answers
36 views

Leapfrog integrator, kill off lower order terms [closed]

Let $H=A+B$ be the Hamiltonian, let $L_A(\cdot):=[\cdot,A], L_B(\cdot):=[\cdot,B]$ denote the Lie derivatives of $A, B$ respectively. We can show that the leapfrog integrator $$ \exp(\frac{\tau}{2}...
1
vote
1answer
29 views

Example of complex system, whose components have string etc. valued properties?

Complex systems are branch of physics, Phys. Rev. E has section about them. Complex systems consist from interacting components, each component has some set of properties whose values can change due ...
4
votes
0answers
84 views

Understanding quantum field theory via simulation

I took graduate QFT course 10 years ago as an undergrad. Did all the homework assignments but it never quite stuck. I think I'd understand the subject better if it were presented differently; ...
-1
votes
1answer
36 views

Generating random change in photon frequency $\Delta \nu$ from angle-averaged isotropic redistribution function

I am implementing the Monte Carlo Simulation Code for the case of photons being scattered by electrons. The paper I'm referring (Hillier 1991, Appendix B) suggests that after each scattering, the ...
1
vote
0answers
39 views

Instability of coupled non-linear oscillators

Consider a bunch of interacting oscillators (e.g., a chain of atoms), interacting due to anharmonicity in the potential energy. You can Taylor expand the force on each oscillator about equilibrium ...
1
vote
0answers
49 views

Propagation of a Gaussian beam using FFT [closed]

I am trying to simulate the propagation of a gaussian beam through a lens using an FFT approach. I tried to implement the approach described by Couairon in this paper at page 43: https://link....
-1
votes
1answer
38 views

Interpreting Slater-Koster files for DFTB

I have a question about interpreting .SKF files, I am using these parameters to model defective graphene, when I use parameter set given here: dftbBaby/C-C (I think this is from Hotbit) or the ...

1
2 3 4 5
24