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
1answer
69 views

Bond order correlation function

I am trying to compute the bond order correlation function, $g_6$. It is defined based on the bond order parameter: $$\psi_6(x_i) = \frac{1}{N_i}\sum_{i=1}^{N_i}{\exp(i6\theta_i^j)}$$ where $\theta_i^...
0
votes
0answers
110 views

Efficient numerical evaluation of Wigner function

Suppose we want to calculate the Wigner function of some state $|\Psi\rangle = \sum_{n=0}^{N_{max}} c_n|n\rangle$ ($|n\rangle$ are the eigenstates of the Harmonic oscillator) numerically. Starting ...
0
votes
1answer
117 views

How can the analytical solution of the diffusion equation be used for a series of $N$ positions?

Given the exact solution to the diffusion equation: $$C(x,t) = \frac{1}{\sqrt{4 \pi D t}} \exp\left[-\frac{x^2}{4 D t}\right]$$ I am unsure as how it can be applied to a 1D series, as this equation ...
0
votes
0answers
30 views

Computational solution of exponential decaying wavefunction tail

As I am going through some (quite simple) computational physics exercices I have a question concerning one exercise that involves solving the radial Schrodinger equation. This is done with the ...
0
votes
1answer
306 views

Motion of the center of mass of rigid bodies in space

For the classic two body problem, I know that the motion of the center of mass is a straight line (with respect to an inertial frame), provided that the bodies are considered as point particles. Now ...
0
votes
0answers
45 views

Amplitude of a wave: will it be an overlap of two waves or is there another reason?

For a wave with initial conditions and with a velocity = 1.00 m / s the following graph was obtained: The spatial domain is [0; 50] m and the time domain is [0, 50] s. The wave reaches the boundary ...
0
votes
1answer
35 views

How do I determine the accuracy of this two-dimensional potential field?

Let's say I want to solve this problem. I know the values on the boundaries and I guess an initial solution on the rectangular grid inside these boundaries, see figure below. Potential=10 on ...
0
votes
1answer
57 views

Importance of analytic solutions to Hamiltonians

Why is it important to attempt to find an analytic solution for any theoretical model? It usually happens that many of the hamiltonians written to model the system may not usually have exact solutions....
0
votes
0answers
40 views

How to decide step size(sigma value) in MCMC routine related Cosmological Parameter estimation?

I am running a modified Lambda-CDM in MCMC routine using Montepython and CLASS code, with aim to extract parameter values from Planck data. In addition to the original 10-15 parameters for Planck ...
0
votes
1answer
95 views

Integrating a function defined in Matsubara frequencies

I am writing a code for the numerical evaluation of susceptibilities. The formalism is explicitly written on the Matsubara axis (fermionic case) and in the heart of the procedure lie multiple ...
0
votes
0answers
38 views

Is simulating the interaction of multiple particles possible in $0$ spacelike and $3$ timelike dimensions?

In multiple time like dimensions it is possible for particles to effect it's own past, and two particles can both be effected by each others future. I tried to simulate the interaction of multiple ...
0
votes
0answers
29 views

How do I convert raw Electric field wave data into a frequency spectrum?

My collaborator performed some FDTD simulations for me and sent me the E-field information by mistake instead of the frequency spectrum collected at a certain point. What is the best way to convert ...
0
votes
1answer
67 views

Computational limits of the universe?

Is our theoretical data storage size and processing bounded by physical laws? I would assume computation is, but is information storage limited by entropy or the physical volume of the universe?
0
votes
2answers
879 views

Given Max Speed, Max Acceleration and Jerk - How do I calculate time?

I'm developing some python code that controls an end effector moving in a two-dimensional plane (XY). It moves through a list of points sequentially and I'd like to estimate the time it will take as ...
0
votes
0answers
26 views

Question on Structured Adaptive Mesh Refinement (SAMR) grid boundaries

From my review of the literature, it looks like the SAMR methods of Berger et al. have become one of the industry standards in AMR work. This being the case, the question I have must have been ...
0
votes
0answers
112 views

FFT for data sets without any well defined frequency

I am trying to implement FFT algorithm on a data (density of particles) to obtain structure factor. The problem is that in MATLAB (and probably any DFT algorithm which is out there) the assumption is ...
0
votes
0answers
37 views

Models of Inflation

I'm trying to get an overview of cosmological models which include inflation. My aim is to study the numerics of nonlinear Klein- Gordon equations which in fact are the Friedmann equations in the FRLW ...
0
votes
0answers
79 views

