Re: Recasting PDE

2013-07-15 Thread Daniel Wheeler
Yes. It is the absolute. You would obviously have to pass in a reference residual in order for the equation to return a relative residual. Good luck and let us know how things proceed. Cheers. -- Daniel Wheeler ___ fipy mailing list fipy@nist.

Re: A small documentation correction

2013-07-12 Thread Daniel Wheeler
or reporting this and you were quite right. It's now fixed on develop (see http://matforge.org/fipy/ticket/648). -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Diffusion in expanding matter

2013-07-11 Thread Daniel Wheeler
ar solvers), but we have resisted this up until now. I think we would go down this road if we wrapped Trilinos's NOX (non-linear solver package) for fipy or any other low level non-linear solver. I don't want to get into writing iterators, st

Re: Diffusion in expanding matter

2013-07-10 Thread Daniel Wheeler
thanks for the kind words regarding fipy. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: speeding up an RD system --redux

2013-07-08 Thread Daniel Wheeler
> Georg, Sorry for the delayed response. The function "_buildAndAddMatrices" does exactly what is says on the box. It calls lower level functions that build each term's system matrix and then adds those matrices together. Notably, it is not doing the

Re: Thin, highly conducting regions at surfaces

2013-06-17 Thread Daniel Wheeler
looking into FiPy. I hope we can support your efforts in the future. I think all the above methods should, hopefully, give the same outcome. Probably the third method requires the least effort and should be the first one to try. -- Daniel Wheeler ___ f

Re: speeding up an RD system --redux

2013-06-14 Thread Daniel Wheeler
that Trilinos and PySparse are not solving to the same tolerance (if I remember correctly), they use different noms by default. Another issues is that there is some Python-C interface overhead that scales with system size in Trilinos. We'll try and get to the bottom of some of these issues w

Re: Heat Conduction

2013-06-12 Thread Daniel Wheeler
happens? Another possibility is to solve a similar problem with a Cartesian grid and then compare FiPy and COMSOL. My guess is that COMSOL does a better job with non-orthogonality than FiPy. We know that non-orthogonal correction terms is something that needs to b

Re: anisotropic mobility

2013-06-12 Thread Daniel Wheeler
. You (me or someone) needs to come up with some nice test cases. Do you know of any papers with test cases for this? -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Heat Conduction

2013-06-12 Thread Daniel Wheeler
and COMSOL would be a good place to start if that's possible. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Heat Conduction

2013-06-10 Thread Daniel Wheeler
r example gradually? > The time step is entirely under your control you can increase it based on elapsed time or something more sophisticated such as the number of steps to convergence, but FiPy doesn't have any build in stepper schemes. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Problem with cahnHilliard.sphere example

2013-06-03 Thread Daniel Wheeler
o5.py" before. BTW You may want to use pastebin.com for this sort of long output. It makes the email easier to read. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.g

Re: Problem with cahnHilliard.sphere example

2013-06-03 Thread Daniel Wheeler
setup.py': [Errno 2] No such file or directory > > where's the mistake? > You need to be in the unpacked fipy directory. Download the tarball or zip for version 3.0 and unpack it. http://www.ctcms.nist.gov/fipy/download/ Change directory into the unpacked directory and you

Re: Problem with cahnHilliard.sphere example

