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

What scale can you run a full QM simulation? [closed]

What is the scale that you can completely simulate a system using a QM formulation without approximations? One atom? 10? 100k?
0
votes
1answer
38 views

How to calculate spin texture in $k$-space?

I have a triangular lattice model. In $k$-space, it is written as: $$ H = \sum_k\sum_\sigma \Psi_{k\sigma}^+ h_k\Psi_{k\sigma} $$ where $\Psi_{k\sigma} = [a_{k\uparrow}, b_{k\uparrow}, c_{k\uparrow},...
3
votes
1answer
1k views

Determining velocity of moons

I have a question that I believe is relatively easy to answer, I am working on an $N$-body simulation of a fictional star system and am having trouble finding the velocity of moons so that they will ...
0
votes
2answers
35 views

How can I make a ball oscillate after being attracted to a certain point? [closed]

I have a ball that needs to oscillate around a certain point (mass spring), I've posted 2 more post that really helped me out figuring how to do that (unfortunately there were closed, I'll try do a ...
1
vote
1answer
53 views

How can I learn about collision of elastic bodies?

I'm writing a program that needs to be able to simulate a system of elastic bodies, that can collide with each other and with other rigid bodies, and deform accordingly. I think it would be an ...
2
votes
3answers
81 views

Conservation of momenta in the solar system

I am writing a python program to simulate the universe and I had a question regarding conservation laws. As rightly stated in these answers, "Both are conserved if you consider the whole system ....
0
votes
1answer
42 views

What kind of physics project are related to computer science? [closed]

I am writing this question in other to know how does physics enter the field of computer in terms of making project. As I am a student I want to know what kind of project can I start with that could ...
-2
votes
0answers
21 views

What is the possibility with motor simulation in Ansys? [closed]

Is it possible to use a motor's power to run another motor in Ansys. If yes then what tools in Ansys I will be needed.
3
votes
2answers
181 views

Is numerical lattice wavefunction smooth? — graphene tight binding case

I tried to follow exactly Sec. II.K [page 112-113, Hamiltonian after Eq. (113)] of the standard Review of Modern Physics paper on graphene, which is a tight-binding model of a graphene stripe under ...
0
votes
1answer
74 views
+50

Can we predict harmonic generation from Maxwell's equations?

One typical experimental setup to generate harmonics from a laser pulse is to irradiate some plasma stab with a laser, register both reflected and transmitted waves, and the spectrum of those waves ...
0
votes
3answers
211 views

Calculate Heat capacity with temperature and total energy

I have a molecular Dynamics simulation and want to calculate the heat capacity with constant volume of my material. As output parameters I can get temperature, potential energy, kinetic energy, total ...
0
votes
1answer
72 views

How can I reproduce this mass-spring effect? [closed]

I am trying to reproduce the multiball object of this app (you can download it to see by yourself). Press 'e' if you want to emulate the object on your computer (this is a tablet program). Here is a ...
1
vote
0answers
21 views

What is the easiest way of calculating Fermi surface averages numerically?

I am interested in calculating Fermi surface averages, which are defined as $$ \langle X(\mathbf{k})\rangle = \frac{1}{N_F}\sum_{\mathbf{k}}\delta[\epsilon(\mathbf{k})]X(\mathbf{k}),\quad N_F=\sum_{\...
0
votes
1answer
39 views

Dirac equation vs relativistic Hamiltonian

The fine structure can be derived by considering the relativistic Hamiltonian and also adding corrections for magnetic fields, etc. For hydrogen these effects are small, which makes it easy to obtain ...
0
votes
0answers
26 views

Find the coordinates of the tennis ball touching the court [closed]

I am currently working on a computer vision project related to tennis. In summary, using this video and python OpenCV I extracted the ...
25
votes
1answer
8k views

Software for calculating Feynman Diagrams

Is there a software (open source preferred) where I would input something like "Ingoing: a fermion $(p1, s1)$ and a photon $(p2, s2)$. Output: A fermion $(k1, r1)$ and a photon $(k2, r2)$" and I would ...
2
votes
1answer
99 views

Help with diagonalizing a BdG Hamiltonian

I am working on a simulation which diagonalizes a BdG Hamiltonian; let's start with one of the form: $$\hat{H}=-t\sum_{<r,r'>,\sigma}\hat{c}^\dagger_{r\sigma}\hat{c}_{r'\sigma}+\sum_{r}\Big(\...
0
votes
0answers
24 views

How to generate a complete set of doped (substituted) structures?

I'm trying to analyse doping in a certain material in low concentrations. I'm approaching the problem by taking crystallographic unit cell of that material, then expanding that to a 2x2x2 supercell ...
0
votes
0answers
39 views

Computational Physics Resources [duplicate]

I was wondering if anybody could please recommend any computational physics books please? I have a background in data science and I picked up the effective computation physics book by Kathryn Huff up. ...
0
votes
2answers
230 views

Hydrogen in a box

I would like to approximate the 1S wave function of a system constrained to a box $\{(x,y,z)|x\in[0,a],y\in[0,b],z\in[0,c]\}$, subject to the potential of the hydrogen atom. I have proposed the ...
0
votes
0answers
18 views

Software packages for calculating Feynman diagrams [duplicate]

I am trying to calculate the two and three-loop divergences in a certain quantum field theory. This is beyond the domain where I can do anything by hand, and I would appreciate any recommendations ...
1
vote
2answers
409 views

General relativity and computing with tensors

In Riemannian Geometry (or Pseudo-Riemannian too), all of the operations performed are in general position dependent. For example, the metric tensor $g_{\mu\nu}(x)$ is dependent on position $x^i$ for ...
1
vote
0answers
14 views

Equations for implementing a 2D FDTD plane wave incident at an oblique angle with Bloch periodic boundary conditions

I am interested in modeling a periodic device via 2D Finite Difference Time Domain method (FDTD), in order to calculate the reflection and transmission from a single-frequency plane wave incident at a ...
0
votes
0answers
16 views

For an arbitrary Ising model, is there any numerical method to calculate its free energy with polynomial cost?

Specifically: calculate the expression: $$ \sum_{s_i=\pm 1}exp(A_{ij}s_is_j) $$ Where index $i = 1 \sim M$, and $A_{ij}$ is an arbitrary real symmetric matrix. I am trying to find a method with ...
2
votes
1answer
80 views

Discretization of Newton's Equation with velocity perpendicular to gradient

Suppose I have a function $f:\mathbb{R}^n\to\mathbb{R}$ and $g(x)=\nabla_xf(x)$ and $H(x) = \nabla^2 f(x)$ are its gradient and Hessian matrix. I have the following ODE system $$ \begin{align} \dot x(...
0
votes
1answer
38 views

Computing the analytic solution to the non-homogeneous 3D wave equation

I'm working on solving the non-homogeneous equation numerically. $$ \frac{\partial ^2 w}{\partial t^2} = a^2 \nabla^2w + \Phi(x, y, z, t)$$ with initial conditions $$ w= f(x, y, z) \space \text{at} \...
3
votes
1answer
164 views

Choosing initial condition for Hamilton-Jacobi PDE from initial $x$ and $p$

For separable solutions to Hamilton-Jacobi PDE (say in 2D), we treat the Hamilton's principal function $S$ as $$S= W(x) + W(y) - E*t$$ and treat the separate parts as constants and find $W(x)$, $W(y)$...
1
vote
2answers
372 views

Vortex in a pipe / Solutions or approximations?

I want to study a vortex flow in a pipe; in other words helical flow. A couple introductory texts on fluid mechanics (e.g. Shames, Mechanics of Fluids) describe the solution to vortex flow in 2D: $$V_{...
-1
votes
0answers
29 views

How to solve nonlinear second order ODE in Matlab? [migrated]

I am working on simulating a car suspension system using Matlab. Specifically, I have to derive equation of motion using the Lagrange method and then use ode 45 to solve it. However, while using ...
2
votes
1answer
74 views

Computing the partition function from a Metropolis Monte Carlo sample

I must be missing something. I could not find an answer in similar posts. Suppose I have an energy $E(x)$ and have sampled many points, $\{x_1, x_2, ..., x_N\}$ through a Metropolis Monte Carlo ...
0
votes
3answers
77 views

Slater Determinant in Python or Mathematica [closed]

Is there any way, maybe a library or package, to calculate Slater determinant in Python or Mathematica? What I want basically is this: I would define a single particle wavefunction and specify the ...
1
vote
1answer
43 views

Determining the capacitive reactance of a capacitor graphically

I measured the voltage and current of an RC circuit with the frequency of $f=105 \;\text{Hz}$. I modified the current with a decade box and measured the voltages ten times. With these measurements I ...
1
vote
0answers
43 views

Higher order expansion term of Baker–Campbell–Hausdorff (BCH) formula [migrated]

I want to calculate unto 20th order, the expansion of Baker–Campbell–Hausdorff formula. In Wikipedia up to 4th order expansion is available. Is it possible to get the expansion term up to 20th order ...
0
votes
1answer
231 views

How to calculate the min Energy in SCF Hartree Fock Calculation?

I have just started writing a program using Hartree-Fock approximation. I have constructed my Hamiltonian (4 by 4 matrix, number of states=4) and found eigenvalues and eigenvectors(4 eigenvectors with ...
2
votes
1answer
50 views

Finding the dominant frequency of a stellar orbit

I was reading this paper on astro-ph (Sanders et al. 2020, "Models of Distorted and Evolving Dark Matter Haloes"). It's about modelling the gravitational potential in a cosmological ...
1
vote
0answers
45 views

Numerical code Friedmann equations [closed]

I have to write a numerical code to solve the ‘Ω-form’ of the Friedmann equation: H(t)^2/H_0^2 = Ωmat/a^3 + Ωrad/a^4 + Ωk/a^2 + Ωx/a^3(1+w) ...
0
votes
1answer
24 views

How can I process many time series to determine which are oscillating?

I have a simulated system of many particles (440) and want to determine if any of their velocities are oscillating or showing oscillatory behavior. I've tried looking at each of the velocity time ...
0
votes
1answer
339 views

Calculating atomic forces from total force and torque on molecule in molecular dynamics (MD)

I guess this problem applies to any body that is composed of a small number of particles, but for the sake of simplicity and concreteness, let's consider a classical model of a molecule consisting of ...
1
vote
1answer
241 views

Bypass valve, pressure and flow rate

I have no background in thermodynamics or fluid dynamics, so please bear with me. Refer to the following figure: A working fluid with a flow rate of $1~kg/s$ enters a heater at a pressure of $1~MPa$ ...
1
vote
1answer
77 views

CERN ROOT resource recommendation

During my BSc., I used Python, C and Scilab in addition to Excel to perform data analysis on lab experiments. However, unfortunately I never got the chance to use ROOT which is one of the most widely ...
2
votes
2answers
77 views

Time stepping in Rigid Body Dynamics

When simulating the interaction of 3D rigid bodies, how do you decide which object to advance its state first? If you advance all bodies at the same time there will be intersection/constraint ...
2
votes
0answers
50 views

Renormalization Group approaches to many-body problems: An algebraic perspective

This is related to a question I asked a few months ago here. I haven't looked at it again until recently because I was busy with something very different, but now I am coming back at it and wanted to ...
0
votes
0answers
10 views

How to model total internal reflection in waveguides?

I was trying to solve a slab waveguide numerically using finite elements, but I could not figure the correct boundary conditions between the two dielectrics to force evanescent waves in the cladding ...
2
votes
1answer
60 views

Rigid Body Simulation with Joints

I have read the basics of how force based physics simulation works and how you can create joints by enforcing certain constraints on the forces between two rigid bodies. What is unclear to me is what ...
1
vote
2answers
61 views

Solving numerically, the position of a rocket from its forces

So how would you solve this equation of the rocket, to find the position of the rocket as it changes with time? $$T(t) - m(t)g - kv^2 = m(t)a$$ Thrust(changes with time) - weight(changes with time) - ...
2
votes
1answer
375 views

Why does my Hartree Fock/SCF code work for small molecules (water, methane etc) but goes crazy for slightly larger ones (Benzene, Butadiene etc)?

I made a Hartree Fock code, in the psi4 package, following the formulas given on this page: http://sirius.chem.vt.edu/wiki/doku.php?id=crawdad:programming:project3 When I use the same geometry they ...
0
votes
1answer
80 views

Application of KT?

I am not familiar with physics and I am lost about how should I actually apply this to the result from the computer simulation. I would like to apply 𝑘𝐵𝑇 to the results of the computational ...
1
vote
2answers
425 views

Obtaining Transmission Coefficient of Beam Upon a Linear Potential

I would like to determine the transmission coefficient $\mathcal{T}$ for a particle beam $$\Psi(x,t) = A_o e^{ikx}e^\frac{-iE_ot}{\hbar}$$ with energy $$E = \frac{\hbar^2k^2}{2m}$$ incident upon a ...
3
votes
2answers
539 views

How does light actually interact with different materials? - Physically Based Rendering (PBR)

I am a computer graphics guy in the area of physically-based rendering and recently I've been searching on the net to figure out how physical is Physically Based Rendering (PBR). The nature of the ...
3
votes
0answers
75 views

Large-scale rotational invariance in lattice space

It is often claimed among physicists that rotational invariance can emerge at large scales in lattice space. Let's focus on quantum mechanics for now. I interpret this claim as follows (I am a ...

1
2 3 4 5
29