On Tue, Oct 14, 2014 at 3:49 PM, Yun Tao <[email protected]> wrote:

> Thank you, Daniel, for the very helpful response!! I played around with
> the code and was able to generate a nice-looking diffusion process around
> rectangular barriers (see attachments for script and its video output). A
> couple follow-up questions if I may:
>
> 1. In the diffusion simulation, there seems to be a dramatic vertical
> spread towards the top exterior faces at the 2 second mark. The solution
> does remain at unity throughout, but just to be overly-cautious, does this
> dynamic appear reasonable to you?
>

I'm not really sure. I did notice that in the script the variable "fluz" is
redundant as it is 0 everywhere. Is that correct?


>
> 2. My ultimate goal is to plot the contour lines to two separate yet
> partially overlapping solutions. However, it seems that contour plots --
> e.g., *plt.clabel(plt.contour(X,Y,Z))* -- cannot be manually added to the
> viewer and are only available via *Matplotlib2DGridContourViewer*. Do you
> have any suggestion to implement this?
>

One thing that might be useful is that the viewer object has the axes
attribute so you can call methods associated with the axes to add extra
stuff to the plot. For example,

    import fipy as fp
    m = fp.Grid2D(nx=2, ny=2)
    v = fp.CellVariable(mesh=m, value=m.x * m.y)
    vi = fp.Viewer(v)
    vi.plot()
    vi.axes.set_title('my title')

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to