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

265 questions
Filter by
Sorted by
Tagged with
87 views

### Computation of the heat kernel from Brownian motion

This question is rather simple but I have some difficulties to find code. Let us suppose that I wrote a routine, in a given language, that computes the evolution of a particle doing Brownian motion in ...
451 views

### ground state from the Schroedinger equation with a central potential what happens to the origin

I have code that attempts to implement a solution to the Schrödinger equation where there is a central potential (more or less im thinking of hydrogen), in 1-D using the numerov method to construct ...
389 views

### How to model the mixing of two fluids in a container?

In the context of a research project of mine, I am faced with the difficult task of modeling the mixing of two fluids in a container. I would like to achieve the following: Given a container (...
576 views

### How can I make velocity verlet algorithm more stable?

The answer to this question implies that reducing the time step would make it more stable. However I have tried reducing the time step but the system is still unstable(the total energy increases to a ...
178 views

### Numerical scheme with energy conservation?

I have a set of equations to integrate something in time $t$. At each time step I compute a scalar field $\phi(t)$ and a potential $V(\phi)$. I should also control the conservation of energy with an ...
120 views

118 views

### Non-reflecting boundary conditions for compressible Navier-Stokes equations

I have some questions about the implementation of non-reflecting OUTFLOW boundary condition for Navier Stokes equations. Following Poinsot, Lele "Boundary Conditions for Direct Simulations of ...
125 views

52 views

### Coupled Diff Equation from Bose Einstein distribution

I am a student doing physics hons and have had very little experience in programming. This semester we are supposed to do a computational project in thermodynamics. I have to solve these two coupled ...
92 views

### Tracking the speed of 2D oscillations on a lattice

I wrote a Monte Carlo simulation of the 2D Lotka-Volterra model on a discrete lattice (with periodic boundary conditions). A video that I produced (which images the system after some number of monte ...
332 views

### General case Kutta condition

I'm working on a 2D inviscid fluid simulation using a "panel method", with Potential being used to enforce the no-through boundary condition. I'm trying to incorporate the Kutta condition, which says ...
463 views

### Algorithm suggestion for PDE - example: heat equation

I want to solve the PDE equation numerically. For this, I started my study with something simple; heat equation $$\frac{\partial u}{\partial t}=\frac{\partial^2 u}{\partial^2 x}$$ with the initial ...
354 views

### 2d Euler manufactured solutions

Where can I find manufactured solutions for the 2d Euler equations, with the complete analytical terms, including the Jacobian of the source term ?
137 views

### combination of field and particle methods for fluid dynamics

In numerical fluid dynamics there are field methods like finite-volume, finite-element, etc. and particle methods like Smoothed-Particle-Hydrodynamics – SPH and others. Both approaches have advantages ...
318 views

### I need to scale variables to solve a 2D PDE. What are the physical considerations of scaling?

I am solving a boundary value problem in 2D via an implicit finite difference scheme. Unfortunately, although the problem is well-posed and should have a unique solution, the condition number of the ...
2k views

### Patankar's algorithms for Numerical Heat Transfer and Fluid Flow

I am looking for the algorithm of Patankar (for example, SIMPLE, SIMPLER, SIMPLEC and PISO) written in Fortran for the simulation of heat transfer and fluid flow.
126 views

### Do there exist “frameworks” as to how computational scientific experiments claim validity? Scientific method for computed science?

Do there exist "frameworks" as to how computational scientific experiments claim validity? Like "scientific method for computed science"?
356 views

### Object falling with air resistance using Runge-Kutta

I am not very familiar with differential equations, nor physics in general. I am trying to program an object falling with air resistance with the use of a numerical algorithm called Runge-Kutta. The ...
111 views

### Simple model of Saturn's rings

I’m trying to figure out how to model the rings of Saturn using a particle system for a gravity simulator that I’m making. Using the code below, I’ve managed to create a, if not perfect, decent ring ...
51 views

### Can 3rd order TVD admit perfect shift for Upwind 1D Advection equation?

I recently coded a 1 stage and 3 stage optimal TVD-RK explicit scheme using eqn 3.3 here http://www.ams.org/journals/mcom/1998-67-221/S0025-5718-98-00913-2/ on the equation Ux+Uy=0, where x and y ...
65 views

### Is this a proper implementation of point charge dynamics with ODEs

Since learning about point charges in my physics II class this semester, I want to be able to investigate not only the static force and field distributions but the actual trajectories of movement of ...
101 views

### Monte Carlo Metropolis method - trial step algorithm

I'm working on a Magnetization simulation and writing an algorithm using the metropolis method. I am using a change in energy and a Boltzmann distribution, but, my question is about the trial step. ...
599 views

### (Fortran) Integrating/summing over complicated 3D domain

I have some function $F(k_x,k_y,k_z)$ that I wish to numerically integrate over a polygon domain - physically, I am integrating over the first Brillouin Zone (BZ) of the FCC lattice (a truncated ...
149 views

### Inclined plate capacitor grid/ mesh

You can calculate the electric potential over every point in a defined space by solving Laplace's equation. To do this in a computer program you set up an 2-d array/ matrix and loop the internal ...
74 views

### Langevin equation in 4th order Runge-Kutta

I'm trying to figure out how to translate a piece of code from Velocity Verlet to Runge-Kutta, while treating the time step dependence of the thermal noise correctly. The Langevin equation for my ...
91 views

### Numerically solving a partial differential equation

I am trying to numerically solve the following PDE, $$\frac{\partial u^A}{\partial t} = c_1\frac{\partial^2 u^A}{\partial^2x} \,,$$ where $c_1$ is a constant. The above can be discretized using the ...
82 views

### Two variables integration matlab

I'm trying to solve physical problem in quantum mechanics of helium atoms, the solution require numerical integration over 2 variables. However when i'm trying to run the next code ...
166 views

### Algorithm to generate water flow map, given a terrain

I've posted the same question at GameDev Stack Exchange, but unfortunately I am not getting any response. So I am going to post ( and reword) it here. Hopefully I can get an answer! I have a terrain (...
88 views

619 views

### Open source FEM implementation for Windows

I am wondering is there any robust, well-tested, accurate open source FEM solver package for Windows? I would like to use to power the engine of my structural engineering application. The FEM package ...
122 views

### How does Multi Body Dynamics software work for flexible joints?

I need to model a "fishing rod" in 2 dimensions by joining several "rigid sticks" by flexible/elastic joints. The joints act as plate/torsion springs with different spring constants. The "fishing rod" ...
450 views

### Second order interpolation scheme

On a grid I am having the values of a physical quantity say for example Temperature, at the E,W,N,S and P node all of them being calculated using a second order discretization scheme. I want a second ...
42 views

### Numerical integration of the dataset of a function

The energy equation for a spherically symmetric system is given by $$\mathscr{E}=\frac{v^2(r)}{2}+\frac{c_s^2(r)}{\gamma-1}+\phi(r)$$ where $\mathscr{E}$ is the total energy, $v$ is the velocity of ...
113 views

### Artificial neural networks for Temperature prediction

Imagine I want to consider the temperature for a process given several input varibales. The temperature can be anywhere between 400 and 500 K. Consider I have experimental data to train the network ...