The documentation on Robin conditions has a sign error. While the derivation talks about $\vec{d}_{fP}$, the code example uses dPf (because it's easier to calculate with what FiPy meshes provide). This sign error is the source of much of the trouble in #960.
The derivation should either switch to $\vec{d}_{Pf}$ or the code should change.
-RobinCoeff = (mask * Gamma0 * n / (-dPf.dot(a) + b)
+RobinCoeff = (mask * Gamma0 * n / (dPf.dot(a) + b)
The documentation on Robin conditions has a sign error. While the derivation talks about $\vec{d}_{fP}$, the code example uses
dPf
(because it's easier to calculate with what FiPy meshes provide). This sign error is the source of much of the trouble in #960.The derivation should either switch to $\vec{d}_{Pf}$ or the code should change.