All Questions
Tagged with computational-physics python
80
questions
0
votes
0
answers
32
views
Help needed in generating a list of radii
I am trying to generate a list of radii between two given points (0 and 1 in this example). Below is my code in Python to generate the list.
...
0
votes
0
answers
55
views
Why is Magnetic Susceptibility not showing the expected transition in 2D&3D Ising Model?
I'm trying to code the Ising Model with the metropolis algorithm to study the ferromagnetic-paramagnetic transitions. The code seems to work ; the equilibration happens. While equilibrating, the ...
2
votes
1
answer
122
views
Different Results for Double Pendulum
In this study, (Hidden Fractals in the Dynamics of the Compound Double Pendulum) the authors provide various fliptime fractals (of a double pendulum) for different length combinations. However, when I ...
1
vote
0
answers
87
views
Regarding the difference between Metropolis-Hastings and Wolff algorithm (synchronous vs asynchronous) applied to Ising Model?
I am trying to self-learn concepts at the intersection of physics and programming. When reading up on the Ising Model, I find that the typical programming tutorial (such as this one) covers the ...
0
votes
0
answers
104
views
How to minimize a numerical integration in python?
I need some help to minimize a numerical integration. It's about a classical problem in physics (hydrogen atom). It can be solved analytically but I need to solve it numerically in Python.
We have an ...
2
votes
1
answer
191
views
Solving non-linear partial differential equation numerically: $u_{xx}+u_{yy}=\mathrm{e}^{u}$
To start with, I need to solve this partial equation numerically, but I do not know how to do that. If I try a finite difference method, I face a problem that $u_{i,j}$ is also located in exponential, ...
2
votes
1
answer
205
views
Need help with the python code: Calculating Madelung constant CsCl crystal structure
Need help with the code to estimate the Madelung constant for CsCl lattice:
Cs at (0,0,0)
Cl at (0.5, 0.5, 0.5)
Answer: Converged value I am getting is 0.465. ...
4
votes
1
answer
669
views
Is my differential equation solving code wrong?
I am trying to simulate LLG equation without damping. The equation is
$$\frac{d\vec{m}}{dt} = \vec{m}\times\vec{H}$$
I am solving in spherical coordinates as LLG equation is known to have problems in ...
2
votes
0
answers
108
views
How can we symbolically working out $\phi^4$ theory green's function/propagator and consequences in python?
I am having some difficulty calculating Green's function symbolically in Python for $\phi^4$ theory.
The specific rendition of the $\phi^4$ theory I have in mind can be written as follows.
$\mathcal{L}...
0
votes
2
answers
171
views
Approximating the solution of a non-linear ODE using Python
This is my first time asking a question here, so please tell me if I have made a mistake or if anything is unclear.
I am working on my high school research project on the motion of a ball falling ...
2
votes
0
answers
150
views
How can I incorporate angular momentum in this code?
I'm currently working on the 3-body problem, and I was writing a code to plot the trajectories of all 3 bodies while also manipulating the angular momentum of the system. I found a code online and ...
1
vote
0
answers
31
views
How can the current-voltage relationship of a series of tunneling junctions be most easily computed?
I'm working on a research project with my professor where we're trying to figure out how to determine the necessary semiconductor composition for a solar cell to have a particular bandgap in order to ...
2
votes
2
answers
1k
views
Problems solving 2D heat equation using physics-informed neural networks
I am trying to solve 2D heat equation using the physics-informed neural networks approach. The training loss is decreasing, but my final network outputs make no sense. I am using Python/Pytorch.
2D ...
3
votes
1
answer
890
views
Time and memory required to diagonalize a 18000 by 18000 matrix using numpy in python
Can someone give an estimate of the Time and memory required to diagonalize a 20000 by 20000 complex hermitian matrix using numpy in python ?
0
votes
0
answers
58
views
Eigenvalues of same operator expressed in two different orthonormal basis are coming out different
I have an operator $H$. I express $H$ as a matrix in the orthonormalized $\{ |e > \}$ basis. Then I diagonalize it to obtain eigenvalues, let's say for example $H$ is $6 \times 6$ and the ...