Hi Daniel,

Thanks, that fixed it.

You might be interested to know that when I set one of the entries of the
diffusion tensor to zero, I got an error message saying "TypeError: array
cannot be safely cast to required type". I got around this problem by
change the zero entry from "0" to "0*X" (or 0*Y). I found this notational
requirement a bit odd.

Regards,
Altan



On Tue, Nov 13, 2012 at 9:27 AM, Daniel Wheeler
<[email protected]>wrote:

> Hi Altan,
>
> The following diffs should make it run at least.
>
> 21c21
> < eqn = (TransientTerm(coeff=1, var=var) ==
> ---
> > eqn = (TransientTerm(coeff=1) ==
> 30c30
> <          res = eqn.sweep(dt=0.1)
> ---
> >          res = eqn.sweep(var, dt=0.1)
>
> The error message is not particularly helpful, however. In the new
> version of FiPy, terms can be associated with a variable (rather than
> specifying the variables when solving). This enables the solution of
> coupled equations, but is not needed in this case. Thus, the var
> argument to the TransientTerm is not required, but a var argument is
> required when sweeping. It may be possible to give a more informative
> error message. I'll look into that.
>
> Cheers
>
> On Mon, Nov 12, 2012 at 1:01 PM, Allawala, Altan
> <[email protected]> wrote:
> > Hi,
> >
> > This question is related to an old thread:
> > http://thread.gmane.org/gmane.comp.python.fipy/1850
> >
> > In this thread, the problem (which was eventually resolved by Jonathan)
> was
> > about how to express an anisotropic diffusion. However, there was no time
> > dependence being considered.
> >
> > I am now interested in the time evolution of this problem. But as soon
> as I
> > introduce the transient term, the following error message is produced:
> > "fipy.terms.ExplicitVariableError: Terms with explicit Variables cannot
> mix
> > with Terms with implicit Variables."
> >
> > Why might this be happening? I have attached my code below. Uncommenting
> > line 16 & 17 and then commenting out line 18 onwards removes the time
> > dependence from the problem and hence eliminates the error.
> >
> > Thanks,
> > Altan
> >
> > _______________________________________________
> > fipy mailing list
> > [email protected]
> > http://www.ctcms.nist.gov/fipy
> >   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
> >
>
>
>
> --
> Daniel Wheeler
> _______________________________________________
> fipy mailing list
> [email protected]
> http://www.ctcms.nist.gov/fipy
>   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to