On Sun, Jan 6, 2013 at 9:19 PM, Salomon Turgman Cohen <[email protected]>wrote:
> Hello all, > After some experimentation it seems to me the values of facesphi do > update after every time step and that the approach outlined in the second > email is a valid one. If I attempt to use just phi as the variable used to > set D I get an error due to the difference in shapes between D and phi. It > seems that my second email outlines the correct method to use a coefficient > that depends in a piecewise fashion on the variable being solved (were the > coeff is defined at the cell faces). Please correct me if I am wrong. > Use the "cases" function I provided for piecewise operations. If you want D to be a FaceVariable then you can either submit phi.faceValue to "cases" or pass D.faceValue as the coefficient. > Would it be worthwhile to expand the mesh1D diffusion example to > include a piecewise version of the final part of that example in which the > diffusion coefficient depends linearly on concentration? I am willing to > write a new version of the example and post it here if there is interest to > make the change. > Sounds like a good idea. Thanks. We probably need a better solution to piecewise dependency than the solution that I provided due to the inherent inefficiencies with the "<" and "*" method. Not sure what that would be though. Cheers -- Daniel Wheeler
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
