usnistgov / fipy

FiPy is a Finite Volume PDE solver written in Python
http://pages.nist.gov/fipy/en/latest
Other
504 stars 148 forks source link

Sign error in Robin condition #967

Closed guyer closed 10 months ago

guyer commented 10 months ago

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)