Hi,
I wonder if there is a simple way to compute the total free energy of a system (Phase-field modeling) in FiPy? That is e.g.: \begin{equation} F = \int_V f(\phi, c, T) + \frac{\epsilon_{\phi}^2}{2}\nabla \phi^2 dV \end{equation} I figured that it would be something in accordance with: def freeEnergyVolume(phi_, c_, T, epsSq): return (0.5 * epsSq * (phi_.grad.mag)**2 + f(phi_,c_,T)).cellVolumeAverage But cellVolumeAverage wouldn't give me the full energy of the domain if I'm not mistaken? Thank you and best regards, Anders --------------------------------------- Anders Ericsson Ph.D. Student Division of Solid Mechanics Lund University/LTH Box 118 S-221 00 Lund, Sweden Phone: +46 (0)46 222 1684 Email: anders.erics...@solid.lth.se<mailto:anders.erics...@solid.lth.se><mailto:mathias.wal...@solid.lth.se>
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]