On Dec 15, 2010, at 10:27 AM, Ram Balachandran wrote:
> I was more curious to know as to why Fipy decided to have the term on the > right hand side of the equation (equation in section 5.1 of the fipy manual). > Traditionally it is on the left hand side. I suppose the only thing that > would change is the sign and one has to be careful about it. There are no > major issues and it is a minor inconvenience which is utterly negligible > compared to the huge advantage in using Fipy. What minor inconvenience? As Daniel said, a convection term can be on either the left or right hand side. If you write your equation as d(rho*phi)/dt + grad(v*phi) = div(D*grad(phi)) + source then express it in FiPy as TransientTerm(phi) + ConvectionTerm(v) == DiffusionTerm(D) + source The way it's written in the manual is simply what made sense to me at the time and Wheeler failed to persuade me otherwise. I don't do flow and so ConvectionTerms in my work arise from things like counter-diffusion and electromigration. These are always written on the RHS and look silly on the LHS. It doesn't matter, though. Write the equation however you like and then convert the terms to FiPy syntax.
