Re: A small documentation correction

2013-07-10 Thread Jonathan Guyer
On Jul 10, 2013, at 3:14 PM, Noam Yorav-Raphael noamr...@gmail.com wrote: In the numerical schemes page, in the first paragraph: aA-Ff0 should be aA+Ff0 Pf=-Ff/Df should be Pf=Ff/Df At least that's what makes sense to me. I'll let Wheeler address that. I know we had some sign changes in

Re: Issue with deleting face constraints

2013-06-26 Thread Jonathan Guyer
On Jun 26, 2013, at 11:45 AM, Ianis Bernard ibern...@mit.edu wrote: I noticed that when deleting the boundary conditions, the first element of the faceGrad arrays was replaced by a 0. And I don't know how to keep the old value. .faceGrad is a calculated quantity, not stored. In the absence

Re: divergence operator

2013-06-25 Thread Jonathan Guyer
On Jun 25, 2013, at 1:18 PM, Raymond Smith smit...@mit.edu wrote: I just re-ran it using divergence operators on arithmetic face values of displacements to confirm, and with that it works fine. Glad to hear it. ___ fipy mailing list fipy@nist.gov

Re: Position Interpolation on Vector field

2013-06-21 Thread Jonathan Guyer
On Jun 20, 2013, at 1:22 PM, Ryan Smith rya...@uci.edu wrote: I don't understand the result of 18 being the index if the length of each component of mesh.cellCenters.value is 16. So, it seems the biggest problem here is that I don't fully understand the use of numerix.nearest(). But, if

Re: [FiPy]

2013-06-20 Thread Jonathan Guyer
On Jun 20, 2013, at 12:23 AM, Rachel Zucker rzuc...@mit.edu wrote: I am really new to FiPy, so perhaps I'm responsible for the problem in some way, but I believe that examples/cahnHilliard/mesh2DCoupled.py does not work properly. I have gone through many examples without incident, but in

Re: Effect of surface energy on velocity of phase interface

2013-06-18 Thread Jonathan Guyer
On Jun 15, 2013, at 12:11 PM, Adam Stone arstone...@gmail.com wrote: At the end of the phase.simple example, the expected velocity is calculated from the undercooling and the parameter beta in order to choose a time step within the CFL limit. Beta (linear kinetic coefficient) is given a

Re: Matplotlib Streamplot for stokesCavity example

2013-06-12 Thread Jonathan Guyer
On Jun 11, 2013, at 2:34 AM, Ryan Smith rya...@uci.edu wrote: I would like to use matplotlib's streamplot function to display the fluid flow in the stokesCavity example. Furthermore, I would like to extend this for my own simulations of fluid flow (following the same code as stokesCavity

Re: Thermal modeling with FIPY

2013-05-20 Thread Jonathan Guyer
On May 19, 2013, at 12:23 PM, Michelangelo Formisano michelangelo.formis...@iaps.inaf.it wrote: I'm Michelangelo, an Italian post-doc, and I recently discovered FIPY. Welcome to FiPy. We hope it's useful to you. I would like to develop a 3D thermal/geophysical model of asteroids by using

Re: how to implement a thermal contact between two regions ?

2013-05-17 Thread Jonathan Guyer
On May 16, 2013, at 1:23 PM, Daniel Wheeler daniel.wheel...@gmail.com wrote: I believe the correct diffusion coefficient across the face that approximates a thin layer is D = Kc * (1 / (epsilon + (1 - epsilon) * D_ratio)) where D_ratio = Kc / 2 * (1 / K1 + 1 / K2) and

Re: how to implement a thermal contact between two regions ?

2013-05-16 Thread Jonathan Guyer
On May 16, 2013, at 6:39 AM, Frederic Durodie frederic.duro...@googlemail.com wrote: So I'm a bit puzzled as to why for X from -L/2 to 0 the temperature is 0. : it should increase linearly to 2.5 deg C. I suspect the problem is that divergence of the flux at the cell just left of the

Re: Transient Diffusion with Time Varying BC

2013-05-15 Thread Jonathan Guyer
On May 15, 2013, at 12:43 AM, Chuck Holbert cfholb...@yahoo.com wrote: Now that you explain it, this is exactly what I need. I'm not fluent in programming so not sure how to implement these suggestions within FiPy. Can you point me to an example that I can use to get started? Any help

Re: Transient Diffusion with Time Varying BC

2013-05-14 Thread Jonathan Guyer
On May 13, 2013, at 4:40 PM, Chuck Holbert cfholb...@yahoo.com wrote: Yes, now I see this. So, maybe mathematically I have setup the problem incorrectly. I would like to allow the concentrations at the interface to increase if the rate of back diffusion becomes greater than the rate of

Re: how to implement a thermal contact between two regions ?

