# 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 from the 3D real world or do I have to adjust them for 2D?

That's a modelling problem, not a CS one. This will depend on what is diffusing and on the reasons why 2D is relevant. You may want to give physical details and ask this on physics.SE. Alternatively if you just want to get your hand in with solving diffusion, then the numbers don't have to reflect a physical fact (especially if you have diffusion only, the coefficient will just set the timescale).

If you want to obtain the diffusion coefficient for 2D from 3D you have to take a look how the 2D diffusion equation is derived from 3D equation. It will be integrated with respect to one of the spatial dimensions. Diffusion coefficient is a $3 \times 3$ tensor in 3D, in 2D it will be $2 \times 2$ tensor. So in my opinion you cannot simply take the value from 3D equation and substitute it into 2D equation because after integrating it will describe the averaged diffusion in space (in the integrated dimension), so it will have different interpretation, it could be considered rather dispersion coefficient for 2D equations.