On May 5, 2014, at 6:53 PM, Zebo LI <pkuliz...@gmail.com> wrote: > Thank you so much. I have fixed the boundary condition problem by introduce > an implicit source term, and the code works well. > However, now I am thinking to write a fipy script with 4 equations, two of > them are ordinary diffusion equations, and the other two > are not differential equation. But, I don't know how to deal with those > non-differential equations in fipy. The detailed things are shown > in the attached file.
I suppose you would write these terms essentially as they appear, e.g, eq3 = ImplicitSourceTerm(coeff=1., var=muV) == alphaV * epsilon + kB * T * fp.numerix.log(CV) I don't recommend you do this, though, as there is no way to implicitly relate muV with CV when you do this. By that, I mean that $k_B T \ln(C_V)$ cannot be expressed as a matrix operating on $C_V$. You are better off carrying the derivatives through to get DiffusionTerms in CV and in epsilon. If you aren't solving your elastic strain equations, you can just write the strain part as (LVV * (alphaV * epsilon).faceGrad).divergence. _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]