2013-05-13 Thread Jonathan Guyer
On May 10, 2013, at 2:11 AM, Frederic Durodie frederic.duro...@googlemail.com wrote: could you help me with how to implement a thermal contact, hc [W/(m^2.K)], between two regions : so there is like a discontinuity in the temperature between the two regions. I don't know whether the

Re: Recasting PDE

2013-05-02 Thread Jonathan Guyer
On May 2, 2013, at 12:19 PM, Edwin Sze Lun Khoo edwin...@mit.edu wrote: The original PDE is dC/dt + alpha*d/dx(1/C) = d^2C/dx^2 where C is the dependent variable and alpha is a constant. You suggested that: You can try running the chain rule on it: \alpha\frac{\partial}{\partial

Re: unexpected result using var.getFacGrad().constrain(|gradvar|, where=boundary)

2013-04-30 Thread Jonathan Guyer
On Apr 29, 2013, at 5:45 PM, Frederic Durodie frederic.duro...@googlemail.com wrote: In a simple 2D heat conduction problem I try to impose a power flux on part of the outer boundary and a fixed temperature on the remaining part. However the resulting temperature distribution is not what

Re: Efficiency problem at initalization

2013-04-25 Thread Jonathan Guyer
On Apr 25, 2013, at 11:04 AM, Bruno Huet bruno.m.h...@lafarge.com wrote: it looks like most time is spent within a fipy function: fipy.variables.binaryOperatorVariable.binOp.unit Am I misusing fipy objects ? Could any one advise or has seen this behavior before? I have seen

Re: natural convection on a cylindrical coordinate

2013-04-02 Thread Jonathan Guyer
://article.gmane.org/gmane.comp.python.fipy/2971 and was just fixed a couple of days ago: On Mar 22, 2013, at 9:52 AM, Jonathan Guyer wrote: This issue has been fixed on the `develop` branch. See http://matforge.org/fipy/ticket/513 and http://matforge.org/fipy/changeset/fe00adaf9e/fipy. You

Re: branching grid

2013-03-26 Thread Jonathan Guyer
On Mar 25, 2013, at 7:17 PM, Kristopher Kuhlman wrote: I am familiar with domain decomposition methods. This seems a quite abstract way to tackle the problem. I don't want to artificially introduce iteration into a linear diffusion problem. It is really just a mesh-generation issue. Are

Re: FiPy convection problem with cylindrical grid?

2013-03-26 Thread Jonathan Guyer
On Mar 22, 2013, at 9:52 AM, Jonathan Guyer wrote: On Mar 21, 2013, at 6:38 PM, Kristopher Kuhlman wrote: I have no Idea what this actually means for my problem, but I thought I would report it. I have no idea what it means, either, but it's a helpful diagnostic. Thank you

Re: FiPy convection problem with cylindrical grid?

2013-03-22 Thread Jonathan Guyer
On Mar 21, 2013, at 6:38 PM, Kristopher Kuhlman wrote: I have no Idea what this actually means for my problem, but I thought I would report it. I have no idea what it means, either, but it's a helpful diagnostic. Thank you. ___ fipy mailing list

Re: Saving in parallel

2013-03-22 Thread Jonathan Guyer
You'll need to tell us more about what you're doing. I just tested Daniel's scripts, running the one at http://pastebin.com/p5rARUJf with `mpirun -np 2` and then running the one at http://pastebin.com/P883d0q4 in serial and it works fine. On Mar 22, 2013, at 5:12 PM, Adrian Jacobo wrote: Hi

Re: Fipy install test failures

2013-03-21 Thread Jonathan Guyer
On Mar 21, 2013, at 1:51 PM, Raymond Smith wrote: I went ahead and re-updated my scipy and matplotlib as well, so a test output with numpy-1.7.0 pysparse-1.1.1 scipy-0.11.0 matplotlib-1.2.0 I got 6 errors http://pastebin.com/BHadSKBE A number of them seem to be related to gmsh, but I

Re: Time dependent spatially varying 2D source term representation

2013-03-20 Thread Jonathan Guyer
On Mar 20, 2013, at 9:51 AM, Daniel Wheeler wrote: On Wed, Mar 20, 2013 at 5:57 AM, Serbulent UNSAL serbule...@gmail.com wrote: Dear Dan and Raymond, Thanks for your help to both. After your suggestions I review my code. But changing X and Y like X = mesh.x Y = mesh.y makes the

Re: Saving in parallel

2013-03-20 Thread Jonathan Guyer
On Mar 20, 2013, at 11:38 AM, Daniel Wheeler wrote: One way to get around the issue, is to pickle the simpler array and string objects and then use them to reconstruct the mesh and variable. This is hardly a persistent method for data storage, but pickling in general with complicated

Re: Fipy install test failures

2013-03-20 Thread Jonathan Guyer
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. Can you try again

Re: Bug with numpy 1.7.0

2013-03-20 Thread Jonathan Guyer
On Mar 12, 2013, at 8:19 AM, Jonathan Guyer wrote: On Mar 11, 2013, at 5:05 PM, Philippe Baucour wrote: I think I found a bug with numpy 1.7.0 and Fipy (latest git). The best example is the circle diffusion problem in which I can't initialize the viewer. I try to debug the problem

Re: Recasting PDE

2013-03-18 Thread Jonathan Guyer
On Mar 15, 2013, at 5:08 PM, Edwin Sze Lun Khoo wrote: The term I tried was PowerLawConvectionTerm(coeff=(-alpha/C**2, ), var=C) but I got an error that said IndexError: id1 does not have the same size as b. The rest of the error log can be found at http://pastebin.com/K4hy0GCh. The

Re: Recasting PDE

2013-03-15 Thread Jonathan Guyer
On Mar 14, 2013, at 9:33 PM, Edwin Sze Lun Khoo wrote: I am having difficulties with trying to put a PDE into a form that FiPy accepts. The equation in question is dC/dt + alpha*d/dx(1/C) = d^2C/dx^2 where C is the dependent variable and alpha is a constant. The first and last terms are

Re: FiPy convection problem with cylindrical grid?

2013-03-14 Thread Jonathan Guyer
Thanks for the report. I see the same error, but I don't understand it (and can't seem to debug it). I created http://matforge.org/fipy/ticket/513 to track the issue. On Mar 14, 2013, at 1:13 AM, Kristopher Kuhlman wrote: Greetings FiPy list, I am trying to make a 1D transient

