All Questions
Tagged with finite-difference diffusion
33
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-...
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 ...
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$ ...
2
votes
0
answers
45
views
Calculating the species mass consumption from implicit reaction-term in diffusion-reaction equation
The 1D diffusion equation with a chemical source term has the following form:
$$\frac{\partial Y}{\partial t} = D \frac{\partial^2 Y}{\partial x^2} - k Y,$$
where $Y$ is the molar concentration of the ...
1
vote
0
answers
55
views
Unsteady diffusion equation with spatial finite elements and Forward Euler in time
I have solved the unsteady diffusion equation using piece-wise linear Finite elements(triangles) for spatial discretisation and Forward Euler for temporal discretisation. I have the following mesh ...
4
votes
1
answer
365
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 ...
1
vote
1
answer
323
views
Crank-Nicholson for diffusion-advection vs diffusion equation
Let's consider the following 1D diffusion equation:
$\frac{\partial u}{\partial t} = xk \frac{\partial}{\partial x}(\frac{1}{x}\frac{\partial u}{\partial x})$
where we assume that the diffusion ...
1
vote
0
answers
114
views
Solving diffusion equation using finite difference method
I am solving an 1-dimensional diffusion equation with Neumann boundary condition at outlet and constant concentration, C, at the inlet. In the end, I want to observe how the concentration diffuses ...
0
votes
1
answer
443
views
Numerically solving a non-linear PDE
I have this non-linear partial differential equation.
$$
\frac{\partial C}{\partial t}=\left(\frac{\partial C}{\partial x}\right)^2+C\frac{\partial^2 C}{\partial x^2}
$$
I want to use the finite ...
3
votes
0
answers
113
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/...
0
votes
1
answer
7k
views
Applying neumann boundary conditions to diffusion equation solution in python [duplicate]
For the diffusion equation
$$
\frac{\partial u(x,t)}{\partial t} = D \frac{\partial ^2 u(x,t)}{\partial x^2} + Cu(x,t)
$$
with the boundary conditions $u(-\frac{L}{2},t)=u(\frac{L}{2},t)=0$ I've ...