On Feb 1, 2008, at 12:31 PM, [EMAIL PROTECTED] wrote:
I was attempting to incorporate the latent heat of fusion as part
of a dendrite
model into one of the example scripts. I get a massive error from
the last term
in the heat conduction equation. Does anyone know what there error
comes from? <Dendrite.py>
I realize that you're still a student, so please take my comments in
a purely didactic spirit. Good answers spawn from good questions:
<http://www.catb.org/~esr/faqs/smart-questions.html>
The script you sent doesn't even compile! If you're going to send
your entire script file and ask for help with debugging (and we'd
rather you didn't; specific questions are more likely to get useful
answers), at least send the script that you're actually having
trouble with.
My guess is that your coefficients have made things sufficiently
nonlinear to require sweeping (which we evidently didn't need in
Example 9.4, although, to be honest, I don't know why not. The phi
equation depends on T and the T equation depends on phi; that screams
for sweeping).
*sigh* PLEASE supply actual error messages. "I get a massive error
from the last term in the heat conduction equation" implied a
numerical problem, when in fact, your code (after a lot of editing)
generates a syntax error. The error
TypeError: unsupported operand type(s) for -: 'float' and
'instancemethod'
is because
(phase-phase.getOld)*B
should be
(phase-phase.getOld())*B
Sweeping is still probably a good idea, but it's not crucial to
getting the code to run.
Ultimately, this script still won't do what you want because phase is
not declared with hasOld=1 (and although temperature is, you never
call temperature.updateOld()). hasOld=1 is an ugly wart that we'll
eventually do away with, but you will always need to consciously
invoke updateOld().
FiPy hates division, it burns the skin, so we introduce some
variables so it doesnt have to divied
What in the world is that supposed to mean?