Re: Matplotlib Viewer

2013-03-13 Thread Jonathan Guyer
On Mar 13, 2013, at 3:44 AM, Philippe Baucour wrote: Have a look to my previous email about numpy 1.7 bug !!! Yes, this definitely looks like the same issue. I don't think it has anything to do with matplotlib, per se, but that for some reason numpy 1.7 is returning cell or face indices as

Re: Bug with numpy 1.7.0

2013-03-12 Thread Jonathan Guyer
On Mar 11, 2013, at 5:05 PM, Philippe Baucour wrote: I think I found a bug with numpy 1.7.0 and Fipy (latest git). The best example is the circle diffusion problem in which I can't initialize the viewer. I try to debug the problem and is seems to be related to numpy.take for which indices

Re: Trilinos installation

2013-03-08 Thread Jonathan Guyer
On Mar 7, 2013, at 2:53 PM, Adrian Jacobo wrote: On a related comment, I'm able to compile your example code using the openmp wrapper for gcc: openmpicc trivialmpi.c -o trivialmpi and it runs just fine using openmpirun. This is the macports openmpi you installed? That may be the

Re: Trilinos installation

2013-03-08 Thread Jonathan Guyer
On Mar 8, 2013, at 10:47 AM, Adrian Jacobo wrote: As you suspected, I've installed openmpi using macports, and this might be the source of the problem. Here I send you the result of 'otool -L' for the mpi4py and PyTrilinos libraries. Interesting. It would be good to figure out why

Re: Fipy install test failures

2013-02-22 Thread Jonathan Guyer
On Feb 21, 2013, at 7:43 PM, Raymond Smith wrote: 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

Re: Splicing a 3D Gmsh structure to get a 2D mesh

2013-02-07 Thread Jonathan Guyer
On Feb 6, 2013, at 10:47 AM, Laurence wrote: I've set up a 3D Gmsh such that there is a convenient surface at Y==0. Therefore, in this 3D mesh there are many faces on this plane. At every step in my transient equation, I want to take the values on the faces on this plane, and view

Re: spatially varying anisotropic diffusion coefficient

2013-02-04 Thread Jonathan Guyer
On Feb 4, 2013, at 11:59 AM, William McFadden wrote: From the FAQ, I'm setting it up by defining CellVariables that can be set to vary spatially n_xx = CellVariable(mesh=mesh, value = x) n_yx = CellVariable(mesh=mesh,value= x) then I generate a few diffusion terms. the first term

Re: Create mesh subset

2013-01-24 Thread Jonathan Guyer
On Jan 24, 2013, at 7:57 AM, Laurence wrote: SOLVED!!! Good! I realised I had to create the constants that control my reactions into a CellVariable which are therefore localised to the reaction area. Yes. If the reaction constant is both localized and constant, then the .setValue()

Re: Generate documentation html or pdf

2013-01-24 Thread Jonathan Guyer
On Jan 23, 2013, at 11:08 PM, Ajay Rawat wrote: Why not try using pygment; pygmentize -O full,style=emacs -o test.tex inputGrid2D.py Thanks for the suggestion. That does a nice job of rendering the python code, but it does not deal with the reStructuredText and TeX mathematics that we use

