# Questions tagged [diffusion]

The tag has no usage guidance.

76 questions
Filter by
Sorted by
Tagged with
5k views

### Is Crank-Nicolson a stable discretization scheme for Reaction-Diffusion-Advection (convection) equation?

I am not very familiar with the common discretization schemes for PDEs. I know that Crank-Nicolson is popular scheme for discretizing the diffusion equation. Is also a good choice for the advection ...
5k views

### Conservation of a physical quantity when using Neumann boundary conditions applied to the advection-diffusion equation

I don't understand the different behaviour of the advection-diffusion equation when I apply different boundary conditions. My motivation is the simulation of a real physical quantity (particle density)...
365 views

### Computing geodesic distances with diffusion

I am trying to solve an APSP (All-Pair Shortest Path) problem on a weighted graph. This graph is actually a 1, 2 or 3 dimensional grid, and the weights on each edge represent the distance between its ...
220 views

### Optimal way to find stationary solutions of the PDE

I am researching heat diffusion in an optical element irradiated by laser. This problem is described by the PDE which I wrote down in this question. I am using an implicit numerical scheme to model ...
3k views

168 views

### Can heat distribution in an optical element irradiated by laser be oscillating?

I am modelling a heat distribution in optical element irradiated by laser. System is radially symmetric, and element is thin, i.e. heat value depends only on distance from center. Heat is received via ...
2k views

### 9-point stencil finite difference Laplacian with variable diffusion coefficients

So I'm trying to implement a 9-point stencil discretization to the 2D difussion equation. The stencil is here. However, most of the literature deals with a Laplacian that has a constant diffusion ...
172 views

### Is the diffusion equation with Neumann and Dirichlet BCs well-posed?

I am considering the following diffusion equation: $$\frac{\partial f}{\partial t} = \frac{\partial}{\partial x}[D(x,t)\frac{\partial f}{\partial x}]$$ over a grid ...
750 views

### Are the drift-diffusion equations from semiconductor physics analogous to solving an advection-diffusion problem?

I am trying to understand an extra terms that appears when I derive the drift-diffusion equations for semiconductors. The extra term (see below) comes from applying the chain rule to the advection ...
270 views

### Mean-squared displacement in Monte Carlo studies

Is measuring mean-squared-displacement in Monte Carlo simulations uncommon? I'm very interested to find out if this has actually ever been tried. For instance, in the context of spheres, or ...
290 views

### Computation of diffusion time

While simulating the diffusion of a substance in 1D, $$\frac{\partial C}{\partial t} = \nabla \cdot (D \nabla C).$$ I'd like to compute the diffusion time In this link, the diffusion time is given ...
686 views

### Diffusion coefficient when simulating in 2D

Suppose I want to simulate the well-known diffusion partial differential equation in 2D, for example with finite elements or finite differences. Can I directly take physical diffusion coefficients ...
2k views

### Numerical solution of non-linear diffusion equation via finite-difference with the Crank-Nicolson method

I want to numerically solve the non-linear diffusion equation: $$\frac{\partial}{\partial t} T(x,t)= \frac{\partial}{\partial x}\left(T^{5/2} \frac{\partial T}{\partial x} \right)$$ I want to use ...
236 views

### The most efficient way to solve diffusion equation with concentrated initial condition

I want to solve the diffusion equation, i.e. $$\dot{f} - f'' = 0$$ with a boundary condition $f(0) = f(1) = 0$ and with an initial condition that $f$ is a boxcar function concentrated over some ...
543 views

### Two approaches to solving diffusion equation in Fourier space

I want to numerically solve the diffusion equation $\partial_t u = D \partial_x^2 u$ in Fourier space, and can think of multiple ways to do it. Setup Option 1 Differentiating $u$ twice in Fourier ...
228 views

### High frequency noise at solving diffusion equation

I'm trying to simulate a simple diffusion based on Fick's 2nd law. ...
251 views

### Solving the heat diffusion equation with source term

I am trying to solve the 1-D heat equation numerically with a variable source term. The system is basically a tank containing styrene in which it polymerizes to liberate heat. I have assumed that the ...
838 views

### Molecular Dynamics: Diffusion with PBC

How can I implement the computation of the diffusion coefficient $D$ using periodic boundary conditions (PBC)? I use molecular dynamics of a set of $nboby$ particles with positions $pos(3,nbody)$ in ...
125 views

### Diffusion properties of hard spheres in Monte Carlo simulation

In standard Monte Carlo simulations, say for hard sphere systems, how should one compute the mean-squared displacement of the spheres in order to extract dynamical properties such as the diffusion ...
81 views

### Numerical solution to N-dimensional diffusion on simplex?

Assume I have a system of at least (but generally only) $N+1$ points in an $N$-dimensional space ($N > 3$ is possible). At each of these points $x_i, i=1,...,N+1$ I know an initial potential/...
108 views

### How to account for the interface between two different phases in a discretized diffusion model?

I have tried to set up a model for the diffusion of a gas into a liquid. The two media are next to each other and the geometry is spherical because the system should simulate the diffusion out of a ...
201 views

### Spurious oscillations in diffusion-reaction problems with finite volume

I have successfully solved the multi-species diffusion-reaction equation \begin{equation} \frac{\partial c_i}{\partial t} = \nabla \cdot (d_i(x)\nabla c_i) + s_i(x,t), \quad \quad (1) \end{equation} ...
854 views

### Determining if samples fit a 3D Gaussian distribution

I have a collection of sample particles, with (x,y,z) coordinates generated by a simplified Monte Carlo-like code. I expect that these particles will follow an anisotropic diffusion process, which ...
361 views

### Computing element stiffness matrices with variable coefficients

I am trying to implement a simple FEM approach, using p1 triangular elements, for solving the diffusion equation with variable nodal diffusivities and I was wondering how to incorporate the variable ...
158 views

### Problem with Richardson extrapolation method for weak convergence in SDE

I have implemented the Richardson extrapolation of the Euler-Maruyama method to 4th order, to estimate the moments of SDE. The Euler-Maruyama works, and I would expect the Richardson extrapolation to ...
185 views

### Not getting correct numerical solution for Advection-Diffusion-Reaction eqn

Objective: I am trying to numerically solve $C(x,y,t)$ from the following advection-diffusion-reaction equation in 2D space (x,y) and time. I will be testing my numerical solution with an approximate ...
146 views