Hello all,

I'm working on a problem similar to the example 8.1 in the FiPy manual.  However
I don't quite understand the linearization of the source term using a Taylor
expansion (p.108).  The text seems to say that the Taylor expansion is about the
previous value of the dependent variable, phase (phi), such that:
S = Sold + dS/dphi|old * (phi - phi_old)

However, the actual code for this source term does not involve phase.getOld() as
I would expect:
dmPhidPhi = 2 * W - 30 * (1 - 2 * phase) * enthalpy
S1 = dmPhidPhi * phase * (1 - phase) + mPhi * (1 - 2 * phase)
S0 = mPhi * phase * (1 - phase) - S1 * phase
eq = ImplicitDiffusionTerm(coeff=kappa) + S0 \
 ..   + ImplicitSourceTerm(coeff = S1)

So doesn't that mean that this source term still uses the current value of phase
rather than the previous value?    Or would it work better if I inserted
getOld() at each instance of phase?

Even on p.105 where the source is added "explicitly", it seems to be dependent
on the current value of phase rather than the previous value, making it
implicit.  Not sure if I am misunderstanding how this is supposed to work.

Any help would be greatly appreciated.

Thanks!
Anjuli


Reply via email to