Fipy install test failures

2013-02-21 Thread Raymond Smith
Hi all, I've just installed fipy, and I got a number of errors while running the test. My output is located at http://pastebin.com/grn7Maki. I'm using Arch Linux, 64 bit, with fipy-3.0, and I've installed pysparse (1.1.1), gmsh (2.6.1), numpy (1.7.0), scipy (0.11.0), matplotlib (1.2.0), mayavi

Re: Point Source

2013-03-01 Thread Raymond Smith
Hi Adrian, I'm not sure if this is what you're going for, but perhaps you could use an implicit source to apply the internal boundary condition as outlined in http://www.ctcms.nist.gov/fipy/documentation/USAGE.html#applying-internal-boundary-conditions. If you're just trying to keep a particular

Re: Time dependent spatially varying 2D source term representation

2013-03-19 Thread Raymond Smith
Hi Serbulent, I was curious about the same thing, so I gave it a shot. I'm not sure if what I've done is a good way to do things, but I think I managed to get a source term that's a function of x, y. I modified your script in a number of ways, and wrote it so that myFunc takes positions as

Re: Fipy install test failures

2013-03-21 Thread Raymond Smith
...@nist.gov wrote: On Feb 22, 2013, at 2:27 PM, Raymond Smith wrote: So as far as I can tell, you were exactly right, and numpy-1.7.0 was causing the issues. If there's anything else I can do that would help clarify what's going on or help ease the transition to numpy-1.7.0, let me know

Re: divergence operator

2013-06-25 Thread Raymond Smith
on arithmetic face values of displacements to confirm, and with that it works fine. Thanks, Ray On Tue, Jun 25, 2013 at 12:16 PM, Jonathan Guyer gu...@nist.gov wrote: On Jun 24, 2013, at 4:03 PM, Raymond Smith smit...@mit.edu wrote: I'm having confusion about what the divergence operator

Re: Convection terms and algebraic equations

2013-07-24 Thread Raymond Smith
For the algebraic thing, could you do something like eq = ( fp.TransientTerm(coeff=0., var=whatever) == \sum{z_i*C_i} )? On Wed, Jul 24, 2013 at 3:35 PM, Edwin Sze Lun Khoo edwin...@mit.eduwrote: Hello, I have a couple of quick questions about the use of convection terms and defining

Re: non-linear boundary conditions

2013-12-10 Thread Raymond Smith
Hi Fridolin, I've used FiPy with non-linear boundary conditions before, e.g. (quite like yours) n\cdot\nabla c = c/(c+k) in which k is a constant and c is an independent variable. You can probably take care of the geometry with Gmsh, which is referenced in the install documentation for FiPy (and

Re: 2 moving boundaries problem

2013-12-11 Thread Raymond Smith
Hey Olivier, It seems like this is a phase separation problem. One option is to try to model infinitesimal moving interfaces as you seem to be thinking now, with some sort of Stefan condition to dictate their motion. However, another approach which is useful in modeling phase separating systems

Re: Unexpected result, possibly wrong, result solving 1D unsteady heat equation with spatially-varying diffusion coefficient

2014-08-18 Thread Raymond Smith
Hi Conor, Just to add to your observations, I'm guessing FiPy is correct here in both situations, and as you noticed, the original input with a thermal diffusivity is simply not the correct representation of your physical situation. The actual conservation equation for thermal energy is

Re: Unexpected result, possibly wrong, result solving 1D unsteady heat equation with spatially-varying diffusion coefficient

2014-08-18 Thread Raymond Smith
of you to illustrate this situation in 'examples.diffusion.mesh1D'. On Aug 18, 2014, at 9:36 AM, Raymond Smith smit...@mit.edu wrote: Hi Conor, Just to add to your observations, I'm guessing FiPy is correct here in both situations, and as you noticed, the original input with a thermal

Re: Unexpected result, possibly wrong, result solving 1D unsteady heat equation with spatially-varying diffusion coefficient

2014-08-18 Thread Raymond Smith
, such that On Mon, Aug 18, 2014 at 4:35 PM, Raymond Smith smit...@mit.edu wrote: Hi Jonathan, I pulled, branched, committed, and fetched/merged develop according to the instructions on the linked site, but my repo isn't publicly available online. When I do a $ git format-patch I get no output. My

