Questions tagged [computational-physics]
Computational physics is the study and implementation of numerical algorithms to solve problems in physics for which a quantitative theory already exists.
465
questions
4
votes
2
answers
169
views
Redefining velocity field to make it divergence free on the grid level
I am currently working with convection equation $\frac{\partial C}{\partial t}+u\frac{\partial C}{\partial x}+v\frac{\partial C}{\partial y}=0$. I assume that the velocity field is incompressible i.e. ...
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
197
views
Speeding up 3 body problem acceleration calculation
I want to find optimizations to my code for the 3BP, and more specifically computing accelerations. I'm using a data-driven approach, so I have a bodies structure ...
2
votes
0
answers
80
views
Preventing an Overflow in Exponential Integrating Factor
The following is the Discrete Spectral Vorticity Evolution PDE for incompressible flow:
$$ \frac{\partial \Omega_{pq}}{\partial t} = \nu \left( \frac{\partial^2 \Omega_{pq}}{\partial x^2} + \frac{\...
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
2
answers
1k
views
Understanding leapfrog integration algorithm
The leapfrog.cpp is an implementation of leapfrog integration algorithm where f() function is being integrated:
leapfrog.cpp
<...
0
votes
1
answer
77
views
In level set fluid structure interaction method why can we rewrite the elastic force in this form while there is no shear force?
when we consider a Immersed Membrane Without Shear, we can define a regularized elastic energy as $$\mathcal{E}(\varphi)=\int_{\Omega} E(|\nabla \varphi|) \frac{1}{\varepsilon} \zeta\left(\frac{\...
1
vote
0
answers
79
views
Solving perturbed Einstein Boltzmann equations using RK4
I'm trying to learn to numerically solve the perturbed Boltzmann-Einstein equations in cosmology using the RK4 method.
These are the equations:
$$\dot{\Theta}_{r,0}+k\Theta_{r,1}=-\dot{\Phi}$$
$$\dot{\...
0
votes
0
answers
56
views
OpenFOAM- write interval changed after restarting simulation
I am running a pimpleFoam simulation on a supercomputer. I have to submit it as a job which has an allocated time. The simulation I was running ran out of this allocated time. So then I restarted it ...
0
votes
0
answers
158
views
Damping not working in Verlet simulation with absolute constraint
I'm trying to build a simple physic simulation with Verlet intergration, which I'm currently implementing as such:
...
1
vote
1
answer
57
views
Will hashing become vulnerable to quantum computers?
My knowledge of these subjects is reasonable but limited so please correct anything I say that is wrong.
As I understand a hash, with today's technology, is virtually irreversible.
Also, any good hash ...
1
vote
1
answer
310
views
Euler's Method for fast moving particle trajectory
I'm trying to figure out how a magnet affects the trajectory of a particle travelling near the speed of light downwards toward the ground. The equation for the force of the magnetic field is pretty ...
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}...