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
-2
votes
0answers
17 views

How to Plot Circle, Fade out Sound Mathematica? [closed]

My Professor is having me do a lab to learn the basics of mathematica, and I'm trying to figure out exactly how I would plot a circle chart with a radius of 2 [![Professor's Instructions ][1]][1] I ...
2
votes
1answer
80 views

Numerical calculation of density of states

I am trying to figure out the numerical interpretation of density of states for a fermionic system under a periodic potential. The equation for the density of states reads $$ DOS(E) = \sum_{k \in BZ, ...
1
vote
0answers
37 views

Software for qualitative graphs/cartoons?

I have various tools at my disposal, and a lot of use cases that they don't seem ideal for. My current application is a graduate class in chaotic systems, but this is a chronic problem for me both in ...
0
votes
0answers
30 views

Finding the thermal state for a finite dimensional Hamiltonian

Given a finite dimensional Hamiltonian $H$ (a $N\times N$ matrix), I am interested in computing numerically it's associated thermal/Gibbs state $$ \left|\psi_\beta \right> \equiv \frac{1}{Z}\sum_{...
0
votes
0answers
18 views

Mathematical Modeling - Metallurgical Composition (spatial and temporal) of a mineral from first principles

Problem Given the initial compositions of the "melting pot", could one define a mathematical model that expresses the spatial and temporal variation of the composition of a rock over a fixed ...
2
votes
0answers
44 views

Intensity along null geodesic

Let $\mathcal P$ be a bundle of light with a continous spectrum of frequencies $\nu$ emitting from $x^\mu$ in a static spacetime $g_{\mu\nu}$ (e.g. kerr-schild) in the direction $n^\mu = \frac{p^\mu}{\...
2
votes
1answer
47 views

How to obtain position data from acceleration without forward euler?

I am doing a investigation into the Wilberforce Pendulum and in order to find the position and rotation at any time I have attached my phone onto the pendulum in order to use Phyphox, a app that finds ...
1
vote
0answers
12 views

References about implementing 1D tight binding models and evaluating the topological polarization

I'm looking for books, articles or even directly bits of codes about implementing simple 1D tight-binding models such as the one described by the hamiltonian: \begin{equation} H = \sum_{j\sigma}(-)^j\...
1
vote
2answers
62 views

Simulating Interactions in QFT without differential equations

As I understand it in QFT interactions are generally modeled as being from the exchange of virtual particles. If I was to think of how to simulate a classical analog I would model two spheres A and B,...
0
votes
0answers
6 views

Numerical integration scheme for solving the Riccati differential equation [migrated]

I have a Riccati differential equation of the form $$ u'(t)+u(t)^{2}=f(t),\qquad\qquad\qquad (1) $$ with a certain initial conditions $u(0)=u_0$. The function $f(t)$ is actually a discrete function of ...
0
votes
0answers
22 views

Does the undecidability of the spectral gap problem provide a meaningful approach to hypercomputation?

I recently learned about the Spectral Gap Problem (given the configuration of a certain type of physical system, determine if it's gapped or gapless) and how it's undecidable (determining whether or ...
1
vote
0answers
42 views

Entanglement spectrum of a superconductor

Consider the Hamiltonian $$ H = \sum_{k} \epsilon_k c_{k}^{\dagger} c_{k} + (\Delta_k c_{k}c_{-k} + h.c.) $$ where $\epsilon_k$ and $\Delta_k$ are that of p-wave superconductor. So we have ...
2
votes
2answers
112 views

Is there a variable mass Verlete like integration algorithm?

I'm currently modeling the explosion of a star. For my simulation, I use a Verlete like integration algorithm. This is quite common in celestial mechanics modeling. The thing is that now that I have ...
0
votes
0answers
17 views

One large energy barrier vs. two small energy barriers

I am studying the reaction pathway of oxygen evolution reaction (OER) on a PtNi alloy catalyst using density functional theory (DFT). What I found is that, for different intermediates, the most ...
0
votes
1answer
49 views

Simulating the Ising Model, but with three states instead of two

Recall the homogeneous Ising energy of a configuration σ in the absence of a magnetic field is given by the Hamiltonian function $$ H(\sigma) = -\sum_{\langle i~j\rangle} \sigma_i \sigma_j , $$ where ...
2
votes
0answers
24 views

Conserved charge in Density Matrix Renormalization Group(DMRG)

Currently I am facing a problem which relates to the conserved quantities in DMRG. I use old-fashioned DMRG (Steven White approach) to compute the ground state of certain models. However, the ground ...
1
vote
0answers
27 views

Trajectory in a discrete field

I am not sure if this question is more maths, physics, or computer science, but here we go. Let's say we have a scalar field $\phi(\vec{x}): \mathbb{R}^2 \rightarrow \mathbb{N}$ but we only have ...
1
vote
0answers
48 views

Time-step of numerical simulation

I am doing a numerical simulation including a double quantum dot and a periodic probing signal. The simulation works in a very simple way: take the initial state at $t=0$ to be $\psi_0$ evaluate the ...
0
votes
1answer
49 views

Do numerical MHD codes contain particles?

Does an MHD code contain charged particles, or does one just numerically solve the MHD equations? Also, can you suggest a good introductory book/paper to learn the basics of MHD codes?
-1
votes
1answer
45 views

Plotting of a function [closed]

How to plot a complicated function in Desmos? Such as the inter-atomic potential of NaCl which is $ V(x)=\frac{1}{4\pi\epsilon } \frac{Qna*Qcl}{x} +A\exp(\frac{-x}{B}) - \frac{C}{x^6} ...
3
votes
1answer
185 views

Do these Lagrange equations of 1st kind exhibit numerical instabilities?

I followed the lead of "Theoretische Physik", 1e, 2015 by Bartelmann et al. (pp. 171 - 174) to form the set of constituting Lagrange equations of the 1st kind for the double pendulum: eight ...
3
votes
0answers
68 views

Quartz crystal resonance frequency simulation

Is there an open source/scientific software package that would allow to simulate Quartz crystal resonance frequency for specific cut angle, crystal geometry and temperature? How would one approach ...
0
votes
1answer
75 views

Numerical solution to background equations of cosmology

I am trying to solve the background equations of cosmology numerically using Runge-Kutta Dormand prince method with simplified assumption $8\pi G=1$ and $c=1$. The equations are $$ \ddot a = -\frac{1}{...
-1
votes
1answer
121 views

How can I find phase angle based on mouse movement?

It's me again with my ball problematic, after 3 closed questions that really helped me out I figured out I would make a short video, so you'll have a better understanding of the problem. I have this ...
0
votes
2answers
50 views

Are there materials for which mechanical stress depends on higher-order derivatives of time than strain rate?

I've only ever seen it said that mechanical stress depends on strain or strain rate (or both?) and I'm wondering if there are any materials/consitutive equations which involve higher-order derivatives ...
0
votes
1answer
24 views

Conversion of Mass mixing ratio (MMR) to Volume mixing ratio (VMR) and Dobson Unit?

I am trying to convert MMR to VMR and then convert VMR to Dobson Unit (DU). I used three different methods but I get bizarre values. I used the following method to convert to Dobson Conversion ...
0
votes
1answer
46 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},...
0
votes
2answers
41 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 ...
2
votes
3answers
86 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
94 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
24 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
86 views

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
1answer
47 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
31 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 ...
1
vote
0answers
41 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
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 ...
0
votes
0answers
17 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 ...
0
votes
1answer
39 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} \...
1
vote
0answers
15 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
3answers
92 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 ...
2
votes
1answer
83 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 ...
2
votes
1answer
88 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(...
1
vote
1answer
44 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
46 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) ...
2
votes
1answer
52 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 ...
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 ...
1
vote
1answer
81 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
0answers
53 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
64 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
2 3 4 5
29