On Apr 13, 2006, at 5:47 AM, hzhatlboro wrote:
(1) The result. Why are there two "micropores (?)" in the lower
left corner of the image? Attached please find one of the images
sent by Buddy Damm on 11/04/2006. Thanks to Buddy for this!
Actually there are two questions for the "micropores". (a) How
could the "micropores" can form considering all the "ideal"
condition for solidification? (b) Why the "micropores" only form at
the lower left corner?
They're not "micropores" per se; they're the result of the first side
arms impinging. If you run the simulation longer than Buddy showed,
you can see it happen elsewhere, too.
(2) Saving numeric data to a file. How could I save the
"phase.value" and "temperature.vale" data to a file? I tried to
use "pickle" after the program finished running, but when I opened
the file, I could not understand the result.
To save it for restart purposes, it's easiest to use the facilities
in fipy.tools.dump; there are several examples in the manual. These
are pickled, which as you've found, isn't much good to anything but
Python.
To save it for reading into other applications, we recommend
fipy.viewers.tsvViewer, which saves tab-separated-values in a text
file. We'll probably add a TSVReader, for restart too, although this
is not an inherently reversible process.
(3) Saving image. For example, if I want the program to save the
phaseField image as an "EPS" file at step 5000 automatically, what
is the extra code that I should add into the program?
You call plot() with a "filename" argument, e.g.
>>> viewer.plot(filename="myfile")
The type of file is determined by the filename extension. Different
viewers have different capabilities.
The gist viewer, for instance, accepts ".eps" and ".cgm" (in theory,
it can also do ".ps", but I always get a bus error).
matplotlib accepts ".jpg" and ".png".
mayavi can only do ".png".
(4) Generating movie. Is it possible to generate a movie in FiPy?
Could you please offer an example to an beginner to Python? I am
thinking that if I have all the data, I could make a movie using
MATLAB.
We have no facilities for generating movies in FiPy. We generate all
of our own movies by importing either the data or the saved images
into another application that will stitch them together (I use
IgorPro, but Daniel and Jim both use other things).
--
Jonathan E. Guyer, PhD
Metallurgy Division
National Institute of Standards and Technology
<http://www.metallurgy.nist.gov/>