Questions tagged [diffusion]
For questions about modeling movement from high to low concentrations, where concentration could, for example, refer to number of particles or amount of thermal energy in a region. Problems will often involve solving a diffusion (differential) equation.
100
questions
2
votes
1
answer
116
views
Are there necessary conditions for SOR algorithm to converge when used for 2D discrete Poisson problem, with PBC, besides solvability condition?
I am trying to solve a 2D poisson problem that is supposed to represent diffusion of chemicals on a grid: $\nabla^2 R_{ij}=f_{ij}$. I am discretizing the problem with the standard central ...
0
votes
0
answers
109
views
Solving a steady-state PDE
I'm working on trying to solve a steady state PDE in python and I am quite new to python and I am slightly confused on the implementation details. I have an example implementation of solving a non-...
1
vote
1
answer
103
views
Adding a diffusion term to the MUSCL - Kurganov and Tadmor central scheme
Im currently using a MUSCL scheme with a rusanov flux and Van Leer limiter to simulate the 2d euler equations:
$$ \frac{\partial \rho}{\partial t} + \frac{\partial \rho v_x}{\partial x} + \frac{\...
4
votes
1
answer
215
views
Estimating the spectral radius when applying the method of lines
Some time integrators, notably the Runge-Kutta-Chebyshev method, implemented in the RKC code from Sommeijer & Verwer, gives the user an option to provide a callback with an estimate of the ...
3
votes
1
answer
209
views
First derivative central differences with reflecting boundary conditions
I have the following problem in 1-D:
\begin{equation}
\partial_t u(t,x) = v(x)\partial_x u(t,x) + \kappa(x) \partial_{xx} u(t,x),\,x\in\Omega;\quad \partial_{\nu}u(t,x) = 0, \,x\in\partial\Omega.
\end{...
1
vote
0
answers
144
views
Stability for the 2d diffusion equation
I'm reading this set of notes on numerical stability of the diffusion equation. I can't seem to derive equation (7.17) from the previous equation. I've tried using $\sin^2(\theta)=\frac{1-\cos(2\theta)...
1
vote
1
answer
366
views
Crank Nicolson Method with closed boundary conditions
I want to simulate 1D diffusion with a constant diffusion coefficient using the Crank-Nicolson method.
$$\frac{\partial u (x,t)}{\partial t} = D \frac{\partial^2 u(x,t)}{\partial x^2}.$$
I take an ...
6
votes
1
answer
161
views
Numerical artefacts in solution of spherical heat equation using FDM
I was attempting to solve the diffusion equation for a solid sphere using a naive FDM scheme. The governing PDE for the scalar concentration field $u(r,t)$ is
$$
u_t = r^{-2}(r^2 \alpha u_r)_r, \quad ...
1
vote
1
answer
83
views
Courant condition for diffusion
What would be the courant condition for the following diffusion equation,
$$\frac{\partial f}{\partial t}=A(x)\frac{\partial}{\partial x}\left(D(x)\frac{\partial f}{\partial x}\right).$$
For $$\frac{\...
4
votes
1
answer
587
views
Why do I get an oscillatory solution when applying the implicit trapezoidal method to the linear diffusion equation?
I wish to solve the following equation,
$$\frac{\partial f}{\partial t}=\frac{\partial}{\partial x}\left(D(x)\frac{\partial f}{\partial x}\right)$$
using an exponential integrator.
I discretize this ...
3
votes
0
answers
158
views
Form of nonlinear diffusion equation
Consider the following nonlinear diffusion problem,
$$
\frac{\partial u}{\partial t} = x^{-2}\frac{\partial}{\partial x}\left(x^2 u^4 \frac{\partial u}{\partial x}\right), \quad 0 < x < 1
$$
We ...
2
votes
0
answers
105
views
Compact Finite Differences for the Heat Equation with Robin Boundary Conditions
I am trying to solve the Heat equation with Robin Boundary condition:
$$ u_t(x,t) = u_{xx}(x,t), \\ u(x,0) = g(x), \\ u(0,t) + u_x(0,t) = h_0(t), \\ u(1,t) + u_x(1,t) = h_1(t)$$
for $ 0\leq x\leq1$ ...
1
vote
0
answers
102
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 ...
5
votes
1
answer
346
views
Block-Tridiagonal Matrices with tridiagonal blocks
The Setup
Using finite differences to discretize the 2d diffusion equation $$\partial_tu=\partial_x\left(A\partial_xu+B\partial_yu\right)+\partial_y\left(B\partial_xu+C\partial_yu\right)$$ we get a ...
4
votes
0
answers
241
views
Spurious oscillations in solving diffusion problems using finite elements
I've been struggling with this problem for a while so I hope someone can help me here.
I'm trying to solve the McNabb-Foster equations for hydrogen diffusion in metals using a simple 1D finite element ...