Re: Heat Conduction

2013-01-24 Thread Jonathan Guyer
On Jan 23, 2013, at 8:39 PM, John Assael wrote: I think it its not a problem of properties as the same values are used in COMSOL and they result different values. Moreover, I tried small changes like 5-10% and there was no big difference... If you drop tc0 by a factor of 2, you get pretty

Re: Create mesh subset

2013-01-23 Thread Jonathan Guyer
On Jan 23, 2013, at 1:30 PM, Laurence wrote: I've only started using Fipy and this is my first post. Welcome. I would like to take a mesh I have imported from Gmsh, and create a subset mesh of certain cells within certain X,Y limits. The mesh imports fine, and I have my cells

Re: Create mesh subset

2013-01-23 Thread Jonathan Guyer
On Jan 23, 2013, at 3:39 PM, Laurence wrote: I'm happy with the mask and how it ascertains to the mesh I've already created. My issue is that I am creating a diffusion field on the mesh, and at one place in the mesh, a localised reaction is taking place depending on the concentration at

Re: Heat Conduction

2013-01-23 Thread Jonathan Guyer
On Jan 22, 2013, at 9:56 AM, John Assael wrote: Well I finally did it with some extra points defining the cell size... However I keep getting a marked difference from Comsol results The charts are here... http://www.ic3man.gr/Tol8_6c.xls Is it possible that the calculations are not done

Re: Heat Conduction

2013-01-22 Thread Jonathan Guyer
On Jan 19, 2013, at 6:21 AM, John Assael wrote: Perfect I gave Gmsh a try! However is the Gmsh2D background parameter not working? It works for me. Do the tests pass? Background meshes are tested in the docstring for Gmsh2D and if the tests pass, then background meshes are working. What

Re: Heat Conduction

2013-01-18 Thread Jonathan Guyer
On Jan 18, 2013, at 12:01 PM, John Assael wrote: I have a couple more questions: 1) The problem is a quarter symmetry and I am solving the problem in the first Quartile how can I specify the symmetry of the experiment? I'd use a CylindricalGrid1D mesh for the problem you've shown us so far.

Re: Heat Conduction

2013-01-16 Thread Jonathan Guyer
On Jan 16, 2013, at 6:35 AM, John Assael wrote: Thank you very much for your help! Do you know how can I set only a point (a small circle) as the heat source and not the whole side? examples.diffusion.mesh1D, examples.diffusion.electrostatics, and examples.phase.anisotropy all show how to

Re: Heat Conduction

