Re: Gradient boundary conditions for spherical shell

2016-07-01 Thread James Pringle
Please ignore -- I just realized I am being a dolt. For those of you who stumble across this thread and would like avoid making the same mistake, I believe that psi.faceGrad.constrain(1.0*mesh.faceNormals,faceMask) constrains the faceGrad to some value, here 1.0*mesh.faceNormals, where faceM

RE: casting implicit Boundary Conditions in FiPy

2016-07-01 Thread Gopalakrishnan, Krishnakumar
Hi Dan, In following up to the discussion we had so far, I have a question about a variant of the special-case boundary condition presented so far. The new (implicit Neumann) boundary condition for the 1D problem is now, d_phi/dx at boundary = alpha + beta*phi at boundary Where, alpha is

Re: Gradient boundary conditions for spherical shell

2016-07-01 Thread James Pringle
Just to be clear -- this problem is on a shell -- there is no radial dependence, and the mesh is two-dimensional. Jamie On Fri, Jul 1, 2016 at 10:35 AM, Pringle, James wrote: > Dear fipy folks -- > > I am solving a problem of ocean circulation on a thin spherical shell; the > domain is too larg

Gradient boundary conditions for spherical shell

2016-07-01 Thread James Pringle
Dear fipy folks -- I am solving a problem of ocean circulation on a thin spherical shell; the domain is too large to ignore the spherical nature of the earth. The problem is of the form eq = (DiffusionTerm(var=Psi,coeff=DiffCoeff)+ ExponentialConvectionTerm(var=Psi,coeff=convCoeff)) And I

Re: determine cell neighbors.

2016-07-01 Thread James Pringle
Thanks -- unfortunately, I have a complex real world mesh with interior points (islands) which must be treated in an iterative fashion, so I need to identify them in the grid. On Fri, Jul 1, 2016 at 9:30 AM, Guyer, Jonathan E. Dr. (Fed) < jonathan.gu...@nist.gov> wrote: > You want `mesh._cellToCe

Re: Can I get the value of cellVariable at a certain cell via coordinate of cellCenter?

2016-07-01 Thread 正义的小偷
Thanks for help. That works very well! 2016年7月1日 21:25,"Guyer, Jonathan E. Dr. (Fed)" 写道: > This is provided by the special `__call__` method of a CellVariable, which > you would invoke with `var([[xval], [yval]])`. > > >>> help(fp.CellVariable.__call__) > > Help on method __call__ in module fipy

Re: determine cell neighbors.

2016-07-01 Thread Guyer, Jonathan E. Dr. (Fed)
You want `mesh._cellToCellIDs`. This isn't a basic question at all. We don't encourage thinking about the discretized mesh and don't make it easy. _cellToCellIDs isn't documented anywhere as far as I can tell. > On Jun 29, 2016, at 4:07 PM, James Pringle wrote: > > I have to find a group of c

Re: Can I get the value of cellVariable at a certain cell via coordinate of cellCenter?

2016-07-01 Thread Guyer, Jonathan E. Dr. (Fed)
This is provided by the special `__call__` method of a CellVariable, which you would invoke with `var([[xval], [yval]])`. >>> help(fp.CellVariable.__call__) Help on method __call__ in module fipy.variables.cellVariable: __call__(self, points=None, order=0, nearestCellIDs=None) unbound fipy.var