Mailing list archive link

2014-09-09 Thread Raymond Smith
Hi, Fipy. I just noticed that when I click on the mailing list archive links at http://www.ctcms.nist.gov/fipy/documentation/MAIL.html I get a redirection error: You have selected a link that connects to a redirection script on this server, but the provided target URL is either malformed or is

Re: Accuracy problem on results

2014-09-09 Thread Raymond Smith
Hi, John. I'm not completely sure if this is related, but I do want to make sure it's not something like that discussed in the recent thread about the heat equation on this list: http://thread.gmane.org/gmane.comp.python.fipy/3556/focus=3565 Is your diffusion coefficient (typically called

Re: Accuracy problem on results

2014-09-09 Thread Raymond Smith
conductivity k, and it is not described in terms of position, it just changes from material to material. Exactly rho * cp are the transient terms. Finally the equation results dT the temperature difference. What else could it be? Best regards, John On 9 Sep 2014 17:16, Raymond Smith smit

Re: Unexpected result, possibly wrong, result solving 1D unsteady heat equation with spatially-varying diffusion coefficient

2014-09-25 Thread Raymond Smith
at 4:48 PM, Raymond Smith smit...@mit.edu wrote: Also, I'm not sure if this is what you meant by the doctests, but I have added something that may be along the lines of what you were talking about. I attached a diff to the ticket in case the git path doesn't work,. Ray diff --git a/examples

Re: Diffusion in a 2D Annulus.

2014-11-19 Thread Raymond Smith
Hey, Kyle. Given inner radius rI and outer radius rO, perhaps you could do something like rMid = 0.5 * (rI + rO) Xfc, Yfc = mesh.faceCenters innerFaces = (mesh.exteriorFaces (Xfc**2 + Yfc**2 rMid)) outerFaces = (mesh.exteriorFaces (Xfc**2 + Yfc**2 rMid)) Then constrain using

Re: Convergence suggestions?

2014-11-21 Thread Raymond Smith
guesses, which isn't feasible for me once I move to 2D and have more complicated boundary conditions) are certainly still welcome, but I think this at least gives me a way to move forward. Best, Ray On Wed, Nov 19, 2014 at 5:12 PM, Raymond Smith smit...@mit.edu wrote: Hi, FiPy. I'm trying

Re: Convergence suggestions?

2014-11-23 Thread Raymond Smith
implement even particularly nasty-looking boundary conditions is extremely convenient. Best, Kyle On Nov 19, 2014, at 5:12 PM, Raymond Smith smit...@mit.edu wrote: Hi, FiPy. I'm trying to solve a number of problems involving (quasi-)neutral electrolyte solutions. I've attached some notes

Re: hints on creating a Source in simple convection diffusion problem

2015-01-23 Thread Raymond Smith
Have you tried printing scalarSource to make sure it is at least 0.0 at some locations and 100.0 at other locations? This might be easier to see if you make a small, dx=6 x dy=2 mesh. And you do want it to be a source term like dcdt = diffusion + convection + 100.0 * c right? As in, a first order

Re: Sweep causes solution to zero out.

2015-01-08 Thread Raymond Smith
This seems to be a common issue here... I think the diffusion 1D example on the website may soon comment on this. The correct equation for conservation of thermal energy is that the time rate of change of the enthalpy is related to the divergence of the flux. Enthalpy is related to rho * cp * T,

Re: Sweep causes solution to zero out.

2015-01-08 Thread Raymond Smith
As a comment, if S is the whole source, you don't want to use ImplicitSourceTerm, because that assumes that the source is linear in the variable with coefficient as given. This is apparently usually the recommended way to do it if there is a way to write your source that way. However, if you have

Re: trouble installing Fipy3.1

2015-02-28 Thread Raymond Smith
package, now I get this divine@franck-laptop:~$ sudo pip install fipy Requirement already satisfied (use --upgrade to upgrade): fipy in /usr/local/lib/python2.7/dist-packages/FiPy-3.1-py2.7.egg Cleaning up... cheers 2015-02-28 0:26 GMT+02:00 Raymond Smith smit...@mit.edu: It means you

