2
$\begingroup$

I would like to model the 2D diffusion equation with Neumann BC's inside the following egg-shaped domain:

IMG

I would like to use the finite difference method with the discretization implied by the image above, but while I can handle the interior points, I don't know how to handle the boundary values. I know how to search for and identify the boundary points, but I'm not sure what finite-difference approximation to the no-flux condition I should use. Currently I'm thinking of estimating the direction of the normal at each boundary point by looking at it's 8 nearest neighbors, and then, if the normal is approximately

$$\textbf{n} = [n_1, n_2]$$

I would add an equation like:

$$\mathbf{\nabla} c \cdot \textbf{n} \approx \frac{c_{i,j}-c_{i-1,j}}{\Delta x} \times n_1 + \frac{c_{i,j}-c_{i,j-1}}{\Delta y} \times n_2 = 0$$

Though of course I'll need to be careful which side I take the derivative from.

Does anyone have any suggestions or resources for this type of problem? Examples in 3D would be particuarly useful, as that's where I'm working towards.

$\endgroup$
  • $\begingroup$ What is the domain? The red egg? $\endgroup$ – Wolfgang Bangerth Oct 1 '14 at 10:58
  • $\begingroup$ Yes, sorry, I'll change that. $\endgroup$ – tom Oct 2 '14 at 0:27
  • $\begingroup$ There are plenty of methods to deal with boundary conditions on oddly shaped domains using finite difference methods. What literature have you already looked for? $\endgroup$ – Wolfgang Bangerth Oct 2 '14 at 2:59
  • $\begingroup$ I can't say I've found a lot :) My experience with FDM's doesn't extend much beyond Numerical Recipes. The problem I actually want to solve involves modelling anisotropic diffusion inside a 3D brain, and the boundary there is already discretized for me and is terribly irregular. Most of what I've found so far relates to solving PDE's on a domain with a known function (e.g. on a ellipse) and you make clever discretizations. But I can't do that: my discretization is given. I would very much appreciate recommendations of textbooks/papers dealing with this issue :) $\endgroup$ – tom Oct 3 '14 at 0:44
  • $\begingroup$ Try google.com/… It shows 179,000 hits. $\endgroup$ – Wolfgang Bangerth Oct 3 '14 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.