Hi Daniel,

and thanks for your quick response. Here is my response in return:

1) Installation

I used Enthought's Pyhon 2.4 and the straight downloads of PyVTK-0.47 (?) and FiPy-1.1 from your web site to install on Windows 2000. I also added PySparse-0.34. Somehow, I can't shake the feeling that the whole thing is quite unstable - the system seems to lock up on many of the example problems, but then again, I just realized that may be because calculations are running in the background which make the Phython interface freeze up. Plus, I only have 512 MB of memory on a AMD XP 1700+.

On Slackware 10.2 Linux, I downloaded all the "tar.gz" packages from various places (it comes with Python 2.4 pre-installed) and used the "python setup.py build" and/or "python setup.py install" procedures. The matplotlib-0.87 (?) library seems to contain a bug, so I had to SVN that one. After that, it seems to work. I did not put MayaVI on yet, but I might, just to compare Windows 2000 and Linux on a one on one basis.

2) Wedge-Shaped Mesh

Is there a document where I can read up on this? I just have no concept of why I would need a 3D mesh to generate a 2D cylindrical mesh. Do I need a 3D mesh to generate a 2D rectangular mesh as well? As far as my approach, while I like GMsh a lot, if I can get done what I need to get done in FiPy, all the better. So, perhaps you can provide some assistance with a 2D cylindrical mesh generated in FiPy alone? By "wedge-shaped", do you mean as in a slice of pie?

3) Tee Geometry

Thanks for the tip. I recall now having stumbled across this somewhere in the documentation. I assume the "shift and merge" trick somehow applies to the above cylindrical mesh as well?

Best Regards,

Matt Koch


Daniel Wheeler wrote:
Hi Matt,

Thanks for your interest. I'll try and answer your questions below.

On Jan 16, 2007, at 11:23 PM, Matt Koch wrote:


Hello there,

I am brand new new FiPy, in fact just seem to have managed to install it on Windows 2000 and Slackware 10.2 Linux.

Good. Did you use subversion to get the latest version of fipy or did you install 1.1?

This seems like enormously powerful software! I have read some documentation and briefly reviewed the mailing list. There is one entry (http://www.mail-archive.com/fipy@nist.gov/msg00116.html) that seems to speak to the subject, but it is a little too advanced for me.

This exchange discusses wedge shaped meshes that are a requirement for faking cylindrical coordinates using Cartesian discretization. If you want to solve a 2D cylindrical problem, you need to create a 3D wedge shaped mesh. This may be possible in gmsh and then you can use the Gmsh importer to read the mesh and run it in fipy. We can discuss this further if this is what you decide on doing. You may also be able to bury the cylindrical prefactors inside the term's coefficient.
I would have to look more closely at your equations.

I am just wondering how to set up a problem in cylindrical (r,z) rather than rectangular (x,y) coordinates. Is there a command I should call or is there an object I have to initialize in order to switch on cylindrical coordinates? From the above entry, I am almost guessing that one would have to implement their own divergences and such in cylindrical coordinates by adding the radius in proper places of the divergences and such in rectangular coordinates? That can't be right!?

The wedge shaped mesh will take care of this, although there is some loss of accuracy. I have never measured the error, but I have been informed that this is an acceptable method. I think refactoring the discretization and various gradient operators for cylindrical coordinates would be quite an involved process at this point and I wouldn't recommend it.

Also, other than using GMsh (which is incredibly awesome software, by the way), how I can I create somewhat more complicated domains than the simple lines, squares and circles used in most of the examples. Can I generate such geometry in FiPy, and can I mesh that then? All I have seen thus far is meshing commands for lines, rectangles or circles. How would I create and mesh, say, a Tee shape?

You can splice meshes in fipy, which is more straightforward than using gmsh for some problems.

To create a T mesh, you need just create two rectangular meshes and add them together as below. Remember the
vertices and faces have to be perfectly aligned and not overlapping

    >>> from fipy import *
    >>> mesh1 = Grid2D(nx=6, ny=2) + (-3.0, 6.0)
    >>> mesh2 = Grid2D(nx=2, ny=6)
    >>> mesh = mesh1 + mesh2
    >>> print mesh.getCellCenters()
[[-2.5  6.5]
[-1.5  6.5]
[-0.5  6.5]
[ 0.5  6.5]
[ 1.5  6.5]
[ 2.5  6.5]
[-2.5  7.5]
[-1.5  7.5]
[-0.5  7.5]
[ 0.5  7.5]
[ 1.5  7.5]
[ 2.5  7.5]
[ 0.5  0.5]
[ 1.5  0.5]
[ 0.5  1.5]
[ 1.5  1.5]
[ 0.5  2.5]
[ 1.5  2.5]
[ 0.5  3.5]
[ 1.5  3.5]
[ 0.5  4.5]
[ 1.5  4.5]
[ 0.5  5.5]
[ 1.5  5.5]]







Thanks,

Matt Koch


Cheers

--

Daniel Wheeler




Reply via email to