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

2016-05-09 Thread Guyer, Jonathan E. Dr. (Fed)
By declaring Pd and Pu as CellVariables, you are declaring them to be functions of space. That's what a CellVariable is. Furthermore, eqpd and eqpu depend on Pf and Pk, so that necessitates that Pd and Pu are functions of space. Can you show us the math for the equations you are trying to solv

Re: globalValue in parallel

2016-05-05 Thread Guyer, Jonathan E. Dr. (Fed)
400,) > > 1 cellVariable (240,) (400,) > > 0 faceVariable (512,) (512,) > > 1 faceVariable (512,) (512,) > > 1 center coordinates (2, 240) (2, 400) > > 0 center coordinates (2, 240) (2, 400) > > 0 face coordinates (2, 512) (2, 512) > 1 face coordinates

Re: globalValue in parallel

2016-04-29 Thread Guyer, Jonathan E. Dr. (Fed)
ument > appears to be the right call after all. > > Working on the PR. > > Trevor > > ________ > From: fipy-boun...@nist.gov on behalf of Guyer, > Jonathan E. Dr. (Fed) > Sent: Wednesday, April 27, 2016 4:39:05 PM > To: FIPY >

Re: globalValue in parallel

2016-04-27 Thread Guyer, Jonathan E. Dr. (Fed)
gt; mpi4pyCommWrapper.py. > > Trevor > > > ____ > From: fipy-boun...@nist.gov on behalf of Guyer, > Jonathan E. Dr. (Fed) > Sent: Wednesday, April 27, 2016 3:53:39 PM > To: FIPY > Subject: Re: globalValue in parallel > > It loo

Re: globalValue in parallel

2016-04-27 Thread Guyer, Jonathan E. Dr. (Fed)
It looks like 'recvobj' was removed from mpi4py about two years ago: https://bitbucket.org/mpi4py/mpi4py/commits/3d8503a11d320dd1c3030ec0dbce95f63b0ba602 but I'm not sure when it made it into the released version. It looks like you can safely edit fipy/tools/comms/mpi4pyCommWrapper.py to rem

Re: Diffusion equation with additional terms

2016-04-22 Thread Guyer, Jonathan E. Dr. (Fed)
coeff=(phi+1)) > > is like doing > > ImplicitSourceTerm(coeff=2) > > because I initially defined phi as > > phi = CellVariable(mesh=mesh, value=1) > > How should I define phi so that the source term is not a constant? > ________ &g

Re: Diffusion equation with additional terms

2016-04-22 Thread Guyer, Jonathan E. Dr. (Fed)
-ImplicitSourceTerm(coeff=(phi+1)) will do it, although you may want to look at http://www.ctcms.nist.gov/fipy/examples/phase/generated/examples.phase.simple.html for a discussion of the most efficient way to linearize a source. > On Apr 22, 2016, at 12:22 PM, Gaury, Benoit H. (IntlAssoc) >

Re: Thermal Diffusion with Source

2016-04-19 Thread Guyer, Jonathan E. Dr. (Fed)
I don't see anything obviously wrong with the way you've posed the source. Why do you think you have a problem? > On Apr 18, 2016, at 4:44 PM, John Leeman wrote: > > Hi all, > > I’m working on implementing a rather simple thermal diffusion model with > FiPy, but haven’t been able to find any

Re: fipy diffusion setup

2016-04-18 Thread Guyer, Jonathan E. Dr. (Fed)
> On Apr 18, 2016, at 10:54 AM, Daniel Wheeler > wrote: > > On Fri, Apr 15, 2016 at 9:29 AM, Phil wrote: >> I see questions posted on this list, Gist and stack overflow - is there a >> preference for posting ? > > I prefer Stackoverflow, but depends on the nature of the question. > Stackove

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

2016-04-05 Thread Guyer, Jonathan E. Dr. (Fed)
PM, Raymond Smith wrote: > Thanks, Jon. > > I'll post something to StackOverflow in the next few days. > > Also, that makes sense about the steady state ignoring the initial condition > and finding the zero solution. I'd forgotten seeing that in the example. > >

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

2016-04-04 Thread Guyer, Jonathan E. Dr. (Fed)
Ray - Thanks for your very complete and very correct answers to Dario. If you wouldn't mind transcribing your answer to Dario's question on StackOverflow, I'd be happy to up-vote it. In answer to *your* questions: > On Apr 3, 2016, at 11:09 AM, Raymond Smith wrote: > > Actually, I'm not su

Re: Memory Leaks with Trilinos

2016-03-30 Thread Guyer, Jonathan E. Dr. (Fed)
sfied > dependencies on my machine. So I must apologize, I must have been more tired > than I thought. > > Sorry for the error! > -Mike Waters > > On 3/30/16 11:52 AM, Guyer, Jonathan E. Dr. (Fed) wrote: >> It looked to me like steps and accuracy were the way to do it,

Re: Memory Leaks with Trilinos

