Daniel, 

Thanks for the help!  I think it has gotten us started in the right direction.  
I am still having problems finding how to distinguish between the dependant 
variables when programming the code.  When writing an equation in fipy where 
there are two diffusion terms in one equation (each diffusion term depending on 
the different independant variables), what is the right syntax for programming 
this case into fipy?  I've scoured the manual and still cannot figure this part 
out.  Again, sorry if this is a simple question... I'm just very new to this.

Thanks,

Matt Kasenga

Quoting Daniel Wheeler <[EMAIL PROTECTED]>:

> 
> 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