On Aug 17, 2007, at 11:09 AM, Daniel Wheeler wrote:
I would say that the surface flux that Jason wants is,
surfaceFlux = mask * constant * phi.getFaceGrad().dot((0,
1)).getDivergence().getArithmeticFaceValue().dot((1,0)
But phi.getFaceGrad().dot((0,1)) is a scalar field. You can't take
the divergence of a scalar. What I've done when I needed something
like d2(phi)/dy2 (sorry that I missed that aspect of it before; I
thought you wanted \nabla^2 \phi, or at least d2(phi)/dx2) is
phi.getGrad().dot((0,1)).getFaceGrad().dot((0,1))
After that, if you multiply this scalar FaceVariable by the
VectorFaceVariable mask that I showed in the last message, you should
get the flux you want, and
Then add surfaceFlux.getDivergence() to the equation.
then this will give you the proper source for the boundary condition.