On Wed, Jul 17, 2013 at 9:22 AM, Lafras Uys <[email protected]> wrote:
> Hi,
>
> I have the following set of coupled equations,
> \begin{align}
> \partial a / \partial t = \Delta a - \Delta b + f(a) \\
> \partial b / \partial t = \Delta b + g(a,b) \\
> \partial c / \partial t = \nabla_S ( D_c \nabla_S c) + h(b,c)
> \end{align}
> where
> $\nabla_S c$ is the surface gradient defined as $\nabla c - \hat{n} (
> \hat{n} \cdot \nabla c)$ on the boundary. $a$ and $b$ are defined on
> the whole domain; or mesh. Whereas, $c$ is only defined on the
> boundary and only allowed to diffuse on the boundary surface.
>
> Question: How do you implement $\nabla_S$?
>
This a really interesting question. I think the choice of methods depends
on the geometry?
If you can have a set of cell centres running along the interface with the
faces orthogonal to the interface then you can just define the diffustion
coefficient to be D_c on those faces and 0 everywhere else (I think that is
correct). If you use an anisotropic diffusion coefficient, then I think you
will get too much numerical diffusion in the direction orthogonal to the
interface. That won't work on a general mesh not aligned with the interface.
> I'm aware that the oriented surface normals are available via
> mesh._orientedFaceNormals and presumably the necessary ones can be
> pulled out using mesh.exteriorFaces.
>
Yes, mesh.exteriorFaces is just a mask. So you can use it to identify faces
that are on the exterior and those on the interior.
>
> Alternatively, should one solve for $a$ and $b$, grab their boundary
> values and then solve for $c$? $c$ perhaps being defined on its own
> mesh?
>
My own preference would be to solve $c$ on the same mesh, but only non-zero
in the boundary region. Make surface cells where the cell centers are on
the boundary and define $c$ everywhere but only non-zero in the boundary
region and then set the diffusion coefficient so $c$ can not diffuse out of
the boundary region.
> Question: Is there a way to define a diffusion tensor so that I can
> use the usual DiffusionTerm to model tangential diffusion?
>
You can define an anisotropic diffusion coefficient. See
http://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.anisotropy.html.
The numerical diffusion from this may be unacceptable for surface diffusion
though
--
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]