Thanks for your suggestions. Its working now.
I don't know what the problem was in the first time.

How can I solve an ODE like ((D^2)+D)y=0 with BC: y(0)=3 and y(pi/2)=3
I have written this code, but I am not sure whether my representation of the 
equation is correct or not and that is why I am not getting correct answer.
--------------------------------- Code--------------------------------------
import math

from fipy.meshes.grid1D import Grid1D
m = Grid1D(nx=50, dx=math.pi/100)

from fipy.variables.cellVariable import CellVariable
phi = CellVariable(name="solution variable",
                    mesh=m,
                    value=0)

valueleft=3
valueright=3

from fipy.boundaryConditions.fixedValue import FixedValue
BCs = (FixedValue(faces=m.getFacesRight(), value=valueright),
            FixedValue(faces=m.getFacesLeft(), value=valueleft))

from fipy.terms.explicitDiffusionTerm import ExplicitDiffusionTerm

eqX = phi == ExplicitDiffusionTerm(coeff=1)

----------------------------------End of 
Code-------------------------------------

I am not getting any errors in this code.

Thank you,
Amit

Daniel Wheeler <[EMAIL PROTECTED]> wrote: Try

    >>> from fipy import *
    >>> m = Grid1D(nx=2)


start a new python prompt and try


    >>> from fipy.meshes.grid1D import Grid1D
    >>> m = Grid1D(nx=2)


Do either of those work?

On Mar 14, 2007, at 10:17 PM, amit soni wrote:

This is working fine(from fipy import *). It is not giving any errors.

Thanks,
Amit

Daniel Wheeler <[EMAIL PROTECTED]> wrote: Hi Amit,

What happens when you open up a python prompt and type


   >>> from fipy import *




On Mar 13, 2007, at 11:22 PM, amit soni wrote:

Hi,

I am getting an error in the line: "from fipy.meshes.grid1D import Grid1D", 
which says:
ImportError: No module named fipy.meshes.grid1D
Importing only fipy also gives a similar error.

I have Python2.4.4, numpy, matplotlib and fipy installed on my computer.

Can anyone help me what might be causing this problem?

Thank you,
Amit
  


---------------------------------
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.

 --
Daniel Wheeler

 



  


---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.

 --
Daniel Wheeler

 




 
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.

Reply via email to