2016-03-30 Thread Guyer, Jonathan E. Dr. (Fed)
ry that > and see if my problem persists. > > Thanks again! > -Mike Waters > > On 3/30/16 11:52 AM, Guyer, Jonathan E. Dr. (Fed) wrote: >> It looked to me like steps and accuracy were the way to do it, but my runs >> finish in one step, so I was confused. When I cha

Re: Memory Leaks with Trilinos

2016-03-30 Thread Guyer, Jonathan E. Dr. (Fed)
Thanks, -mike On 3/29/16 3:38 PM, Guyer, Jonathan E. Dr. (Fed) wrote: I guess I spoke too soon. FWIW, I'm running Trilinos version: 11.10.2. On Mar 29, 2016, at 3:34 PM, Guyer, Jonathan E. Dr. (Fed) mailto:jonathan.gu...@nist.gov>> wrote: I'm not seeing a leak. The below is for tri

Re: Memory Leaks with Trilinos

2016-03-29 Thread Guyer, Jonathan E. Dr. (Fed)
I guess I spoke too soon. FWIW, I'm running Trilinos version: 11.10.2. On Mar 29, 2016, at 3:34 PM, Guyer, Jonathan E. Dr. (Fed) wrote: > I'm not seeing a leak. The below is for trilinos. VSIZE grows to about 11 MiB > and saturates and RSS saturates at around 5 MiB. VSIZE

Re: Memory Leaks with Trilinos

2016-03-29 Thread Guyer, Jonathan E. Dr. (Fed)
I'm not seeing a leak. The below is for trilinos. VSIZE grows to about 11 MiB and saturates and RSS saturates at around 5 MiB. VSIZE is more relevant for tracking leaks, as RSS is deeply tied to your system's swapping architecture and what else is running; either way, neither seems to be leaking

Re: Convection-diffusion problem on a 1D cylindrical grid

2016-03-28 Thread Guyer, Jonathan E. Dr. (Fed)
On Mar 28, 2016, at 3:04 PM, Djoeke Schoonenberg wrote: > Hmm, when I do as you suggest: > > xface = mesh.faceCenters[0] > > Eq = TransientTerm(var=S_vap) == \ > ConvectionTerm(coeff=vgas(xface)+p*Dif/xface, var=S_vap)\ > + ImplicitDiffusionTerm(coeff=Dif, var=S_vap)\ > > I

Re: Memory Leaks with Trilinos

2016-03-28 Thread Guyer, Jonathan E. Dr. (Fed)
Mike, thanks for the example, and for the rather perverse application of FiPy! I'll fiddle with this and see what I get. - Jon On Mar 25, 2016, at 7:16 PM, Michael Waters wrote: > Hello, > > I still have a large memory leak when using Trilinos. I am not sure where to > start looking so I mad

Re: Convection-diffusion problem on a 1D cylindrical grid

2016-03-28 Thread Guyer, Jonathan E. Dr. (Fed)
On Mar 28, 2016, at 12:20 PM, Djoeke Schoonenberg wrote: > So it seems that I’m implementing the variable speed in a wrong way. What I > did was ConvectionTerm(FaceVariable(mesh=mesh, value=vgas(x)), var=S_vap), > where vgas(x) is the speed as function of position. How should this be done >

Re: Error: Gmsh hasn't produced any cells!

2016-03-24 Thread Guyer, Jonathan E. Dr. (Fed)
x27;s worth, here's what I was trying to run before. I think you'll see the Gmsh code is the same as what is in your example On Thu, Mar 24, 2016 at 3:53 PM, Guyer, Jonathan E. Dr. (Fed) mailto:jonathan.gu...@nist.gov>> wrote: OK, thank you. Diffusion_Circle.py is not the n

Re: Error: Gmsh hasn't produced any cells!

2016-03-24 Thread Guyer, Jonathan E. Dr. (Fed)
an~1\appdata\local\temp\tmp2hf2nq.geo' > Info: Meshing 1D... > Info: Done meshing 1D (0 s) > Info: Meshing 2D... > Info: Done meshing 2D (0 s) > Info: 1 vertices 1 elements > Info: Writing 'c:\users\ddesan~1\appdata\local\temp\tmpisuemv.msh'

Re: Error: Gmsh hasn't produced any cells!