2013-01-14 Thread Jonathan Guyer
On Jan 13, 2013, at 12:30 PM, John Assael wrote: I know - properties dw,cpw,kw,d,cp,k and I know Q. I want to calculate the temperature rise as a function of time So I create a mesh and set the CellVariable dT = CellVariable(name = r'$\Delta T$', mesh = mesh,

Re: Heat Conduction

2013-01-14 Thread Jonathan Guyer
On Jan 14, 2013, at 12:10 PM, John Assael wrote: Dear Jonathan, The problem that ll try to solve next is in 2D so I would prefer to solve everything this way. Exactly! Could you please provide me an example sample boundary condition for my case? Sample boundary condition for what? Set

Re: setValue in parallel

2012-12-10 Thread Jonathan Guyer
On Dec 7, 2012, at 5:32 PM, dely wrote: I am writing to ask how to correctly use setValue with the where argument when running fipy in parallel. For example, to set the value of a cellVariable in a hemispherical region on the bottom boundary of a mesh, I can do the following: x, y =

Re: Solving two coupled equations with nonlinear terms

2012-12-10 Thread Jonathan Guyer
On Dec 10, 2012, at 1:55 PM, Adrian Jacobo wrote: And I'm defining the system in this way: mesh = fp.Grid3D(dx=dx, dy=dy,dz=dz, nx=nx, ny=ny,nz=nz) C = fp.CellVariable(name = Calcium,mesh = mesh, value = 0.) B = fp.CellVariable(name = Buffer,mesh = mesh, value = B_0) eqC =

Re: Spatially varying 2D source in fipy 3

2012-12-07 Thread Jonathan Guyer
On Dec 7, 2012, at 10:47 AM, Adam Stone wrote: Or is the '2D' solution actually doing something like this? eahbgfec.png Yes. Thanks to Benny for the diagnosis. ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal

Re: Spatially varying 2D source in fipy 3

2012-12-05 Thread Jonathan Guyer
This is http://matforge.org/fipy/ticket/447, which we haven't resolved yet. At this point, either do: X, Y = mesh.cellCenters[0], mesh.cellCenters[1] or X, Y = mesh.cellCenters X = CellVariable(mesh=mesh, value=X) Y = CellVariable(mesh=mesh, value=Y) There is no reason to use the

Re: Integrating field

2012-11-29 Thread Jonathan Guyer
On Nov 28, 2012, at 5:15 PM, Adrian Jacobo wrote: I'm solving an equation in 3d and I need to calculate the integral of the field. What is the most convenient/fast way of doing this? int = var.cellVolumeAverage * var.mesh.numberOfCells A related question: how can I access individual

Re: Integrating field

2012-11-29 Thread Jonathan Guyer
On Nov 29, 2012, at 10:49 AM, Adrian Jacobo wrote: Hi, Thank you for your answer. I'm solving an equation in 3d and I need to calculate the integral of the field. What is the most convenient/fast way of doing this? int = var.cellVolumeAverage * var.mesh.numberOfCells Just to

Re: 1D-FPE - Using FiPy

2012-11-27 Thread Jonathan Guyer
On Nov 26, 2012, at 3:48 PM, Kerem Yunus Camsari wrote: Since I am using the Fokker-Planck equation, I needed to add the gradient of the diffusion term as a convection term separately (middle term below). It appears that if I turn this term off , the solution does not blow up.

Re: Question on quaternary example and chemical potentials

2012-11-15 Thread Jonathan Guyer
On Nov 14, 2012, at 6:25 PM, Adam Stone wrote: I'm going through the quaternary phase field example and having some difficulty understanding the calculation of standard potentials. : : But I don't understand how you cook these standard potentials: for Cj in interstitials + substitutionals

Re: Problems with phase.binaryCoupled example

2012-11-11 Thread Jonathan Guyer
On Nov 9, 2012, at 8:42 PM, Adam Stone wrote: I was reviewing the examples.phase.binaryCoupled example at http://www.ctcms.nist.gov/fipy/examples/phase/generated/examples.phase.binaryCoupled.html and while trying to understand the implicit treatment of dC/dt, I noticed some possible

Re: Problem with mesh1D.py

2012-11-02 Thread Jonathan Guyer
It appears that you are trying to run a FiPy 3.0 example with an earlier installation of FiPy. We do not maintain (or even use) the MatForge Live CD and I don't know how old it is. The FiPyWorkbook wiki was contributed by one of FiPy's users, Will Gathright, over two years ago, so I would guess

Re: installation fipy : which version of python ?

2012-10-17 Thread Jonathan Guyer
Thanks, Andreas. I run 2.7.2 on my Mac OS X laptop and we have 2.6.6 on our Debian machines. FiPy 3.x should run with Python 2.4 or newer, but there is little incentive to run with anything other than the newest version of Python 2.x readily available to you. Although FiPy runs under Python

Re: piecewise functional parameter dependence

2012-10-16 Thread Jonathan Guyer
On Oct 12, 2012, at 5:17 PM, Kris Kuhlman wrote: On Fri, Oct 12, 2012 at 9:03 AM, Jonathan Guyer gu...@nist.gov wrote: The script below illustrates the way I would do this. Note that it crashes once h == hs because C is then zero and the DiffusionTerm gets an infinite coefficient

Re: piecewise functional parameter dependence

2012-10-12 Thread Jonathan Guyer
On Oct 12, 2012, at 1:33 AM, Kris Kuhlman wrote: I am trying to simulate a non-linear problem with piecewise-defined parameters, depending on the range of the dependent variable. What is the best way to specify this? In my example below, I used a function and an intermediate CellVariable,

Re: piecewise functional parameter dependence

2012-10-12 Thread Jonathan Guyer
On Oct 12, 2012, at 11:03 AM, I wrote: FiPy has know way of knowing you want a dependency on h. Ouch! FiPy has *no* way of knowing ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY:

Fwd: A sad day for our community. John Hunter: 1968-2012.

2012-08-30 Thread Jonathan Guyer
I am very sad to pass along this news. It has been my privilege to get to know John over the past several years at SciPy and SIAM conferences. He has always been friendly, helpful, and engaged and his development of matplotlib has been a key to the advancement of FiPy. He will be missed. Begin

Re: trilinos issue

2012-08-28 Thread Jonathan Guyer
On Aug 28, 2012, at 2:40 PM, Benny Malengier wrote: Yes, that is not the problem. I'm actually not even using Trilinos, in 2.x series I did not have the required mpi lib installed. This is trunk, on my other PC I run trunk from after the 3.x release, and that does not show this issue.

Re: FiPy 3.0 install on ubuntu 11.10 64 bit.

2012-08-22 Thread Jonathan Guyer
OK, I wouldn't worry about the test failures, then. On Aug 21, 2012, at 9:48 PM, osman buyukisik wrote: On 08/21/2012 02:27 PM, Jonathan Guyer wrote: On Aug 20, 2012, at 8:48 PM, osman buyukisik wrote: On 08/20/2012 08:13 AM, Jonathan Guyer wrote: what happens if you run `gmsh --version

Re: FiPy 3.0 install on ubuntu 11.10 64 bit.

2012-08-21 Thread Jonathan Guyer
On Aug 20, 2012, at 8:56 PM, osman buyukisik wrote: ~/SRC/FiPy-3.0/examples/phase$ python polyxtalCoupled.py Traceback (most recent call last): File polyxtalCoupled.py, line 374, in module exec(fipy.tests.doctestPlus._getScript()) File string, line 291, in module File string,

Re: FiPy 3.0 install on ubuntu 11.10 64 bit.

2012-08-20 Thread Jonathan Guyer
On Aug 19, 2012, at 12:19 PM, osman buyukisik wrote: Also at the end I get Ran 550 tests in 277.547s FAILED (failures=4) !!! Skipped 188 doctest examples because `gmsh` cannot be found on the $PATH

ANN: FiPy 3.0

2012-08-16 Thread Jonathan Guyer
We are pleased to announce the release of FiPy 3.0. http://www.ctcms.nist.gov/fipy The bump in major version number reflects more on the substantial increase in capabilities and ease of use than it does on a break in compatibility with FiPy 2.x. Few, if any, changes to your existing

Re: Temporally varying convection coefficient

2012-07-25 Thread Jonathan Guyer
On Jul 24, 2012, at 8:14 AM, Yun Tao wrote: I encountered an interesting problem when I tried to vary the convection coefficient as a function of time steps. : : There must be a better way to varying the coefficient. I've spent days testing out dynamics under seasonal convection strength

Re: fipy Grid2D vs. Grid3D

2012-07-19 Thread Jonathan Guyer
installation. No crashes! Thank you. Best wishes, Ferenc On Wed, 18 Jul 2012 16:58:42 -0400 Jonathan Guyer gu...@nist.gov wrote: Ferenc, I don't think the problem is because you don't have gmsh. If gmsh is absent, then the tests that require it should just fail and move on. I've just

Re: fipy Grid2D vs. Grid3D

2012-07-18 Thread Jonathan Guyer
Ferenc, I don't think the problem is because you don't have gmsh. If gmsh is absent, then the tests that require it should just fail and move on. I've just confirmed this with FiPy 2.1.3 on my Mac. If I had to guess, I suspect the problem may be with your bleeding-edge versions of NumPy and

Re: ConvectionTerm ImplicitSourceTerm variable assignment in coupled equations

2012-07-02 Thread Jonathan Guyer
On Jul 2, 2012, at 1:08 PM, Daniel Wheeler wrote: On Mon, Jul 2, 2012 at 6:56 AM, Yun Tao yun...@ucdavis.edu wrote: 1. In Equation [1], when I set the coefficient of the ConvectionTerm to a function of psi, it returns TypeError: unsupported operand type(s) for *: 'binOp' and 'unOp'

Re: 2D Cylindrical Coordinates - Pipe

2012-06-20 Thread Jonathan Guyer
On Jun 20, 2012, at 11:20 AM, Kendall Boniface wrote: I'm a bit confused about the getCellVolumes() function. Since I am using the 2D cylindrical grid, I assume it isn't actually giving me volumes so to speak. I've manually played around with some of my numbers and can't seem to figure

Re: Conservation of normalized function

2012-06-20 Thread Jonathan Guyer
On Jun 20, 2012, at 7:43 AM, Yun Tao wrote: However, though the initial distribution integrates to 1 over the finite domain, the area under the curve gradually decays as the function converges on the origin (see attachment). This can be witnessed from the numerical outputs starting at

Re: 2D Cylindrical Coordinates - Pipe

2012-06-19 Thread Jonathan Guyer
On Jun 19, 2012, at 12:20 PM, Kendall Boniface wrote: I am having a bit of trouble manipulating a 2D cylindrical mesh and was wondering if anyone has any helpful advice? mesh = CylindricalGrid2D(dx=dx, dy=dy, nx=nx, ny=ny) + ((0.0046,),) print mesh.getCellCenters() I want the z axis

Re: Beer-Lambert law with FaceValue boundary conditions

2012-06-11 Thread Jonathan Guyer
On Jun 11, 2012, at 4:12 AM, Daniel Farrell wrote: Thank you for suggesting a solution to the problem! Just so I understand: the anchors are coefficients of source terms that are only non-zero in the edge cells (left and right respectively) and they allow the problem to be restated with

Re: Beer-Lambert law with FaceValue boundary conditions

2012-06-08 Thread Jonathan Guyer
On Jun 6, 2012, at 10:13 PM, Daniel Farrell wrote: I am trying to solve an extension of the Beer-Lambert law that includes the non-zero reflectivity of surfaces and the multiple reflections that therefore occur inside. I took some inspiration from Daniel's recent blog post,

Re: 2-D convection to fixed point

2012-06-08 Thread Jonathan Guyer
On Jun 7, 2012, at 5:35 PM, Yun Tao wrote: But if the peak is advecting out of the domain, then it is not conserved. Makes sense. And if I were to multiply the convection term by tanh(x) with x being the position vector, which then will generate a fixed pt at (0,0), how would I ensure

Re: Solving a convection diffusion reaction equation

2012-05-31 Thread Jonathan Guyer
On May 31, 2012, at 5:08 AM, Matej Svejda wrote: Thanks, I now defined h as a variable that automatically updates and the speed is much better now. I'm still getting unexact results... Besides sweeping (which we established doesn't help in my case) and using smaller timesteps/higher grid

