11 Jul 23:14
Re: Programing Differential Equations in Fipy
From: Daniel Wheeler <daniel.wheeler2@...>
Subject: Re: Programing Differential Equations in Fipy
Newsgroups: gmane.comp.python.fipy
Date: 2008-07-11 21:14:10 GMT
Subject: Re: Programing Differential Equations in Fipy
Newsgroups: gmane.comp.python.fipy
Date: 2008-07-11 21:14:10 GMT
Did you install this version of fipy from your working copy?
Execute these commands at the python command line and tell me what happens.
>>> import fipy, os
>>> print fipy.__version__
>>> print fipy.__path__
>>> os.system('gmsh --version')
On Fri, Jul 11, 2008 at 4:13 PM, Zhiwen Liang <liangz@...> wrote:
> Hi Daniel,
> I downloaded the current version of Fipy using SVN. I just tried the
> diffusion example "circle.py" and it seems there is a problem with the GMSH
> mesh. The error is:
> File "circle.py", line 301, in ?
> exec(fipy.tests.doctestPlus._getScript())
> File "<string>", line 39, in ?
> File
> "/Users/liangz/stow/Fipy_current//lib/python2.3/site-packages/fipy/meshes/numMesh/gmshImport.py",
> line 394, in __init__
> mesh2D.Mesh2D.__init__(self, **_DataGetter().getData(filename,
> dimensions = 2, coordDimensions = coordDimensions))
> File
> "/Users/liangz/stow/Fipy_current//lib/python2.3/site-packages/fipy/meshes/numMesh/gmshImport.py",
> line 263, in getData
> vertexCoords = self._calcVertexCoords(coordDimensions)
> File
> "/Users/liangz/stow/Fipy_current//lib/python2.3/site-packages/fipy/meshes/numMesh/gmshImport.py",
> line 286, in _calcVertexCoords
> numVertices = int(self.inFile.readline())
> ValueError: invalid literal for int(): 2 0 8
> You know what is the problem?
> Thanks,
> Zhiwen
> On Wed, Jul 9, 2008 at 1:19 PM, Daniel Wheeler <daniel.wheeler2@...>
> wrote:
>>
>> On Wed, Jul 9, 2008 at 11:18 AM, Zhiwen Liang <liangz@...> wrote:
>> > Hi Daniel,
>> > Thank you very much for providing such useful information! I really
>> > appreciated!
>> > My version is old and does not have the anisotropic diffusion
>> > coefficient. I
>> > will try the new version. This feature looks very powerful!
>>
>> Update to trunk at this point. We still haven't been able to do a release.
>>
>> > Regarding my second question, I did mean solving two equations with two
>> > unknowns. Is that possible?
>>
>> Yes, include both equations in an inner loop at each timestep and
>> iterate to convergence . Take a look at
>> <http://matforge.org/fipy/browser/trunk/examples/phase/binary.py#L636>
>> for an example.
>>
>>
>>
>> --
>> Daniel Wheeler
>
>
--
--
Daniel Wheeler
RSS Feed