2016-03-24 Thread Guyer, Jonathan E. Dr. (Fed)
What platform are you running on? Gmsh 2.0 is ancient and it's possible we've broken compatibility in some way (although I don't think so). What happens if you type `gmsh --version` at the command-line with one of the newer versions of Gmsh you've tried? On Mar 24, 2016, at 11:56 AM, Daniel De

Re: unsubscribe

2016-03-24 Thread Guyer, Jonathan E. Dr. (Fed)
Thanks, Ray, for pointing to the instructions. I've unsubscribed Chris manually. - Jon On Mar 24, 2016, at 12:19 PM, Raymond Smith wrote: > Chris, please try following the instructions on the website and putting > unsubscribe in the body and sending the mail to fipy-requ...@nist.gov ... > > h

Re: simple convection

2016-03-23 Thread Guyer, Jonathan E. Dr. (Fed)
As Ray says, FiPy comes with a lot of examples that are intended to be an intrinsic part of the documentation. Not all examples have been formatted and included on the website or in the PDF (some don't have enough didactic, some are redundant to other examples and are intended more as tests than

Re: Help with memory leaks

2016-03-21 Thread Guyer, Jonathan E. Dr. (Fed)
Interesting problem. Memory profiling has always been challenging, but I've not seen signs of leaks when I've looked. Your PySparse w/ GC curve seems to reinforce that. There's a lot more going on with Trilinos, but I don't know why it would be leaky, even with garbage collection. Out of curiosi

Re: 3 convection-reaction-diffusion PDEs coupled to a 2nd-order ODE with spatial derivatives in source terms

2016-03-10 Thread Guyer, Jonathan E. Dr. (Fed)
r unrelated question: shall I preferentially make implicit my > “reaction” term (= source term with opposite sign in two PDEs) ? > > Many thanks again. > Best, > > Hervé > >> On Mar 10, 2016, at 17:49, Guyer, Jonathan E. Dr. (Fed) >> wrote: >> >>&g

Re: 3 convection-reaction-diffusion PDEs coupled to a 2nd-order ODE with spatial derivatives in source terms

2016-03-10 Thread Guyer, Jonathan E. Dr. (Fed)
> I'm not entirely sure why the tuple version breaks, but the convection > terms do store different variables. A tuple of Variable fields is never a higher rank field. It might work occasionally, but it really shouldn't be counted on. I have no idea why V[None] produces a vector from a scalar, b

Re: Cell Variable not updating after solving.

2016-03-08 Thread Guyer, Jonathan E. Dr. (Fed)
I assume there's more to the problem than this? With rho_h = 0, isn't the initial condition phi_h = 0 already at the final solution? On Mar 8, 2016, at 2:36 PM, Michael Waters wrote: > I did some more testing, the trilinos LinearGMRESsolver works even > better than the Pysparse LinearPCG and a

Re: non-homogeneous, non-linear diffusion coefficient

2016-03-07 Thread Guyer, Jonathan E. Dr. (Fed)
rgot to add proper units to b). Now it works normally. Sorry > for the inconvenience. You may erase the thread if you wish. > > Regards, > Gerard > > > > On 03/02/2016 09:29 PM, Guyer, Jonathan E. Dr. (Fed) wrote: >> Please post the entire traceback. That one error line

Re: non-homogeneous, non-linear diffusion coefficient

2016-03-02 Thread Guyer, Jonathan E. Dr. (Fed)
Please post the entire traceback. That one error line is not enough to tell what's going on. On Mar 2, 2016, at 12:50 PM, Gerard Salvatella wrote: > Hello! I'm trying to solve a diffusion equation where the coefficient of > the diffusion term depends on both x and the variable to solve > (temp

Re: how to evaluate individual terms of equation

2016-02-18 Thread Guyer, Jonathan E. Dr.
es Pringle wrote: > Thank you, Jon, that is helpful. I would love to have the ability to find the > individual terms of the equation as calculated in the matrix that is solved > by fiPy. This would make closing budgets, etc, easier. But your solution is a > good start. > > T

Re: how to evaluate individual terms of equation

2016-02-16 Thread Guyer, Jonathan E. Dr.
James - I don't think there's a straightforward way to get at this. You can certainly write the explicit forms, e.g., (DiffCoeff * Psi.faceGrad).divergence or (Psi * convCoeff).divergence but this isn't exactly the same as the matrix FiPy builds, as discussed at https://github.com/usnist

Re: Residuals in FiPy

2016-02-16 Thread Guyer, Jonathan E. Dr.
; Djoeke > > On 29 Jan 2016, at 20:04, Guyer, Jonathan E. Dr. > wrote: > >> Djoeke - >> >> The residual returned by sweep is the L2 norm of (L x - b) (see >> https://github.com/usnistgov/fipy/blob/develop/fipy/solvers/solver.py#L143). >> In other wor

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

2016-02-10 Thread Guyer, Jonathan E. Dr.
I agree with everything Ray said. In electrochemical systems (which is what Aniruddha was working on last I knew), swapping an arithmetic mean for a harmonic mean makes an enormous difference. In semiconductors, there's an even more non-linear interpolation that's widely used, known as Scharfett

Re: gmsh EnvironmentError: Gmsh version must be >= 2.0.

2016-02-08 Thread Guyer, Jonathan E. Dr.
play > with this some more unless you have any ideas? > > I'll post updates just in case anyone else ever runs into these problems. > > On Mon, Feb 8, 2016 at 3:51 PM, Guyer, Jonathan E. Dr. > wrote: > Strange. I sort of understand what this error message means, but I don&

Re: gmsh EnvironmentError: Gmsh version must be >= 2.0.

2016-02-08 Thread Guyer, Jonathan E. Dr.
t; File > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\variables\histogramVariable.py", > line 38, in > from fipy.meshes import Grid1D > > File > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\mes

Re: gmsh EnvironmentError: Gmsh version must be >= 2.0.

2016-02-08 Thread Guyer, Jonathan E. Dr.
from fipy.variables.histogramVariable import * > > File > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\variables\histogramVariable.py", > line 38, in > from fipy.meshes import Grid1D > > File > "C:\Users\ddesan

Re: gmsh EnvironmentError: Gmsh version must be >= 2.0.

2016-02-05 Thread Guyer, Jonathan E. Dr.
I would guess that you've run into the problem in https://github.com/usnistgov/fipy/issues/462 We fixed this last summer, but haven't pushed a new release since then (sorry about that). If you check out the `develop` branch from our repository, I think that will correct this problem. If not,

Re: Reconfiguring FiPy to use Trilinos

2016-02-01 Thread Guyer, Jonathan E. Dr.
For an individual run, append --trilinos to the command line. To set it for all runs going forward, set the environment variable (bash syntax): export FIPY_SOLVERS=trilinos See http://www.ctcms.nist.gov/fipy/documentation/USAGE.html#command-line-flags-and-environment-variables On Feb 1, 201

Re: Residuals in FiPy

2016-01-29 Thread Guyer, Jonathan E. Dr.
Djoeke - The residual returned by sweep is the L2 norm of (L x - b) (see https://github.com/usnistgov/fipy/blob/develop/fipy/solvers/solver.py#L143). In other words, it is the unscaled deviation from zero of the linear discretization of your non-linear PDEs. Because we don't scale the residuals

Re: Truncation of diffusion coefficient as a function of a CellVariable

2016-01-28 Thread Guyer, Jonathan E. Dr.
There should be no reason for incompatibility between 1 and var2. max doesn't know about numpy arrays or FiPy Variables. numerix.fmax should work, but doesn't. Oddly, numerix.fmax((1-var2), a) does work. I vaguely know why, but need to delve deeper (https://github.com/usnistgov/fipy/issues/486)

Re: sweeping through nonlinear diffusion

2015-12-28 Thread Guyer, Jonathan E. Dr.
do > each sweep increases with each time step, independent of the time step size. > Could this be a memory issue? > > ~Dan > > On Mon, Dec 21, 2015 at 10:42 AM, Guyer, Jonathan E. Dr. > wrote: > Dan - > > I recommend you plot the residual as a function of sweeps fo

Re: Trilinos installation on OS X using site instruction

2015-12-21 Thread Guyer, Jonathan E. Dr.
Be sure to start with a clean build directory after changing any settings. I would guess that -DTPL_ENABLE_Boost=OFF didn't work because traces of the previous cmake run will still present. Our instructions are almost certainly out of date. I find building Trilinos unpleasant and it's been almo

Re: sweeping through nonlinear diffusion

2015-12-21 Thread Guyer, Jonathan E. Dr.
r. It starts from ~0.5s and increases by ~0.01s with each > sweep, quickly growing to levels too slow to both simulating. Any guidence on > this would be appreciated. > > ~Dan > > On Sat, Oct 31, 2015 at 2:04 PM, Guyer, Jonathan E. Dr. > wrote: > Glad to hear it. >

Re: survey on minimum python version

2015-12-07 Thread Guyer, Jonathan E. Dr.
3.3. On Dec 4, 2015, at 5:27 PM, Guyer, Jonathan E. Dr. wrote: > Survey closes shortly. Vote early and vote often. > > On Dec 1, 2015, at 9:20 AM, Guyer, Jonathan E. Dr. > wrote: > >> Survey results are overwhelming, but statistically insignificant. >> >>

Re: survey on minimum python version

2015-12-04 Thread Guyer, Jonathan E. Dr.
Survey closes shortly. Vote early and vote often. On Dec 1, 2015, at 9:20 AM, Guyer, Jonathan E. Dr. wrote: > Survey results are overwhelming, but statistically insignificant. > > We will close the survey on Friday, December 4th, 2359 GMT and determine our > path forward a

Re: survey on minimum python version

2015-12-01 Thread Guyer, Jonathan E. Dr.
Guyer, Jonathan E. Dr. wrote: > [tl;dr version: please take the survey at > https://www.surveymonkey.com/r/KVYHFKK] > > According to our documentation (not that we've tested in awhile) FiPy > currently supports all Python versions from 2.4 on. If you use the 2to3 > utility,

survey on minimum python version

2015-11-25 Thread Guyer, Jonathan E. Dr.
[tl;dr version: please take the survey at https://www.surveymonkey.com/r/KVYHFKK] According to our documentation (not that we've tested in awhile) FiPy currently supports all Python versions from 2.4 on. If you use the 2to3 utility, FiPy also works with Python 3, but this isn't a configuration

Re: Setting convection dependent on the interpolated density of spatial points

2015-11-18 Thread Guyer, Jonathan E. Dr.
; Yun > > > > On Tue, Oct 27, 2015 at 4:55 PM, Yun Tao wrote: > Aha! That solved it!! Thanks so much, Jon! I'll be sure to look into the > subclass declaration of `CellVariable'. > > Cheers, > Yun > > On Tue, Oct 27, 2015 at 4:46 PM, Guyer, Jonathan E.

Re: Non-linear term in a PDE

2015-11-05 Thread Guyer, Jonathan E. Dr.
Try phi.grad.dot(phi.grad) On: 04 November 2015 21:28, "Fausto Arinos de A. Barbuto" wrote: >T.grad()*T.grad() I mean, phi.grad()*phi.grad(). Yet another typo. Fausto ___ fipy mailing list fipy@nist.gov http://www.

Re: Non-linear term in a PDE

2015-11-04 Thread Guyer, Jonathan E. Dr.
That term is really the partial derivative of \phi with respect to the quantity (x^2)? Strange. I don't think you have any choice but to do that piece with the chain rule. After that, you'll get (\frac{1}{2 x}\frac{\partial \phi}{\partial x})^2 but that's still not a form that FiPy can really d

Re: 2D shallow water model with fipy

2015-11-02 Thread Guyer, Jonathan E. Dr.
SIMPLE scheme if > I should run into any more trouble. > > Best regards, > Dion > > On 31.10.2015 19:03, Guyer, Jonathan E. Dr. wrote: >> Dion - >> >> Thanks for your example and explanation. I've converted to an IPython >> notebook to make it

Re: sweeping through nonlinear diffusion

2015-10-31 Thread Guyer, Jonathan E. Dr.
e dependence. I agree that > derivations of the heat equation are often not careful about non-linear > coefficients. I'll try your reformulation of it later this week. We have some > other tools in-house to benchmark it with. > > ~Dan > > On Wed, Oct 28, 2015 at 5

Re: 2D shallow water model with fipy

2015-10-31 Thread Guyer, Jonathan E. Dr.
Dion - Thanks for your example and explanation. I've converted to an IPython notebook to make it easier to show the math derivation. See https://github.com/guyer/haefner/blob/master/killworth.ipynb (math rendering is kind of random on the github site, but should be OK if you download it and hav

Re: sweeping through nonlinear diffusion

2015-10-28 Thread Guyer, Jonathan E. Dr.
Dan - Interesting problem. What I actually find is that the residual decays or at least holds fairly steady until some point at which the residual rises rapidly, regardless of the number of sweeps. I was ultimately able to make some headway by looking at the form of your equations. By writing

Re: FiPy interior conductor with Poisson's equation

2015-10-28 Thread Guyer, Jonathan E. Dr.
In 3D this is equivalent to > restricting the gradient to be perpendicular to the conductor surface. Does > FiPy allow applying a boundary condition like this for an interior object? > > Kevin > > > > From: Guyer, Jonathan E. Dr. > Sent: Thursday, October 22, 201

Re: Setting convection dependent on the interpolated density of spatial points

2015-10-27 Thread Guyer, Jonathan E. Dr.
e of an embedded function update_signal inside the iteration loop > messing things up? > > Thanks, > Yun > > On Mon, Oct 19, 2015 at 4:35 PM, Guyer, Jonathan E. Dr. > wrote: > You would do this in a similar way to how time-dependent boundary conditions > are illustrated

Re: Best way to implement parallel normalization?

2015-10-23 Thread Guyer, Jonathan E. Dr.
compatible on the cluster here. Hopefully a new version of mpi4py will > be installed soon so I may continue to parallelize. > > Thank you, > -mike waters > > On 10/22/2015 11:50 AM, Guyer, Jonathan E. Dr. wrote: >> Mike - >> >> The most expedient way to get th

Re: Prefactors on diffusion terms and/or problems with advection terms

2015-10-23 Thread Guyer, Jonathan E. Dr.
carefully, and I'm happy to share it if > anyone is curious about the aspects of this problem that may not make it a > great fit for fipy. (Though I'm definitely not familiar with numerical PDE > solvers in general so I'm sure it's mostly my lack of facility with th

Re: Best way to implement parallel normalization?

2015-10-22 Thread Guyer, Jonathan E. Dr.
Mike - The most expedient way to get this normalization is rho / (rho.cellVolumeAverage * mesh.cellVolumes.sum()) `cellVolumeAverage` and `cellVolumes.sum()` automatically take care of the MPI communication and account for not double-counting the overlaps between partitions. Also, if you us

Re: Prefactors on diffusion terms and/or problems with advection terms

2015-10-22 Thread Guyer, Jonathan E. Dr.
Peter - I'm glad sweeping was able to get you a more reasonable solution (although I'm not seeing the non-linearity that would require it). `AdvectionTerm` only ever gets used in our level set examples, which I'm not intimately familiar with. I don't know of any fundamental reason it wouldn't w

Re: FiPy interior conductor with Poisson's equation

2015-10-22 Thread Guyer, Jonathan E. Dr.
The discussion at http://www.ctcms.nist.gov/fipy/documentation/USAGE.html#applying-internal-boundary-conditions describes exactly what you are trying to do. I think I know why it might not have worked for you, though. When declaring an `ImplicitSourceTerm`, FiPy has to be careful not to add neg

Re: Setting convection dependent on the interpolated density of spatial points

2015-10-19 Thread Guyer, Jonathan E. Dr.
, for some reason, var(x,t) is unresponsive to these > changes. > > Therefore, my question is: how can I base the convection term on a > CellVariable that gets temporally updated outside of the equation definition? > > Thanks, > Yun > > On Wed, Aug 26, 2015 at 2:47 PM, G

Re: Solving 2D convection-diffusion problem

2015-10-07 Thread Guyer, Jonathan E. Dr.
1 2 > , from bottom row to top row, left to right column, when I call the viewer? > Sorry for these simple questions, I just started using fipy > Thanks > Kevin > > On Wed, Oct 7, 2015 at 1:56 PM, Guyer, Jonathan E. Dr. > wrote: > Please see: > > exampl

Re: Solving 2D convection-diffusion problem

2015-10-07 Thread Guyer, Jonathan E. Dr.
Please see: examples/phase/binary.py examples/phase/polyxtalCoupled.py examples/phase/quaternary.py examples/reactiveWetting/liquidVapor2D.py for some examples of spatially varying convection velocity fields. On Oct 6, 2015, at 6:54 PM, Kevin Lin wrote: > Hi all, > > I am trying to use fipy t

Re: Operator variable with user-defined function

2015-10-02 Thread Guyer, Jonathan E. Dr.
Jose - What's surprising to me is how infrequently this question has come up. I don't think there's anything wrong with what you've done, but understand your feeling that you've "hacked" FiPy. It's quite possible that you can just write `T = bellLinT(Sigma)`. Depending on what's in bellLinT, th

Re: binary langmuir adsorption model

2015-10-02 Thread Guyer, Jonathan E. Dr.
r recommendations and I'm able to get a solution. Now I need to just need > to troubleshoot the model so that I can get the _correct_ solution. > > Again, I really appreciate your thoughtfulness and recommendations! > > Kind regards, > > Douwe Bruinsma > > On Fr

Re: problems with diffusion term expression

2015-09-30 Thread Guyer, Jonathan E. Dr.
We used to have the ability to multiply a term by another field, but this capability was removed some time ago because it didn't work properly a lot of the time. Even if you could do it, I don't think it would help. Instead of dividing by zero on the b-vector, you'd be multiplying be zero on th

Re: Flux for inhomogeneous convection diffusion problem

2015-09-29 Thread Guyer, Jonathan E. Dr.
Your thoughts make sense and you're not missing an API. As I understand it, I think extracting the flux using the weights from the numerical scheme is the most accurate representation of the physical flux, as these account for the likely fact that the field does not vary linearly between cell c

Re: What's the best way to implement the Robin boundary condition

2015-09-28 Thread Guyer, Jonathan E. Dr.
r both method, but I think my Robin boundary condition implementation in FIPy is wrong. So I would be appreciated if you look at my equation and code and help me to correct the boundary condition definition. Thanks, Vahid On Monday, September 28, 2015 3:17 PM, "Guyer, Jonathan E. Dr."

Re: What's the best way to implement the Robin boundary condition

2015-09-28 Thread Guyer, Jonathan E. Dr.
What was the result you were expecting? As discussed in the email thread you linked to, (1) has a known bug: https://github.com/usnistgov/fipy/issues/426 I also discovered that the typeset analytical expression in the robin.py example was also wrong, although the analytical solution in the code

Re: How to extract solver coefficient matrix and faces/cells next to boundary

2015-09-21 Thread Guyer, Jonathan E. Dr.
Vahid - The following allows you to access the matrix after solving or sweeping: >>> myEquation.cacheMatrix() >>> myEquation.solve(...) >>> matrix = myEquation.matrix The exact form of the matrix will vary depending on the solver suite you use (PySparse, PyTrilinos, ...). Similarly, you can ac

Re: How to combine scipy.interpolate.interp2d with fipy variables

2015-09-09 Thread Guyer, Jonathan E. Dr.
Zebo - A few points to augment Trevor's (correct) answer: * I think I know what mean when you distinguish between "discretized region" and "continuum region", but be aware that FiPy does not solve continuum equations. Any FiPy mesh is a discretization in space to enable solution by the finite

Re: export CellVariable to numpy array and vice-versa

2015-09-04 Thread Guyer, Jonathan E. Dr.
You'll need to give us a bit more to work with. As much as possible, FiPy Variable's just work with numpy. Please use our fipy.tools.numerix library instead of importing numpy directly, as we patch a few things, but largely you can just pass our Variables to numpy and get Variables back. If you

Re: binary langmuir adsorption model

2015-09-04 Thread Guyer, Jonathan E. Dr.
Douwe - Sorry for the delay in answering. I had to think through this a bit. The most immediate cause of the error you received is that you are attempting to solve for u declared as a FaceVariable. FiPy can only solve equations for CellVariables. This is easily remedied by changing the declarat

Warning: many deprecated classes and methods are about to go away

2015-08-26 Thread Guyer, Jonathan E. Dr.
A large number of methods and classes have been deprecated in FiPy for a long time and it's time to clean up the code. The 3.2 release of FiPy (hopefully coming soon) will be removing anything that was deprecated in FiPy 3.0 or earlier. This includes just about any method that starts with "get"

Re: Setting convection dependent on the interpolated density of spatial points

2015-08-26 Thread Guyer, Jonathan E. Dr.
Yun - I've gotten your script to "work" and posted the changes to: https://gist.github.com/guyer/caca956463dfc3835722/revisions The main changes I made were: * to get rid of the intrep2d, as it wasn't working properly [signal_fct(xf, yf) generates a result of shape (len(xf), len(xf)) inst

Re: Notes on FiPy+Trilinos installation in Anaconda

2015-08-25 Thread Guyer, Jonathan E. Dr.
Thanks, Trevor, for continuing to plug at this, and for sorting out the threading issue. FYI, your efforts to find pygist are commendable, but ultimately futile. https://github.com/usnistgov/fipy/pull/453, which you accepted and merged, did away with the GistViewers, as they were deprecated yea

Re: cross-section

2015-06-28 Thread Guyer, Jonathan E. Dr.
Try the solutions at: http://permalink.gmane.org/gmane.comp.python.fipy/1576 and http://stackoverflow.com/a/29996927/2019542 On Jun 23, 2015, at 8:57 AM, fomin wrote: > I solve an equation for a three-dimensional grid. How do I get 2-D > cross-section of the solution of the equation of

Re: Plan to migrate to Python 3?

2015-06-28 Thread Guyer, Jonathan E. Dr.
Since neither of the primary sparse solvers we use, PySparse or PyTrilinos, has been migrated to Python 3, we're not in any rush. FiPy can be used with Python 3 by running the `2to3` converter and then using the SciPy sparse solvers. This doesn't perform as well, but is suitable if you need to

Re: Convection Terms

2015-04-28 Thread Guyer, Jonathan E. Dr.
You can certainly write f.grad.dot(g.grad), but that will be fully explicit and will not converge very well. It's best to look at the equation in its entirety. Where did this term come from? Oftentimes, terms like this arise from relations like \nabla\cdot(f\nabla g) \equiv \nabla f \cdot \n

Re: Issue with executing FiPy processes in parallel

2015-03-23 Thread Guyer, Jonathan E. Dr.
I'm glad to hear that worked for you. On Mar 21, 2015, at 7:36 PM, abart...@caltech.edu wrote: > I made the changes that you suggested. The program works perfectly now. > Thank you for the help. This should shave hours off of my simulations. > > Thanks again, > Tony > > >> It doesn't have anyt

Re: Issue with executing FiPy processes in parallel

2015-03-21 Thread Guyer, Jonathan E. Dr.
It doesn't have anything to do with the solver. The issue is that multiprocessing pickles the arguments to the multiprocessed function. FiPy has known issues with pickling (see https://github.com/usnistgov/fipy/issues/358 and https://github.com/usnistgov/fipy/wiki/MeshPickling#sour-pickles (wh

Re: Speeding up FiPy / FiPy project status / looking for experienced FiPy developer contact

2015-03-18 Thread Guyer, Jonathan E. Dr.
On Mar 18, 2015, at 10:06 AM, "Daniel Wheeler" wrote: >> I would appreciate contact to anyone who has developer experience with FiPy >> to discuss my implentations to keep them in line of the structure of the >> FiPy project/code. > > Let's set up a video chat with Jon Guyer included. Email m

Re: Issue with executing FiPy processes in parallel

2015-03-13 Thread Guyer, Jonathan E. Dr.
I'm not aware that we've encountered this, but I also don't think we've ever tried. Just to clarify, the issue is that the answer changes between processes=1 or processes=2+? I don't think that any of FiPy's parallel code (e.g., using mpirun to invoke PyTrilinos in parallel) should be triggere

Re: fipy test

2015-03-13 Thread Guyer, Jonathan E. Dr.
y project. It is > complicated one but I tried on Linux and it works fine. Let me try to import > fipy project and run it through eclipse and also will try to run on cmd > prompt. > > > On Friday, March 13, 2015 10:53 PM, "Guyer, Jonathan E. Dr." > wrote: > &g

Re: trouble installing Fipy3.1

2015-03-12 Thread Guyer, Jonathan E. Dr.
I suspect that `which pip` will produce /usr/local/bin/pip and thus will be associated with /usr/local/bin/python. For whatever reason your $PATH finds /usr/bin/python before /usr/local/bin/python. pip and fipy (and all of fipy's prerequisites) all need to be installed into the same python inst

Re: graph result does not show up using eclipse in windows 8

2015-03-12 Thread Guyer, Jonathan E. Dr.
he output is too long. I am attaching the last part of the output. What > about installing fipy on Win7. Is it still a problem? > >> On 3/12/2015 3:42 AM, Guyer, Jonathan E. Dr. wrote: >> Dhisa - >> >> We're not allowed to run Windows 8 here, so we have

Re: graph result does not show up using eclipse in windows 8

2015-03-11 Thread Guyer, Jonathan E. Dr.
Dhisa - We're not allowed to run Windows 8 here, so we have no experience with this. Can you provide the output of >>> import fipy >>> fipy.test() On Mar 10, 2015, at 4:44 AM, Dhisa Minerva wrote: > I tried to install fipy and it's dependencies on 2 windows PC and the graph > doesn't sh

Re: The minimum required packages for parallel running

2015-03-09 Thread Guyer, Jonathan E. Dr.
I am no specialist in noise terms, either, but the \delta(\vec{r} - \vec{r}')\delta(t - t') terms express "uncorrelated in space and time", so both \xi_c and \xi_\eta have that property in what you attached. Equation (1a) with the Laplacian is the appropriate conservative form for the noise on

Re: The minimum required packages for parallel running

2015-03-03 Thread Guyer, Jonathan E. Dr.
cmake \ -D CMAKE_BUILD_TYPE:STRING=RELEASE \ -D Trilinos_ENABLE_PyTrilinos:BOOL=ON \ -D BUILD_SHARED_LIBS:BOOL=ON \ -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON \ -D TPL_ENABLE_MPI:BOOL=ON \ -D MPI_BASE_DIR:PATH=${ANACONDA} \ -D Trilinos_ENABLE_TESTS:BOOL=ON \ -D DART_TESTING_TI

Re: How to define name of variables in CellVariable of vector form and plot not all components

2015-02-23 Thread Guyer, Jonathan E. Dr.
On Feb 21, 2015, at 4:40 PM, Dhisa Minerva wrote: > I am having a problem here in defining the variable name if using vector > form. For example I have 3 components, v1, v2, and v3. I define them in the > vector form as v. I want to put the name v1_sol, v2_sol, and v3_sol for > variable v1, v

Re: How to split 4th-order DiffusionTerm into two 2nd-order?

2015-02-23 Thread Guyer, Jonathan E. Dr.
Let me add that if you performed such an analysis, that would be a welcome addition to the example, especially if it shows that your decomposition scheme is superior. On Feb 23, 2015, at 8:44 AM, Guyer, Jonathan E. Dr. wrote: > I don't know. The form you write down in "split pl

Re: How to split 4th-order DiffusionTerm into two 2nd-order?

2015-02-23 Thread Guyer, Jonathan E. Dr.
oeff=epsilon**2, var=phi)) > > > eq = eq1 & eq2 > dt = 0.5 > viewer = fp.Viewer(vars=(phi, psi)) > for t in range(1000): > phi.updateOld() > psi.updateOld() > res = 1.e5 > while res > 1.e-1: > res = eq.sweep(dt=dt) > print res > viewer.plot()

Re: How to split 4th-order DiffusionTerm into two 2nd-order?

2015-02-20 Thread Guyer, Jonathan E. Dr.
On Feb 20, 2015, at 12:08 PM, Daniel Wheeler wrote: > On Fri, Feb 20, 2015 at 6:39 AM, Ronghai Wu wrote: >> Thanks, I worked it out. But still have three questions: >> (1) The 4th-order is split by "psi = d2fdphi2(phi-phiold) + dfdphi - >> epsilon**2*laplace phi". I do not understand why we nee

Re: How to split 4th-order DiffusionTerm into two 2nd-order?

2015-02-20 Thread Guyer, Jonathan E. Dr.
On Feb 20, 2015, at 6:39 AM, Ronghai Wu wrote: > (1) The 4th-order is split by "psi = d2fdphi2(phi-phiold) + dfdphi - > epsilon**2*laplace phi". I do not understand why we need > d2fdphi2(phi-phiold)? See the discussion on linearization of the source in http://www.ctcms.nist.gov/fipy/exampl

Re: How to split 4th-order DiffusionTerm into two 2nd-order?

2015-02-12 Thread Guyer, Jonathan E. Dr.
Those figures were just copied over from http://www.ctcms.nist.gov/fipy/examples/cahnHilliard/generated/examples.cahnHilliard.mesh2D.html and represent a 1000x1000 mesh run to an elapsed time of 1000. The coupled example runs a 20x20 mesh up to t=0.05. You should be able to manually increase t

Re: Coupled 1D PDE's on a periodic grid; writing tricky terms and coefficients in FiPy.

2015-02-10 Thread Guyer, Jonathan E. Dr.
I understand what you mean about it being simpler, but I tend not to work in 1D, because it can be misleading. You've got combinations of even-order and odd-order terms that don't make much sense to me if you think about them in higher dimensions. Using \nabla instead of (\partial / \partial x)

Re: Trouble with an Ubuntu Installation of FiPy

2015-02-09 Thread Guyer, Jonathan E. Dr.
Without knowing what the errors are, it's hard to be sure. Do FiPy's examples seem to run properly? On Feb 6, 2015, at 7:49 PM, Kyle Lawlor wrote: > Thanks for the replies. > I ended up using the pip install method. > Which seems to have worked pretty well up to 4 errors (after running > fip

Re: How to write source term in vector form

2015-02-06 Thread Guyer, Jonathan E. Dr.
isn't it? Or is it > because the domain solution is 1D? but it doesn't make sense since what we > have here is 2 variables. > > Look forward to your reply > > Dhisa > On Friday, February 6, 2015 8:08 AM, "Guyer, Jonathan E. Dr." > wrote: > >

<    1   2   3   4   5   >