Re: Organizing iterations, sweeps and time steps

2012-05-31 Thread Jonathan Guyer
On May 30, 2012, at 3:56 PM, Kendall Boniface wrote: I'm looking for a bit of assistance in how to organize a Fipy script I am trying to write. I am very new to programming so please forgive me if this becomes overly evident as I go on. No need to apologize. Your script was pretty close.

Re: Coupled PDE and Non-Liner Algebraic Equations

2012-05-31 Thread Jonathan Guyer
On May 31, 2012, at 11:18 AM, bruno.h...@pole-technologique.lafarge.com bruno.h...@pole-technologique.lafarge.com wrote: To make your example work, I had to add these 2 lines in the time loop: for var in y: var.stale = 1 other wise it looks like

Re: 2-D convection to fixed point

2012-05-30 Thread Jonathan Guyer
On May 29, 2012, at 4:35 AM, Yun Tao wrote: Q1: As observed from previous testing under both 1 and 2-D, the preservation of a probability density function under pure convection is extremely sensitive to the mesh's spatial resolution. However, though we have an equation that helps us

Re: Coupled PDE and Non-Liner Algebraic Equations

2012-05-24 Thread Jonathan Guyer
On May 23, 2012, at 10:45 PM, I wrote: For small values of N\phi and Ny, I think the following would do the trick. For larger numbers of variables and equations, I have some ideas, but would need to experiment a little. OK, it looks like you can use memory and store values a bit more

