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

1,286 questions
Filter by
Sorted by
Tagged with
9k views

### How to calculate the velocity of fluid at the outlet when density and the pressure drop are known?

I have a U- like pipe. Its inlet has atmospheric pressure $p_o=10^{5} \, Pa$. Vacuum is applied to the other end with a pressure gradient $\nabla p_v=-30 \cdot 10^{3} \, kPa/s$. The total time of the ...
48 views

### Algorithm for solving electromagnetic problems using only forces

Is there any fundamental issue to solving electromagnetic problems with the following algorithm? (practicality aside) i) Set position, velocity, mass and charge for a set of particles. ii) Compute the ...
33 views

1k views

### Interpretation of Stiffness Matrix and Mass Matrix in Finite Element Method

I would like to have a general interpretation of the coefficients of the stiffness matrix that appears in FEM. For instance if we are solving a linear elasticity problem and we modelize the relation ...
60 views

### $E\times B$ drift in strongly nonuniform fields

Potential is defined as $\{\phi,\, 0,\, A,\, 0 \}$; fields are static and depend only on the axial coordinate $x$: $E_x=-\partial_x\phi$, $B_z=\partial_x A$. Charged particle moves in the $\{x,y\}$-...
150 views

### Lattice Boltzmann Method: How is shear flow handled in D2Q5?

I've implemented 2-dimensional, incompressible, high-reynolds fluid-flow using the Lattice Boltzmann Method on a D2Q9 lattice. My main goal is just visual plausibility, not quantitative accuracy. The ...
129 views

### Master equation for the mechanical modes

Consider the standard model of optomechanical systems with a single optical cavity mode coupled to a mechanical oscillator, which is canonically modeled as a FP cavity with one fixed mirror and one ...
30 views

### Physics Event Generators computational Complexity

The computational core of physics event generator is the code that numerically calculates,from first principles, the fully differential cross section $e$. In general terms, a cross section $e$ ...
267 views

I am an electrical engineering student trying to teach myself Finite Element Methods (FEM) through a couple of textbooks and independent study. While I believe that I understand the basic ideas ...
50 views

### Question about the VEGAS-algorithm for numerical integration

Disclaimer: I am not quite sure if this question belongs to Physics SE, if not feel free to move it. Question: I am currently using the VEGAS-algorithm (See e.g. here and here) and i am trying to ...
156 views

As indicated in the title of the discussion, I would like to know if it would be possible to simulate through software based on the finite element method COMSOL Multiphysics the movement of a particle ...
1k views

### Determing 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 ...
145 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 ...
214 views

### Canonical rotations that do not produce computational singularities

Intro On the topic of dynamical systems associated with 3-dimensional rotation of rigid bodies, you will always encounter singularities in the equations of motion that will produce computational ...
63 views

### Root Mean Square Displacement of Diffusion and Radial Diffusion Function

I read, that for normal diffusion the root mean square displacement $\sqrt{\langle x^2(t)\rangle}$ (for particles at the origin) can be interpreted as the mean distance the particles have with respect ...
92 views

### Analytic solution to the Kepler problem from position + velocity initial conditions

I am writing a javascript program (web page) that uses iterative simulation to show the motion and mechanics of a satellite in orbit around the earth. So far, using only circular orbits, it has been ...
39 views

### Solving the Lane-Emden equation via Chebyshev differentiation matrices

Problem So I'm trying to learn spectral methods but I can't quite proceed for some reason. In particular, I have been trying to solve the Lane-Emden equation (which I know how to solve via ...
52 views

### Discrete Harmonic Oscillator matrix representation of $x$ for Quantum Simulation

(The paper I'm referring to in this question is "Quantum simulations of one dimensional quantum systems") I've been trying to understand the paper above, specifically on constructing a ...
95 views

### Computer coding of Perdew Burke and Ernzerhof (PBE) method

I have been assigned the task to write a computer code to implement the Perdew Burke and Ernzerhof (PBE) method. Does anyone know a good reference which can make the coding of this method easier?
154 views

### Efficient numerical evaluation of Wigner function

Suppose we want to calculate the Wigner function of some state $|\Psi\rangle = \sum_{n=0}^{N_{max}} c_n|n\rangle$ ($|n\rangle$ are the eigenstates of the Harmonic oscillator) numerically. Starting ...
37 views

### Which are the right configurations in the Markov chain of a Hamiltonian Monte Carlo algorithm?

I have a question about the Markov Chain Hamiltonian Monte Carlo (MCHMC). Hamiltonian Monte Carlo is known as Hybrid Monte Carlo too. I'll describe the steps of the algorithm. 1) We have at the ...
54 views

### Computational Complexity of Crystallisation?

If we look at crystallisation as a tiling problem, i.e. filling the space with a given set of tiles of arbitrary shape. Then the time that it takes to solve this problem has to be bounded below by the ...
67 views

### Matrix product state (MPS): Creating and understanding a specific 2-site Ising ground state?

I've been trying to better understand matrix product states (in order to implement them in code in the near future), so I'm considering small examples. I was wondering if I could get some ...
55 views

### Double spherical pendulum simulation difficulties

I've been working on a simulation project of mine that I kind of need help with. So, as made obvious by the title, I am attempting to simulate the motion of a double spherical pendulum. I am writing ...
53 views

### Solving the Poisson-Schrodinger equations numerically

I need to find the solution to the Poisson- Schrodinger equation in the newtonian approximation, which are basically coupled differential equations given by: \nabla^2 V=8\pi G M^{2}\...
30 views

### Position Based Dynamics - Cloth Balloon Constraint

I am attempting to implement the cloth balloon constraint from section 4.4 of this paper: https://matthias-research.github.io/pages/publications/posBasedDyn.pdf It is my understanding that after ...