Hi Matt,

See section 9.2 of the manual. The example solves a phase field
problem with two equations.
The code demonstrates how to iterate to convergence with two
equations, "phaseEq" and
"diffusionEq". Within each time step ,given by "i", another set of
iterations is required.

    >>> dt = 1.e-6
    >>> for i in range(100):
    ...        phase.updateOld()
    ...        C.updateOld()
    ...        phaseRes = 1e+10
    ...        diffRes = 1e+10
    ...        while phaseRes > 1e-3 or diffRes > 1e-3:
    ...            phaseRes = phaseEq.sweep(var=phase, dt=dt)
    ...            diffRes = diffusionEq.sweep(var=C, dt=dt, solver=solver)
    ...            if __name__ == '__main__':
    ...                 viewer.plot()
    >>> if __name__ == '__main__':
    ...        raw_input("moving phase field")

Hope this helps.

Cheers


On Dec 1, 2007 1:58 PM,  <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm new to fipy so this may be a very basic question, but I couldn't find the
> answer anywhere in the manual.  How would you solve two equations with two
> unknowns using fipy for, say, a diffusion problem?  Thanks for all of your 
> help!
>
> Cheers,
>
> Matt Kasenga
>
>
>



-- 
Daniel Wheeler

Reply via email to