Re: Solving a convection diffusion reaction equation

2012-05-23 Thread Jonathan Guyer
On May 23, 2012, at 9:28 AM, Matej Svejda wrote: I want for the H(\alpha, t) function to be automatically updated as the Variable t changes. But I have a problem: The value of H is defined piecewise, meaning that I have a treshold \epsilon. Depending on whether \alpha = \epsilon or the value

Re: Coupled PDE and Non-Liner Algebraic Equations

2012-05-23 Thread Jonathan Guyer
On May 23, 2012, at 6:21 AM, bruno.h...@pole-technologique.lafarge.com bruno.h...@pole-technologique.lafarge.com wrote: In fact, I just didn't setup F to work witth the spatial dimension, i.e. F is for me a chemistry solver and does not know about space. OK. I was confused when you said

Re: Coupled PDE and Non-Liner Algebraic Equations

2012-05-23 Thread Jonathan Guyer
On May 23, 2012, at 1:21 PM, bruno.h...@pole-technologique.lafarge.com bruno.h...@pole-technologique.lafarge.com wrote: Please give the simplest set of toy equations for your PDEs and for F that represent what you want. Here's an example with N\phi = 2 and Ny = 3 PDEs

Re: Solving a convection diffusion reaction equation

2012-05-21 Thread Jonathan Guyer
On May 19, 2012, at 8:09 AM, Matej Svejda wrote: I am updating the function H in the following way: newHValues = [0.0] * len(centers) for i in range(len(centers)): alpha = centers[i] newHValues[i] = h(alpha, t) H.setValue(newHValues) The normalization is performed the same

Re: Boundary condition in fipy trunk

2012-05-21 Thread Jonathan Guyer
On May 21, 2012, at 2:17 PM, wang yunbo wrote: I want to add a fixed-flux boundary condition like this in fipy trunk, BCs = (FixedFlux(faces=m.exteriorFaces(),value=0),) An error is encountered. Traceback (most recent call last): File phasefieldtest.py, line 67, in module BCs

Re: Solving a convection diffusion reaction equation

2012-05-17 Thread Jonathan Guyer
On May 16, 2012, at 5:05 PM, Matej Svejda wrote: Right know I'm solving it with FiPy in the following way: eq = TransientTerm(coeff = C) == ImplicitDiffusionTerm() + ExponentialConvectionTerm(coeff=H.getFaceGradAverage()) I would use .getFaceGrad() here, not .getFaceGradAverage(). I

Re: Second derivative of function in Source

