Hi Ozgur, The following script works for me
from fipy import * m = Grid1D(nx=3) G= 5. M=5. epsilon=1. energy = 1. g = 1. s =1. v = CellVariable(mesh=m) eq_s = TransientTerm() + ImplicitDiffusionTerm (G*M) - M*energy + 0.5*M*(g/epsilon)*(s-1) eq_s.solve(v) print v Does that work for you? Can you also post your whole script? Cheers On Sat, Apr 4, 2009 at 3:26 PM, <[email protected]> wrote: > > Hi all, > > I am trying to solve the equation given below by fipy2.0: > > G= 5. > M=5. > epsilon=1. > > eq_s = TransientTerm() + ImplicitDiffusionTerm (G*M) - M*energy + > 0.5*M*(g/epsilon)*(s-1) > > and I get an error saying > TypeError, "The coefficients must be a rank-0 CellVariable or a scalar value." > > I will be glad if you can suggest me a solution to this error. Thank you very > much for your attention and help. > > Regards, > > Ozgur Keles > Graduate Research Assistant > School of Materials Engineering > Purdue University > Neil Armstrong Hall of Engineering > 701 West Stadium Avenue > West Lafayette, IN 47907-2045 > phone: (765) 496-1442 > email: [email protected] > > > -- Daniel Wheeler