How to calculate electric potential distribution of nodes in subgrid using FDM?

Boundary: the potential of the upper electrode is 7 V, and lower is 0. Potential of two edges is shown in the following figure. It is easy to calculate the potential distribution of nodes using ...
0
votes
0answers
104 views

Action describing a scalar field in a classical curved background

Been trying to derive equation (6.54) in Quantum Fields in Curved Space by N.D. Birrell & P.C.W. Davies (p. 162): \begin{align} ^{(2)}H_{\mu\nu} &\equiv \frac{1}{(-g)^{1/2}}\frac{\delta}{\...
0
votes
0answers
38 views

Simulating wave-speed in a spring under tension

I'm wondering, in a simulation of a one-dimensional spring, how do you accurately model wave-speed? I'm working on a problem like this, and my approach was to break the string into many segments. At ...
0
votes
1answer
230 views

Material tangent stiffness matrix for linear elasticity

I am trying to find material stiffness matrix for linear elasticity for finite element code, $$\mathbf{\sigma} = \lambda \hspace{1pt} \operatorname{tr}{\left(\mathbf{\epsilon}\right)}+ 2\mu\mathbf{\...
0
votes
1answer
41 views

How do I calculate the wavenumbers for a Broadband CARS system?

I had the question when I was reading a paper by Camp (High-Speed Coherent Raman Fingerprint Imaging of Biological Tissues), and I've been researching how to calculate wavenumbers from the 4 wave ...
0
votes
1answer
284 views

Numerically solving the Schrodinger equation via finite difference [closed]

This is not strictly a question about physics but about the numerical solution to a physics problem. I am solving the Schrodinger equation via finite difference, via the substitution I solved this ...
0
votes
1answer
174 views

dVolume/dt= inflow-outflow and ∇⋅𝑣=0

First, I had to say I am very confused about fluid mechanics. Here is one question about continuity question. For the incompressible flow, and density is constant, we have the continuity equation ∇⋅ �...
0
votes
0answers
80 views

How does one compute mutual and self inductance for real coils?

I have computer models where I am trying to compute the mutual inductance between two coils. I have simplified the model in the following picture where I have two coils, 1 and 2, with different ...
0
votes
1answer
30 views

How to change speed based on gravity, and angle of movement?

I am making a simple coding project where a white dot is orbiting another dot. I could not find a mathematical formula to change the speed of the dot based on its movement direction proportional to ...
0
votes
0answers
63 views

Heat Equation - Rectangular

so I'm a little confused. I have the following 2-d heat equation, $$ \rho c\frac{\partial T}{\partial t}=k\left(\frac{\partial^2T}{\partial x^2}+\frac{\partial^2T}{\partial y^2}\right)+Q, $$ applied ...
0
votes
0answers
214 views

Can I determine if the flow laminar or turbulent from the vorticity?

I made a 3D model and i get a numbers for the vorticity but i can't know if this numbers can used to determine if the flow is laminar or turbulent. and if yes what is the critical value of the ...
0
votes
1answer
213 views

Finite Difference Method Heat Equation problems at boundary between two materials

For a project I am assigned to solve the heat equation in a 2D environment in Python. To do this, I am using the Crank-Nicolson ADI scheme and so far things have been going smooth. I would also like ...
0
votes
2answers
231 views

Reynolds Transport Theorem for Rotating Pipe

I have a problem that I'm trying to solve for an engineering application. Maybe I have the wrong assumptions, or expectations of the underlying physics; but maybe one of you can help clear that up. ...
0
votes
0answers
102 views

Can angular momentum be affected by internal forces in a rigid body system?

This question is motivated by my interest in understanding the angular momentum and energy of a figure skater doing a stationary spin where they move their limbs away from and towards their body to ...
0
votes
1answer
52 views

Will the equilibrium energy remain same for different temperatures in the 2d-Ising model?

I am doing a numerical simulation of the 2D-Ising model using the Metropolis algorithm. One of the plots that we were asked to make was Energy vs Monte-Carlo Steps for different starting Temperatures. ...
0
votes
0answers
87 views

Quantum Well Eigenvalues - Newton-Raphson

The eigenvalues of a quantum well must obey: $$\tan \left( \sqrt{\frac{a^2 m_e^* E_n}{2 \hbar^2}} \right) = \sqrt{\frac{(V_b-E_n)}{E_n}}$$ and $$\cot \left( \sqrt{\frac{a^2 m_e^* E_n}{2 \hbar^2}} \...
0
votes
1answer
236 views

How to get the phase transition diagram for a coexistence phase simulation?

I am running a lammps program to get the phase transition diagram. one for gold and the other for silicon. I am measuring the melting point by investigating the growth of each phase at different ...
0
votes
0answers
27 views

How do you set the phase space area for the simulation of a quantum system?

I am simulating a quantum system where I am evolving a Wigner function so i have a grid where I have the X-vaues and P-values. Now, I want to run the simulation for a phase space area of $\hbar$ or ...
0
votes
1answer
234 views

Is there anywhere online where I could simulate the schrodinger equation with different Hamiltonian's? [duplicate]

I have a code which simulates the Schrodinger equation and it works good for the harmonic potential, I have checked that. Now, i have changed the Hamiltonian, I have the results but I want to compare ...
0
votes
0answers
98 views

What is order of the Wolff Cluster algorithm?

What is the order of the Wolff Cluster update algorithm for Ising Model 2D and 3D?
0
votes
1answer
89 views

Convection current

I am a master student (geology), I seek to ask how one can simulate convection current movement. What the difference between Boussinesq approximation and non Boussinesq approximation, and what are the ...
0
votes
0answers
137 views

Numerically integrating the Friedmann equation at a turning point

I've been solving the Friedmann Equation numerically, using this equation: $$\frac{\dot{a}^2}{H_0^2} = \Omega_{0,M} a^{-1} + \Omega_{0,R} a^{-2} + \Omega_{0,k} + \Omega_{0,\Lambda} a^2.$$ I'm using ...
0
votes
0answers
140 views

Discrete fourier transform with irreducible $k$ points

Not sure if this is the right forum to ask but gonna take the chance. I'd like to numerically do discrete Fourier transforms with irreducible $\bf k$ points in a Brillouin zone but, it seems that with ...
0
votes
1answer
98 views

Complexity of Ab Initio quantum computation of bulk properties [closed]

Background I'm an undergrad studying Computer Engineering, however I switched from ChemE. I just completed Physics 2, however I've a cursory understanding of higher level Physics concepts (Hamilton ...
0
votes
1answer
98 views

Discretization of the induction equation using the Finite Volume Method (FVM)

I am trying to discretize the induction equation using the finite volume method. The equation with the quasi-static assumption is given as $$( \mathbf{B} \cdot \nabla)\mathbf{u} - (\mathbf{u} \cdot \...
0
votes
0answers
54 views

Antiferromagnetic-like interaction, but preferring 120/240 angles instead of 180?

Antiferromagnetic interaction energetically prefers opposite spins for neighbors: rotated by 180 degrees. But imagine there is $S_3$ symmetry: 3 possibilities rotated by 120 degrees and ...
0
votes
1answer
80 views

Computer software with symbolic representation of differential operator

I wrote a matlab code for curl, divergence, gradient, and laplacian as shown below. By changing the value of $h1,h2,h3$, I was able to obtain the Symbolic Representation of result in the different ...
0
votes
0answers
280 views

How to construct the Brillouin zone algorithmically?

For an Open-Source project I am trying to construct the Brillouin zone from the primitive vectors of the unit cell. I need to algorithmically generate the edge points of the Brillouin zone (and which ...
0
votes
0answers
27 views

Algorithmic identification of thermodynamic phases

Assume that the spatiotemporal behaviour of a system $z(t,x,y)$ is given by a model $M(n,m)$. We know that this system can be in different phase i.e. $z$ can exhibit qualitatively different ...
0
votes
0answers
62 views

Numerical inaccuracy in computational verification of Gauss' law

We are verifying a computational method by comparing results to the theoretical results presented by Gauss' law for a uniformly distributed sphere of charge. Points are randomly selected inside the ...
0
votes
1answer
57 views

Bode diagram from transfer function

I struggle with how to plot a Bode diagram from a transfer function. I know that the pools and zeros change the slope and of the magnitude plot and the phase, but I do not understand where the ...
0
votes
1answer
38 views

How can I keep the fermionic behavior of the electrons in Hartree Fock equations, even if I turn off the potential?

In Hartree Fock equations, The concept of Pauli exclusion principle is included in the exchange term (writing the wave function in a Slater determinant form, causes the exchange term). I have written ...
0
votes
1answer
434 views

How do I use Kepler's Laws to propagate an orbit for a Two-Line Element (TLE) Set?

I need to propagate a large number of orbits (get a satellite's position at a certain time) from TLEs (two-line element sets) using Kepler's laws. Ordinarily I'd use a real propagator like SGP4/SDP4, ...