2013-05-30 Thread Daniel Wheeler
8) = {4, 1, 5}; Circle(9) = {5, 1, 2}; Line Loop(10) = {6, 7, 8, 9}; Plane Surface(11) = {10}; ''' % locals()) print mesh.cellCenters in a file rather than running at the command line? Can you also run the full test suite "

Re: Problem with cahnHilliard.sphere example

2013-05-30 Thread Daniel Wheeler
On Thu, May 30, 2013 at 11:48 AM, Michelangelo Formisano < michelangelo.formis...@iaps.inaf.it> wrote: > Hi Daniel, > the output has this form: > > Info: Running 'gmsh tmp.geo -format msh -2 -nopopup tmp.msh' [1 > node(s), max. 4 thread(s)] > Info: Started on Thu May 30 17:40:41 2013 > >

Re: Problem with cahnHilliard.sphere example

2013-05-30 Thread Daniel Wheeler
me vertices and elements and not zero vertices and zero elements as the output showed in your first email. Try this to check for sure that the Gmsh installation is messed up. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Problem with cahnHilliard.sphere example

2013-05-29 Thread Daniel Wheeler
shException(errStr) > GmshException: Gmsh hasn't produced any cells! Check your Gmsh code. > Hi Michelangelo, Could you try running 'python -c "import fipy; fipy.test()"' and pasting the output into an email (or on pastebin maybe better). That might help figu

Re: Transient Diffusion with Time Varying BC

2013-05-17 Thread Daniel Wheeler
eler & J. A. Warren, "FiPy: Partial Differential > Equations with Python," *Computing in Science & Engineering* *11*(3) pp. > 6—15 (2009), doi:10.1109/MCSE.2009.52<http://dx.doi.org/10.1109/MCSE.2009.52>, > http://www.ctcms.nist.gov/fipy > > -- Daniel Wheeler

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

2013-05-16 Thread Daniel Wheeler
thin layer is D = Kc * (1 / (epsilon + (1 - epsilon) * D_ratio)) where D_ratio = Kc / 2 * (1 / K1 + 1 / K2) and epsilon = dx / cellSize I implemented this for a 1D problem and it seems to give the correct jump (see http://pastebin.com/qB0XgceL). I set K1

Re: Adaptive time step

2013-05-07 Thread Daniel Wheeler
rs): v.setValue(otherV.value) timeElapsed += otherDt else: timeElapsed += dt There is no magic in FiPy for this sort of thing. It is just basic Python with loops, conditionals and resetting values. Hope the above helps. -- Daniel Wheeler __

Re: Recasting PDE

2013-05-06 Thread Daniel Wheeler
hope the above helps some. Cheers. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Recasting PDE

2013-05-03 Thread Daniel Wheeler
Newton steps for this? Then the transient and diffusion stay the same but the convection becomes - (2 C \delta C)_x where \delta C is the correction variable. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST

Re: Fipy install test failures

2013-04-17 Thread Daniel Wheeler
s for the feedback. I opened another ticket (see http://matforge.org/fipy/ticket/638) for this issue. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: fipy and gpu

2013-04-15 Thread Daniel Wheeler
n let us know how it goes. Cheers, Daniel -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Integral constraint

2013-04-15 Thread Daniel Wheeler
on (including time, space or the dependent variable in non-linear ways), but the user has to make the choice about explicit versus implicit and whether to use fixed point sweeps or Newton sweeps for the non-linear solutions. Cheers, -- Daniel Wheeler

Re: natural convection on a cylindrical coordinate

2013-04-01 Thread Daniel Wheeler
re is an "AztecOO.AZ_condnum" option that isn't included, but which you could include. You probably need to pass in something telling the solver to record the condition number using "SetAztecOption" to get it to work. Hope this helps. -- Daniel Wheeler

Re: Slope limiter methods in FiPy & VanLeerConvectionTerm

2013-03-25 Thread Daniel Wheeler
I work through the > CLAWPACK book, thanks for the info. > > Jason > > On Thu, Mar 21, 2013 at 11:20 AM, Daniel Wheeler > wrote: > > > > > > > > On Thu, Mar 21, 2013 at 8:59 AM, Jonathan Guyer wrote: > >> > >> > >> > >>

Re: Saving in parallel

2013-03-22 Thread Daniel Wheeler
http://pastebin.com/P883d0q4. > > Cheers > > > > ___ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > -- Daniel Wheele

Re: Slope limiter methods in FiPy & VanLeerConvectionTerm

2013-03-21 Thread Daniel Wheeler
I, I filed a ticket, see http://matforge.org/fipy/ticket/564. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Slope limiter methods in FiPy & VanLeerConvectionTerm

2013-03-21 Thread Daniel Wheeler
t; I'll fix this too and possibly create a common base class so you don't have to inherit directly from VanLeer. If you would prefer to take care of these changes then just let me know. Thanks. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Saving in parallel

2013-03-20 Thread Daniel Wheeler
xample) and in this case it works both in serial and in > parallel, so it seems that the problem is when saving a Gmsh grid. > > Adrian. > > > > > ___ > fipy mailing list > fipy@nist.gov > http://www.ctcms

Re: Time dependent spatially varying 2D source term representation

2013-03-20 Thread Daniel Wheeler
tle confused. The variables "X" and "Y" don't appear to be used after lines 34 and 35 so how can it have any influence on the code efficiency? -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [

Re: Time dependent spatially varying 2D source term representation

2013-03-19 Thread Daniel Wheeler
On Tue, Mar 19, 2013 at 4:35 PM, Raymond Smith wrote: > Oh, that's much cleaner. Thanks for that, Dan. > No problem. FYI, there is an open ticket on this issue http://matforge.org/fipy/ticket/447. -- Daniel Wheeler ___ fipy mailin

Re: Time dependent spatially varying 2D source term representation

2013-03-19 Thread Daniel Wheeler
t; Thanks, >> >> Serbulent >> >> >> [1] >> >> http://bb10.com/python-fipy/2012-12/msg00016.html >> http://osdir.com/ml/python.fipy/2007-10/msg9.html >> http://bb10.com/python-fipy/2011-05/msg00030.html >> _________

Re: Trilinos installation

2013-03-12 Thread Daniel Wheeler
y/documentation/USAGE.html#envvar-FIPY_VIEWER. Set "FIPY_VIEWER" to "matplotlib" or "mayavi" and it should take care of it. You can also instantiate the viewers directly, see the viewers at http://matforge.org/fipy/browser/fipy/fipy/viewers. Cheers -- Daniel

Re: Trilinos installation

2013-03-07 Thread Daniel Wheeler
From process 0 out of 3, Hello World! From process 2 out of 3, Hello World! From process 1 out of 3, Hello World! to check your MPI installation independently from Trilinos. Try and get the above working by setting the "-I" and "-L" flags if necessa

Re: constrain flux for interior faces of specific cells?

2013-03-04 Thread Daniel Wheeler
like this, newDiffCoeff = oldDiffCoeff * (T < threshold) You can also use the "newDiffCoeff.harmonicFaceValue" as the diffusion coefficient if you want to ensure that there is zero flux through the faces when the cell values on one or both sides of the face exceed the "threshold" value

Re: Solution interpolation accuracy

2013-03-04 Thread Daniel Wheeler
order of Ncells by | Npoints in general, but uses only Ncells when the | CellVariable's mesh is a UniformGrid object. If this isn't good enough have a look at Scipy's interpolation tools which I think has been improved greatly of late. -- Daniel Wheeler _

Re: Axisymmetric geometry

2013-03-04 Thread Daniel Wheeler
Hi Pierre, Sorry for taking so long to get back to you on this. On Fri, Mar 1, 2013 at 9:14 AM, Pierre de Buyl wrote: > On Fri, Feb 22, 2013 at 12:10:51PM -0500, Daniel Wheeler wrote: > > On Wed, Feb 20, 2013 at 1:54 PM, Pierre de Buyl > wrote: > > Following my 2D experi

Re: Fipy install test failures

2013-02-25 Thread Daniel Wheeler
ages the slave machines are using at http://build.cmi.kent.edu:8010/tgrid?branch=develop -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: TypeError raised when PySparse is used

2013-02-25 Thread Daniel Wheeler
you could just use the Scipy solvers. > > > I tried changing the dtypes of nearestIndices, chunk, and tmp to 'int32' > like what I did for pysparseMatrix.py, but that didn't work. > I wouldn't worry about those too much unless you need them for your work. Cheers

Re: Axisymmetric geometry

2013-02-22 Thread Daniel Wheeler
Try the CylindricalGrid2D just to make sure that the various changes for the axisymmetric problem are being handled correctly in your code and then we can go from there. Also see if things improve as the shift is increased away from zero and that the solutions are adequately converged. That's th

Re: Axisymmetric geometry

2013-02-20 Thread Daniel Wheeler
SE paper is nice, too). > Hi Pierre, Great to have you on board and thanks for the feedback. > Thanks for any comment on the method. > There don't seem to be any glaring issues, it all seems reasonable to me. Nice work. Cheers, Daniel Wheeler -- Daniel Wheeler _

Re: TypeError raised when PySparse is used

2013-02-15 Thread Daniel Wheeler
se the following to convert before calling addAt. if hasattr(id1, 'astype') and id1.dtype.name == 'int64': id1 = id1.astype('int32') if hasattr(id2, 'astype') and id2.dtype.name == 'int64': id2 = id2.as

Re: Multicomponent diffusion

2013-01-29 Thread Daniel Wheeler
q.sweep instead of eq.solve? > No, they do the same, but sweep calculates and returns the residual. Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Multicomponent diffusion

2013-01-29 Thread Daniel Wheeler
or the "2.". You could write TransientTerm() == DiffusiionTerm() + _ExplicitSourceTerm(2.) but you don't have to. Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Multicomponent diffusion

2013-01-22 Thread Daniel Wheeler
explicit sources, implicit and then coupled and see how the convergence changes for a very simple system. Try 1D to start with. Set something up and then I can help you debug it. Cheers. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.

Re: Multicomponent diffusion

2013-01-22 Thread Daniel Wheeler
nderstand enough about python yet. Will I need to create a new class to > accomplish this? > No. I assume it is just a couple set of PDEs. There are different ways to represent couple equations if FiPy, if you write down the equations we can

Re: Generate documentation html or pdf

2013-01-22 Thread Daniel Wheeler
ile with even less boiler plate, but don't have the details. Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Nonlinear Conservation law in FiPy

2013-01-17 Thread Daniel Wheeler
and I am struggling to find examples. > Why do you need either the ".divergence" or ".grad" methods? I am not sure what you are trying to do. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Heat Conduction

2013-01-14 Thread Daniel Wheeler
; Sure. I'll need some more details to help though. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: setValue in parallel

2013-01-11 Thread Daniel Wheeler
Grids don't work at all in parallel. They should really take a serial comm by default. > > Finally, in all cases, the solution to the diffusion equation solved for > in solve.py appears to be incorrect when run in parallel. > It should be correct now, but let me know if it isn&#

Re: Geometries & FiPy

2013-01-11 Thread Daniel Wheeler
On Fri, Jan 11, 2013 at 10:23 AM, Fausto Arinos de A. Barbuto < fausto_barb...@yahoo.ca> wrote: > > Daniel, > > It worked beautifully, thanks! > Excellent. Good luck with it all. -- Daniel Wheeler ___ fipy mailing li

Re: Geometries & FiPy

2013-01-10 Thread Daniel Wheeler
m Step1 = (X < 2) & (Y == 1) Step2 = mesh.facesTop Midface = (X == 2) & (Y > 1) from fipy import numerix print numerix.sum(Midface) print numerix.sum(Step1) print numerix.sum(Step2) Seems like the correct number of faces. Cheers, -- Daniel Wheeler ___

Re: setValue in parallel

2013-01-09 Thread Daniel Wheeler
d debug it as well as the command line commands you used to run the script. Maybe also the results from $ python -c "import fipy; fipy.test()" and $ mpirun -np 2 python -c "import fipy; fipy.test()" Thanks! -- Daniel Wheeler ___

Re: Concentration dependent diffusion in 1D

2013-01-08 Thread Daniel Wheeler
w about "a" or "b". In [16]: print d 4.0 In [17]: a.setValue(4) In [18]: print d 4.0 In [19]: print c 8.0 Hope the above helps sort it our for you. In your case you don't need to explicitly instantiate "D", it can be created via the result of a calculati

Re: Concentration dependent diffusion in 1D

2013-01-07 Thread Daniel Wheeler
s like a good idea. Thanks. We probably need a better solution to piecewise dependency than the solution that I provided due to the inherent inefficiencies with the "<" and "*" method. Not sure what that would be though. Cheers -- Daniel Wheeler ___

Re: Concentration dependent diffusion in 1D

2013-01-07 Thread Daniel Wheeler
ot handle the arrays obtained from CellVariables command. What >> would be the right way to do this? >> >> Thanks! >> >> -- >> Salomon Turgman Cohen >> Postdoctoral Associate >> Cornell University >> (919) 341-9650 >> > > > > -- > Salomon Turgman Cohen > Postdoctoral Associa

Re: Concentration dependent diffusion in 1D

2013-01-07 Thread Daniel Wheeler
ssing from CellVariable and using "numpy.where" or fancy indexing to create masks, rather than using the "*" operators. This would require some more knowledge of the FiPy internals,. Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Fipy for coupled heat and mass transport across multilayers

2013-01-04 Thread Daniel Wheeler
ng the simulation, so no Lagrangian style boundary conditions. However, internal moving boundary conditions can often be implemented with an Eulerian approach. Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ N

Re: Specifying initial values on Grid2D mesh

2013-01-03 Thread Daniel Wheeler
On Wed, Jan 2, 2013 at 4:00 PM, Stefan Schwarzer wrote: > Hi Daniel, > > On 2013-01-02 16:17, Daniel Wheeler wrote: > > On Mon, Dec 31, 2012 at 10:04 AM, Stefan Schwarzer > .net> wrote: > >> RuntimeWarning: invalid value encountered in double_scalars if &g

Re:

2013-01-03 Thread Daniel Wheeler
on -c "import fipy; fipy.test()" > > I get a bunch of stuff and then finally: > > Ran 352 tests in 57.904s > > OK > Good. All seems to be working > > And I get failures in polyxtal and polyxtalcoupled: > Don't worry about these. I think thi

Re: Runtime error

2013-01-03 Thread Daniel Wheeler
el()) > File "C:\Program > Files\Python\lib\site-packages\fipy\matrices\pysparseMatrix.py", line 246 > , in addAt > self.matrix.update_add_at(vector, id1, id2) > TypeError: array cannot be safely cast to required type > Maybe a difference i

Re:

2013-01-02 Thread Daniel Wheeler
mmand tool rather than using ipython? > fipy seems to be working OK when running the 1D diffusion example. > "fipy.test()" has only recently been implemented so that the tests can be run on installed versions of FiPy. Generally we use "python setup.py test" to run the te

Re: Specifying initial values on Grid2D mesh

2013-01-02 Thread Daniel Wheeler
://article.gmane.org/gmane.comp.python.fipy/2803 > > Is this the answer to my question? This just assigns random values independent of location. It is also concerned with interpolating between grids that are not necessarily aligned. Good luck. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Trouble encoding terms with higher-order derivatives

2012-12-13 Thread Daniel Wheeler
work and that will give us specifics to work with. You might want to use the ipython notebook to implement it and then you can put the TeX for the equation you are trying to solve above each equation and it will be a real help for us to help you debug it. Possibly just implement each equation i

Re: 2D PDE

2012-12-12 Thread Daniel Wheeler
if this is a good candidate problem for a FV solver. > > Thanks for the input. > No problem. Hope it works out. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: 2D PDE

2012-12-11 Thread Daniel Wheeler
t; seconds of running the code, very little happens. Then the top left and >> lower right portions of the grid develop non-zero values and the solution >> diverges. >> >> I'm quite sure that I'm expressing this problem in the right

Re: PDE of vector variable

2012-12-10 Thread Daniel Wheeler
hat we have the sub parts working. I'll file a ticket and hopefully do something on this for the next release. Sorry about that. -- Daniel Wheeler <>___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Anisotropy Behavior in faceGrad.divergence()

2012-12-10 Thread Daniel Wheeler
urvature. > > > My question is how this anisotropy effect can be eliminated? As I am > studying the effect of anisotropy at this moment, my results suffer from > this error anisotropy. > You can never completely eliminate it. If you only have first order accuracy right now, then

Re: Spatially varying 2D source in fipy 3

2012-12-07 Thread Daniel Wheeler
ll volume average and using that as the source. This may give a much better result on a coarse grid. Use \frac{\int I dV}{\int dV} as the source rather than simply I. Just a suggestion, not entirely sure that this is the issue. -- Daniel Wheeler <>_

Re: solving navier-stokes equation in semicircle

2012-12-04 Thread Daniel Wheeler
of the standard grid classes and then use source terms to blank out exterior cells. Seems much easier to me at least to get something working. Worry about optimizing it later. Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.n

Re: Will FiPy objects misbehave if not in the __main__ namespace?

2012-12-04 Thread Daniel Wheeler
quot;) then "var.old = var". Now, the TransientTerm simply uses "(var - var.old) / dt". If there are no sweeps then an old value is not required as "var" is implicit. However, if your problem does have sweeps then you require an old value otherwise "var.old"

Re: Integrating field

2012-11-30 Thread Daniel Wheeler
data points happen to be aligned). phi = fp.CellVariable(mesh=mesh) phi[:] = scipy.interpolate.NearestNDInterpolator(points, values)((mesh.x, mesh.y)) Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [

Re: 1D-FPE - Using FiPy

2012-11-26 Thread Daniel Wheeler
et a solution with a constant diffusion coefficient and then change its dependence on x gradually. So that it doesn't go to zero, but just to something small. It might give you a clue. Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov h

Re: Unable to Unpickle PeriodicGrid2D Dump File

2012-11-16 Thread Daniel Wheeler
Sorry, that got mangled. See attached file. You only need the changes in `fipy/meshes/periodicGrid2D.py`. Cheers On Fri, Nov 16, 2012 at 11:59 AM, Daniel Wheeler wrote: > On Thu, Nov 15, 2012 at 1:17 PM, dely wrote: >> FiPy, >> >> I am unable to read pickled dump files fr

Re: Unable to Unpickle PeriodicGrid2D Dump File

2012-11-16 Thread Daniel Wheeler
self._orderedCellVertexIDs_data = super(_BasePeriodicGrid2D, self)._orderedCellVertexIDs self._nonPeriodicCellFaceIDs = numerix.array(super(_BasePeriodicGrid2D, self).cellFaceIDs) Good luck! -- Daniel Wheeler ___ fipy mailing list fipy@nis

Re: Problems with phase.binaryCoupled example

2012-11-14 Thread Daniel Wheeler
if > so, is there an easy way to do that? No need. People get into trouble when they have an older version installed, but have unpacked a newer version and then run from within the unpacked directory (without installing it) or have packages on multiple paths. Just don't do that and you should

Re: Time dependent anisotropic diffusion

2012-11-14 Thread Daniel Wheeler
gt;> np.array([[1, 1, 1] , [0]], 'd') for example and we are mostly constrained by Numpy casting although in some places FiPy does its own inferences about what is intended. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Time dependent anisotropic diffusion

2012-11-13 Thread Daniel Wheeler
mmenting out line 18 onwards removes the time > dependence from the problem and hence eliminates the error. > > Thanks, > Altan > > ___ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nis

Re: using constrain

2012-11-09 Thread Daniel Wheeler
observing that, c goes to zero everywhere! > > On Thu, Nov 8, 2012 at 5:02 PM, Daniel Wheeler > wrote: >> >> >> >> On Wed, Nov 7, 2012 at 1:43 PM, Julien Derr wrote: >>> >>> Hi everyone, >>> >>> >>> I am using

Re: using constrain

2012-11-08 Thread Daniel Wheeler
rain" returned a reference to the actual constraint rather than using the "faceConstraints" attribute to get the reference, but at least for now it works as described above. Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov h

Re: How define the convection term of Richards equation

2012-11-01 Thread Daniel Wheeler
ith an extra source. Did you give that a go? -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: How define the convection term of Richards equation

2012-10-22 Thread Daniel Wheeler
of the equation to be $\left( K \right)_z = K' h_z = \left( K' h \right)_z - h K'' h_z$ Also you might want to construct a problem where C is just a constant to start with just so that you can test the convection and diffusion without worrying about the issues with C(h). A

Re: lsmlib wrapper failure on Redhat

2012-10-02 Thread Daniel Wheeler
ximport just to change things up a bit. It could give you some insight into the cimport errror. * Use my latest reincarnation of Pylsmlib <https://github.com/wd15/LSMLIB/tree/fipy/pylsmlib>. This is still under construction, but it will give you some ideas. I'm using setup.

Re: lsmlib wrapper failure on Redhat

2012-10-01 Thread Daniel Wheeler
On Mon, Oct 1, 2012 at 5:14 PM, Daniel Wheeler wrote: > On Mon, Oct 1, 2012 at 5:04 PM, wang yunbo wrote: >> Here are the entire traceback when I attempted to import pylsmlib. >> >> Thank you. >> >> Yunbo >> >> Python 2.7.2 (default, Nov 29 2011, 14:

Re: [FiPy question]: Regarding a spatially varying permittivity profile in solving Poisson's equation

2012-10-01 Thread Daniel Wheeler
On Mon, Oct 1, 2012 at 6:04 AM, Guru Venkat wrote: > Hi all, > > I am a newbie to FiPy and am finding it to be very interesting. Thanks for your interest in FiPy! -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist

Re: [FiPy question]: Regarding a spatially varying permittivity profile in solving Poisson's equation

2012-10-01 Thread Daniel Wheeler
ttivity is making a > change to the equation. I thought the script was throwing an error or is this a different script from the one that throws the error? -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: A comment and question regarding the convection-with-source example

2012-10-01 Thread Daniel Wheeler
or each part as much as > possible. To be safe, include small transient terms or diffusion terms. The problem is with upwinding correctly. When the only terms in the equation are a convection and a source term, it is quite hard to know which direction to choose for upwinding. I think this is the is

Re: A comment and question regarding the convection-with-source example

2012-09-27 Thread Daniel Wheeler
the equation is first order, why is a boundary condition at x=L > required? I tried taking the condition at x=L out and the code still > works, but perhaps there is a default Neumann condition implemented > anyway? Obviously, it depends on the direction

Re: lsmlib wrapper failure on Redhat

2012-09-27 Thread Daniel Wheeler
from libc.stdlib cimport malloc, free def my_arr(): cdef double *my_array = malloc(10 * sizeof(double)) my_array[0] = 1. print my_array[0] free(my_array) and run it with this arrpy.py: import pyximport pyximport.install() from arr import my_arr my_arr() run

Re: 1D Linear PDE

2012-09-27 Thread Daniel Wheeler
)) > > eqn = eqn1 & eqn2 > > phi.setValue(-x*exp(-x**2/2.)) #ansatz satisfies BCs > psi.setValue(exp(-x**2/2.)) #ansatz satisfies BCs > > vi = Viewer(vars=(psi,phi),datamin=-1,datamax=2) > > for i in range(25): > # move forward in time by one time step

Re: 1D Linear PDE

2012-09-20 Thread Daniel Wheeler
- ImplicitSourceTerm(coeff = x, var=numerical)) Cheers -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: lsmlib wrapper failure on Redhat

2012-09-20 Thread Daniel Wheeler
uot; file? Why is it looking for computeDistanceFunction2d.pxd? Clearly that is not what the syntax means. Is this a really old version of Cython, which doesn't have the "from ... cimport" syntax or something weird like that? -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Buckley Leverett equation

2012-09-17 Thread Daniel Wheeler
n term. We might as well have used the sw.faceValue as the > coefficient of the the convection term, which works but I don't like its > result. Great. Thanks for getting back with your experience. I'm glad that it all seems to be working. Cheers. -- Daniel Wheeler

Re: Buckley Leverett equation

2012-09-14 Thread Daniel Wheeler
in([0], mesh.facesRight) > > steps = 500 > viewer = Viewer(vars = sw) > for step in range(steps): > sw.updateOld() > swres = 1.0e6 > while swres > 1e-6: > swres = eq.sweep(dt = dt, var = sw) > print(swres) > viewer.plot() &

Re: restrictions on nonlinear differential terms

2012-08-31 Thread Daniel Wheeler
should prevent zero diagonal, but then other terms are contributing. Make the change with the convection term and see if you still have the same error. I suspect it might deal with this issue otherwise I'll need the entire script to debug. > > I note either way I try to do it, I still

Re: trilinos issue

2012-08-28 Thread Daniel Wheeler
On Tue, Aug 28, 2012 at 11:00 AM, Benny Malengier wrote: > > > 2012/8/28 Daniel Wheeler > >> >> >> On Tue, Aug 28, 2012 at 8:08 AM, Benny Malengier < >> benny.maleng...@gmail.com> wrote: >> >>> Hi, >>> >>> Installed

Re: trilinos issue

2012-08-28 Thread Daniel Wheeler
et to the import eventually. Actually, try importing Eperta and make a communicator. >>> from PyTrilinos import Epetra >>> Epetra.PyComm() Does that break? -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms

Re: TypeError: array cannot be safely cast to required type

2012-08-22 Thread Daniel Wheeler
e solver. I think the fipy.test('--scipy') syntax doesn't quite work as intended. Anyway, try this. $ set FIPY_SOLVERS=scipy $ python >>> import fipy >>> fipy.test() That should rid you of the matrix populating

<    1   2   3   4   5   6   7   8   9   10   >