Re: trouble installing Fipy3.1

2015-02-28 Thread Raymond Smith
: UBUNTU 14.04 no fipy in the repositories. intalles pip manually 2015-02-28 21:48 GMT+02:00 Raymond Smith smit...@mit.edu: What Linux distribution are you using? Does it have FiPy in the repositories? If so, you should probably install FiPy from there (unless you need a newer version

Re: trouble installing Fipy3.1

2015-02-28 Thread Raymond Smith
wrote: test give this divine@franck-laptop:~$ python -c import fipy; fipy.test() Traceback (most recent call last): File string, line 1, in module ImportError: No module named fipy divine@franck-laptop:~$ 2015-02-28 21:27 GMT+02:00 Raymond Smith smit...@mit.edu: Looks to me like pip

Re: casting implicit Boundary Conditions in FiPy

2016-06-09 Thread Raymond Smith
operating point, c_star, and we are left with 0 multiplying the > first-order derivative. > > > > ie. the Boundary conditions becomes, > > > > Leading to huge loss of accuracy. > > > > Is there any hope at all in this situation ? J . Cheers and thanks for > your help th

Re: casting implicit Boundary Conditions in FiPy

2016-06-10 Thread Raymond Smith
Meanwhile, may I also ask if other Fipy users or developers had to deal > with non-linear Implicit Neumann boundary conditions in their problems? > > > > > > Krishna > > > > *From:* fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] *On Behalf > Of *Raymond S

Re: Pure Neumann Boundary Conditions; Elliptic PDE

2016-05-26 Thread Raymond Smith
ndly elaborate? > > > > With best regards, > > > > - Ian & Krishna > > > > *From:* fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] *On Behalf > Of *Raymond Smith > *Sent:* 26 May 2016 19:42 > *To:* fipy@nist.gov > > *Subject:* Re: Pure Neuma

Re: Ideal Free Energy: Computation of x*log(x) at x -> 0

2016-02-10 Thread Raymond Smith
Hi, Aniruddha. I certainly don't know the details of your system, but my first thought would be that this term in the free energy should (physically, at least) prevent the concentration from actually ever reaching zero, as the chemical potential diverges when x->0. So I don't understand why you

Re: Ideal Free Energy: Computation of x*log(x) at x -> 0

2016-02-10 Thread Raymond Smith
in a > "nan" because of undesired values computed by the log function, so I cannot > ignore the Runtime Warning. > > Thanks, > Aniruddha > > On Wed, Feb 10, 2016 at 9:13 AM, Raymond Smith <smit...@mit.edu> wrote: > >> Hi, Aniruddha. >> >&g

Re: Steady-Source solution of PDE with fixed sources and sinks

2016-04-05 Thread Raymond Smith
I posted a reply focusing on the parts of this thread which are in the original question (and thus on the SO site). Feel free to edit/suggest edits. Ray On Mon, Apr 4, 2016 at 7:19 PM, Raymond Smith <smit...@mit.edu> wrote: > Thanks, Jon. > > I'll post something to StackOverflow

Re: simple convection

2016-03-23 Thread Raymond Smith
First, I hope you're considering the broad set of FiPy examples as part of the documentation. They can serve as a great starting point for many problems. Second, solving convection problems without any diffusion is notoriously a bit difficult

Re: unsubscribe

2016-03-24 Thread Raymond Smith
Chris, please try following the instructions on the website and putting unsubscribe in the body and sending the mail to fipy-requ...@nist.gov ... http://www.ctcms.nist.gov/fipy/documentation/MAIL.html On Thu, Mar 24, 2016 at 12:15 PM, Christopher Jones wrote: > > > Chris

Re: Steady-Source solution of PDE with fixed sources and sinks

2016-04-03 Thread Raymond Smith
It seems there's a bit of confusion here about initial condition vs. source term. Some comments in line. Hope it helps. Ray On Sun, Apr 3, 2016 at 8:38 AM, Dario Panada wrote: > Hi, > > I originally asked this on >

Re: IndexError: index is out of bounds for axis 1 with size

