# 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.

452 questions
Filter by
Sorted by
Tagged with
149 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, ...
80 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. ...
648 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 ...
916 views

### Understanding leapfrog integration algorithm

The leapfrog.cpp is an implementation of leapfrog integration algorithm where f() function is being integrated: leapfrog.cpp <...
75 views

29 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 ...
78 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
52 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
258 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 ...
84 views

113 views

### Solving the TOV equation using Python code: How to manage with the pressure at the surface?

I wrote the code to solve the TOV equation using the Euler method but I got a negative density and pressure! I could not fix the while loop correctly (steps until reaching the surface.) Can anyone ...
1 vote
151 views

### Solving PDE on a non-uniform grid with Crank-Nicolson scheme

I am solving a 1D diffusion-type equation with the finite-difference Crank-Nicolson (CN) scheme, and I need to densify the spatial grid around the central point. One could change the spatial variable ...
1 vote
75 views

### Solving PDE on a non-uniform grid with Crank-Nicolson scheme

I am solving a 1D diffusion-type equation with the finite-difference Crank-Nicolson (CN) scheme, and I need to densify the spatial grid around the central point. One could change the spatial variable ...
49 views

### How to specify the value of pressure in a point in solving steady stokes equation numerically?

I try to solve the steady-Stokes equation numerically on , that is \begin{aligned} -\nabla \cdot \mathbb{T}(\mathbf{u}, p) & =\mathbf{f} \quad \text { on } \Omega=[0,1]*[-0.25,0], \\ \nabla \cdot \...
1 vote