On Mar 22, 2007, at 7:24 AM, amit soni wrote:
Hi,
Thanks for the replies.
I tried the code given by you, but it is giving an error.
------------------------ERROR----------------------------
Traceback (most recent call last):
File "C:/Documents and Settings/Amit/Desktop/RA/PDE/pde1", line
19, in -toplevel-
eqX = diffTerm + PowerLawConvectionTerm((1,), diffTerm=diffTerm)
My fault, it should be
>>> eqX = diffTerm + PowerLawConvectionTerm((1,),
diffusionTerm=diffTerm)
If you get an error like this, you can always check the arguments by
doing
>>> from fipy import *
>>> help(PowerLawConvectionTerm)
TypeError: __init__() got an unexpected keyword argument 'diffTerm'
-----------------------------------------------------------------
and I am sorry that the equation I wrote was not correct. I want to
find the solution for (D^2+1)y=0 with BC: y(0)=3 and y(pi/2)=3.
This is slightly different. You will have to sweep this equation to
convergence. Since the source can not be included implicitly.
Thus, the equation should be,
>>> eqX = diffTerm + phi
>>> for i in range(10):
. . . residual = eqX.sweep(phi, boundaryConditions=BCs)
. . . print 'residual',residual
The residual should become very small after half a dozen sweeps
(guesstimate).
Earlier I was getting an error that "no module named fipy". But I
am not getting it now. I don't know how it got corrected by itself.
Bona fide miracle.
--
Daniel Wheeler