2016-05-06 Thread Raymond Smith
I think Daniel's point is that Pf is not defined yet when it is first called in the script. You could fix this by moving the line using Pf that Daniel pointed to after the definition that you refer to. I think the general point, however, is that it makes it much easier to help if you try to make

Re: Accuracy of DiffusionTerm for non-uniform mesh

2016-07-20 Thread Raymond Smith
. On Wed, Jul 20, 2016 at 4:25 PM, Daniel Wheeler <daniel.wheel...@gmail.com> wrote: > On Wed, Jul 20, 2016 at 1:30 PM, Raymond Smith <smit...@mit.edu> wrote: > > Hi, FiPy. > > > > I was looking over the diffusion term documentation, > > > http://www.c

Accuracy of DiffusionTerm for non-uniform mesh

2016-07-20 Thread Raymond Smith
Hi, FiPy. I was looking over the diffusion term documentation, http://www.ctcms.nist.gov/fipy/documentation/numerical/discret.html#diffusion-term and I was wondering, do we lose second order spatial accuracy as soon as we introduce any non-uniform spacing (anywhere) into our mesh? I think the

Re: Possibility of setting NaN constraints for CellVariable ?

2016-07-13 Thread Raymond Smith
Hi, Krishna. This strikes me as a strange way to go about implementing something, so it might be helpful to have a bit more physical details about the system in order to see if the list has proposals for alternative ways to address the problem. The worry about 0's propagating into the rest of the

Re: problem with my initial conditions

2016-10-05 Thread Raymond Smith
Hi, Damien. Try using u.setValue(0.5 + 0.5*sin(pi*x)*sin(pi*y)) and similarly for v. These lines could naturally be placed right after the definition of u and v (certainly before the time stepping begins). See

Re: Applying Two Different Diffusion Coefficients at Single FV Face

2016-09-16 Thread Raymond Smith
alue ? > > > > Best Regards > > > > Krishna & Ian. > > > > > > > > *From:* fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] *On Behalf > Of *Raymond Smith > *Sent:* Friday, September 16, 2016 7:18 PM > *To:* fipy@nist.gov > *Subject:* Re:

Re: Applying Two Different Diffusion Coefficients at Single FV Face

2016-09-16 Thread Raymond Smith
Hi, Ian. I don't think there is such a thing as having two different flux coefficients at the same face for the same governing PDE. The flux through a given face is calculated by the coefficient at that face times some approximation of the gradient in a field variable at that face, like D *

Re: Applying Two Different Diffusion Coefficients at Single FV Face

2016-09-16 Thread Raymond Smith
e FiPy do this calculation for you and avoid awkward use of the mesh spacing in the specification of the variable values. On Fri, Sep 16, 2016 at 11:12 AM, Raymond Smith <smit...@mit.edu> wrote: > Hi, Ian. > > I don't think there is such a thing as having two different flux >

Re: FiPy sweep convergence bottoms out

2016-09-27 Thread Raymond Smith
t; > > > Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a > tolerance of 10^-4 for \phi_e and \phi_s_neg. > > > > > > > > Furthermore, the time spent in sweeping (within each time-step) > increases as time progresses. > > > >

Re: FiPy sweep convergence bottoms out

2016-09-27 Thread Raymond Smith
Hi, Krishna. It would be more clear to plot the residuals on a semi-log plot (or equivalently plot the log of residual vs sweep number) to more clearly show the value of the small residuals, as the plots in that link make it look to me like the residuals all go to zero. Ray On Tue, Sep 27, 2016

Mailing list archive

2016-11-23 Thread Raymond Smith
Hi, FiPy. I'm having trouble accessing the mailing list archive, http://dir.gmane.org/gmane.comp.python.fipy I can get to that page but I can't search or browse through the archive. I'm wondering if it's just me or if it's down. Ray ___ fipy mailing

Re: Mailing list archive

2016-11-23 Thread Raymond Smith
wrote: > Hi Ray, > > Gmain is dead unfortunately. Try this instead, > https://www.mail-archive.com/fipy@nist.gov/. > > Cheers, > > Daniel > > On Wed, Nov 23, 2016 at 9:54 AM, Raymond Smith <smit...@mit.edu> wrote: > > Hi, FiPy. > > > &g