2012-05-14 Thread Jonathan Guyer
On May 12, 2012, at 9:44 AM, Matej Svejda wrote: I'm using FiPy to solve a Convection Diffusion Reaction Equation (one spacial dimension, plus time). I want my source to: da^2(H(a, t)) * P(a, t) Where da^2(H(a,t)) is the second special derivative of a function H (a known function and

Re: Request: Scharfetter-Gummel discretization for solving drift-diffusion equations of pn diode

2012-05-10 Thread Jonathan Guyer
On May 10, 2012, at 6:36 AM, jimmy.123 wrote: I am trying to solve the drift-diffusion equations of electrons and holes in a semiconductor, in which Scharfetter-Gummel discretization is needed. Hence, I would like to kindly ask whether it is possible for you (or one related) to provide me

Re: Attribute Error using Matplotlib

2012-04-25 Thread Jonathan Guyer
On Apr 24, 2012, at 4:33 PM, Rodney Clayton wrote: File /usr/lib/pymodules/python2.7/fipy/viewers/matplotlibViewer/ matplotlib1DViewer.py, line 107, in _getSuitableVars vars = [var for var in _MatplotlibViewer._getSuitableVars(self, vars) if var.getMesh().getDim() == 1]

Re: Problems with 3D Gmsh-meshes and Mayavi

2012-04-04 Thread Jonathan Guyer
On Mar 26, 2012, at 11:46 AM, Andreas Hasenkopf wrote: I tried to post this comment on the gmsh ticket 434, but the system considers my comments to be spam... It looks like you were finally able to post to the ticket by registering I take it? I'll take a look at your revised mesh once I get

Re: Matrix display

2012-03-23 Thread Jonathan Guyer
On Mar 23, 2012, at 10:50 AM, Fausto Arinos de A. Barbuto wrote: Hello, To solve a steady-state diffusion-convection problem such as the one presented in pg. 83 of FiPy Manual Release 2.1.3 (examples.convection.exponential1D.mesh1D) a tridiagonal and a column matrix must be put

Re: Incorrect result for getGrad

2012-03-22 Thread Jonathan Guyer
On Mar 22, 2012, at 2:40 AM, wang yunbo wrote: gradient = phi.getGrad print gradient print gradient.shape The output is: bound method CellVariable.getGrad of distance function File PVD.py, line 51, in module print gradient.shape AttributeError: 'function' object has no

Re: How to properly call a CellVariable's __call__() method?

2012-03-20 Thread Jonathan Guyer
On Mar 20, 2012, at 11:38 AM, Andreas Hasenkopf wrote: in my simulations I have a CellVariable called potential defined on a 3D mesh generated in gmsh. And now I'd like to convert the data into a numpy array so that I can do some more math with it, e.g. integrate along a path (e.g. z-axis).

Re: Problems with 3D Gmsh-meshes and Mayavi

2012-03-14 Thread Jonathan Guyer
On Mar 14, 2012, at 3:04 AM, Andreas Hasenkopf wrote: attached are my mesh and the script. In the gmsh options I have unchecked everything but triangles and tetrahedra as fipy does not support something else (as written in the fipy documentation). Thanks for this. I can certainly reproduce

Re: Problems with 3D Gmsh-meshes and Mayavi

2012-03-13 Thread Jonathan Guyer
On Mar 13, 2012, at 11:29 AM, Andreas Hasenkopf wrote: Am 13.03.2012 15:15, schrieb Daniel Wheeler: Where are they? I wasn't aware of anyway to post process fipy results with gmsh. In the second screencast on http://geuz.org/gmsh/screencasts/ someone shows how to load some data into

Re: Problems with 3D Gmsh-meshes and Mayavi

2012-03-13 Thread Jonathan Guyer
On Mar 13, 2012, at 3:24 PM, Andreas Hasenkopf wrote: gmsh supports several formats for data import. Among those VTK, Interesting. Is that documented... anywhere? The only Gmsh formats that I know about are at http://geuz.org/gmsh/doc/texinfo/gmsh.html#File-formats. but due to the fact

Re: Solving Laplace Equation between two Ring Electrodes in 2D

2012-03-08 Thread Jonathan Guyer
On Mar 8, 2012, at 7:15 AM, Andreas Hasenkopf wrote: to get to know fipy I tried to solve the Poisson equation in 2D for two adjacent rings: one had a constant charge density and the other one was used as boundary condition \phi=0. But as I do not really know the charge distribution in the

Re: numpy import: from automatic to manual

2012-03-07 Thread Jonathan Guyer
On Mar 6, 2012, at 5:30 PM, Yun Tao wrote: Thank you both for the extremely thorough and helpful information! Just as an additional note to whoever needs it, in terms of fipy versions and the need to import numerix, 2.2 works the same as 3.0. Yes, thank you for clarifying. As you

  1   2   3   4   >