# Questions tagged [diffusion]

The tag has no usage guidance.

77 questions
Filter by
Sorted by
Tagged with
185 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 ...
49 views

### Modelling of Stefan Maxwell equation

I am trying to solve Maxwell Stefan's equation over a membrane to get the transient mole fraction distribution over the membrane thickness 'z'. But somehow I am not able to code it using ODE45, more ...
44 views

### 2D diffusion equation using Finite Volume Method

i am working on an assignment problem: Consider a two-dimensional rectangular plate of dimension L = 1 m in the x direction and H = 2 m in the y direction. The plate material has constant thermal ...
71 views

### FEM diffusion: inaccurate results small time steps

I wrote some FEM code and found some strange results when using a very small time step. So, I decided to analyze the discrete equations. Consider the following linear diffusion problem in 1 dimension:...
42 views

160 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 ...
79 views

### Stability of PDEs

I am currently trying to solve some PDEs with FiPy. At page 56, the manual mentions (https://www.ctcms.nist.gov/fipy/download/fipy-3.0.pdf). The largest stable timestep that can be taken for this ...
80 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/...
68 views

### Minimizing the used memory in diffusion simulation using Python

I am recently dealing with a diffusion simulation project and I have come up with the following code: ...
64 views

### Simulating Brownian motion in 3-D for first hitting time?

I want to simulate Brownian motion in 3-D for the following conditions: $$p(x=0,y=0,z=0,t=0)=1$$ $$p(x,y,z=c,t)=0$$ where $p$ is the probability of finding molecules in the 3-D environment. I want to ...
2k 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 ...
79 views

### Harmonic average of Diffusion Tensors in Finite Volume Method

I want to implement a Bilinear Finite Volume discretisation of the anisotropic diffusion problem: $$\frac{du}{dt} = \nabla \cdot (\textbf{D} \nabla u)$$ Both my degrees of freedom as well as the ...
131 views

### Analytical testcase for 2D/3D anisotropic Diffusion (Heat Kernel)

I want to verify and compare different Discretizations of the anisotropic diffusion equation in 2D / 3D. In order to both test the timestepping and the spatial discretisations I had a look at using ...
356 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 ...
26 views

### Calculating volume of a discretised diffuse interface object

Suppose I have a spherical object projected onto a discrete square mesh. The dicretised circle can be represented by filling a logical matrix such that voxels in the interior of the sphere are filled ...
41 views

### Limit to volume change in a discretized mathematical model?

I have set up a mathematical model describing the diffusion of ozone out of a gas bubble. The bubble is surrounded by a thin gas film. So actually, the model describes the diffusion of ozone through ...
41 views

### Solving the diffusion/heat equation for a randomly distributed set of points in 3D

In this problem I am trying to solve, I have a messy set of points distributed in 3D space, each with a defined temperature. If I would want to calculate the heat transfer scenario in this system, how ...
189 views

### Neumann boundary condition FD implementation for instationnary diffusion equation

I am trying to solve this diffusion equation : $\dfrac{\partial D\dfrac{\partial f}{\partial x}}{\partial x}+S = \dfrac{\partial f}{\partial t}$ ($D$ is not constant and varies according to $x$) with ...
256 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 ...
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 ...
307 views

### Conservation violation in axisymmetric Diffusion Equation

1d diffusion equation Integrating the diffusion equation, $$\frac{\partial u}{\partial t} = D \frac{\partial^2 u}{\partial x^2},$$ with a constant diffusion coefficient D using forward Euler for ...
451 views

226 views

### Reaction-diffusion equations

I'm simulating a biological phenomena with reaction diffusion equations. There are multiple diffusing materials and there are some complex relations about consumption and production of such materials. ...