Re: nonlinear transient coefficient

2020-05-26 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
might be coming in the near future. Thanks for your answer and for developing FiPy! Best, Iñaki From: fipy-boun...@nist.gov<mailto:fipy-boun...@nist.gov> mailto:fipy-boun...@nist.gov>> On Behalf Of Guyer, Jonathan E. Dr. (Fed) via fipy Sent: lauantai 23. toukokuuta 2020 19.08 To: FIPY ma

Re: nonlinear transient coefficient

2020-05-23 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
You might try dividing through by S(h) and applying the chain rule: (1/S(h)) d/dx(T(h) dh/dx) = d/dx((T(h) / S(h)) dh/dx) + (T(h) / S(h)^2) dh/dx . dS(h)/dx The second term on the RHS still doesn’t have very efficient representation in FiPy, either, but it’s at least not limited to first order

Re: Setting up boundary conditions

2020-03-31 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Setting mu_p_1, mu_n_1, Dp_1, and Dn_1 to zero at the faces of the insulating cells should prevent any flux of charge into those cells. Those coefficients should be set as FaceVariables and assigned to coeff= in the Terms, rather than multiplying outside the Term. > On Mar 30, 2020, at 3:20

Re: Axes scales for 2D mesh

2020-03-23 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Welcome to FiPy, Davide. The Matplotlib viewers accept a `figaspect` argument, so in your case, you would write: viewer = Matplotlib2DViewer(vars=(phi,), figaspect=1.) On Mar 23, 2020, at 12:26 PM, Davide Cretti mailto:davide.cre...@gmail.com>> wrote: Dear developers, I am new to fipy

Re: Help with FiPy

2020-03-13 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
sposal for further information. Best regards Le ven. 13 mars 2020 à 14:56, Guyer, Jonathan E. Dr. (Fed) via fipy mailto:fipy@nist.gov>> a écrit : You're going to have to give us more to work with. What have you tried? Where are you stuck? On Mar 11, 2020, at 11:23 AM, Abderre

Re: Help with FiPy

2020-03-13 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
You're going to have to give us more to work with. What have you tried? Where are you stuck? On Mar 11, 2020, at 11:23 AM, Abderrezak BOUZIANE mailto:a.bouziane@gmail.com>> wrote: Hi Everyone, I want to use FiPy to solve Darcy's flow equation, can you give me some support to speed me up

Re: Charge dynamics and Neumann boundary conditions

2020-03-10 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
n > > > > > > >> On Feb 25, 2020, at 10:32 PM, Guyer, Jonathan E. Dr. (Fed) via fipy >> wrote: >> >> Sorry. I never said what the few things were. >> >> FiPy has no-flux boundary conditions by default. It's a characteristic of >>

Re: Implementation of Dirichlet Boundary Condition

2020-03-10 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
side between phi_W and phi(X=0)? The value of phi is >> known at this position, because it is the boundary condition. >> >> Warm regards, >> Alex >> Am 06.03.20 um 21:30 schrieb Guyer, Jonathan E. Dr. (Fed) via fipy: >>> My guess is that you got the sign of the outw

Re: Implementation of Dirichlet Boundary Condition

2020-03-06 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
My guess is that you got the sign of the outward-facing normal wrong somewhere. I posted my derivation to https://gist.github.com/guyer/3b77bbf32d90ef314754f0d76a7e04cc. On Mar 6, 2020, at 4:09 AM, Alexander Tismer mailto:alexander.tis...@ihs.uni-stuttgart.de>> wrote: Dear Users, my

Re: Charge dynamics and Neumann boundary conditions

2020-02-25 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
is still block diagonal, so I don't really understand why this gives a singular matrix, but initializing \rho to something other than zero seems to solve that problem. Unfortunately, as I said before, it still diverges. - Jon > On Feb 25, 2020, at 10:04 AM, Guyer, Jonathan E. Dr. (Fed) via f

Re: Charge dynamics and Neumann boundary conditions

2020-02-25 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Yuranan - There are a few things going on here. I've modified your notebook and posted it at https://github.com/guyer/sharing-github/blob/master/ion-transport-diagnosis.ipynb. The singular matrix has gone away, but the solution diverges. In general, I find the drift-diffusion equations pretty

Re: More on VTK objects and mesh plotting with 3rd party packaages

2020-02-24 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> On Feb 23, 2020, at 8:43 AM, A A wrote: > > Uncommenting line 7 of the above code reveals that resetting the cell type > from 41 to 7 of the UniformGrid2D's underlying tvtk object allows the mesh to > appear in the plotter. > > I recall from previous discussions that failure of cell

Re: More on VTK objects and mesh plotting with 3rd party packaages

2020-02-24 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
AbstractMesh is abstract. It makes no assumptions about geometry, topology, or dimensionality. Forcing it to render as VTK_POLYGON, an intrinsically 2D object, is not appropriate. > On Feb 23, 2020, at 8:43 AM, A A wrote: > > Dear All, > > This question is loosely related to >

Re: ANN: FiPy 3.4

2020-02-06 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
o > single-thread PetSc)! Wouldn't it be nice if Pysparse worked with Py3k? > Meanwhile, I'll keep a Python 2.7+pysparse environment around somewhere in > the lab... > > > > > > > On 29/01/2020 15:01, Guyer, Jonathan E. Dr. (Fed) via fipy wrote: >> Some notes

Re: ANN: FiPy 3.4

2020-01-29 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
. Serial SciPy lags them all. See https://www.ctcms.nist.gov/fipy/documentation/USAGE.html#solving-in-parallel for discussion. Until we can sort this out, we won't be (willingly) dropping support for Python 2. > On Jan 29, 2020, at 8:51 AM, Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: &

ANN: FiPy 3.4

2020-01-29 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
We are pleased to announce the release of FiPy 3.4. http://www.ctcms.nist.gov/fipy This release adds support for the PETSc solvers for solving in parallel. Pulls - - Add support for PETSc solvers (#701) - Assorted fixes while supporting PETSc (#700) - Fix print statements for Py3k -

Re: Some questions on the viewer

2020-01-23 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
. From: A A Sent: Thursday, January 23, 2020 6:10 AM To: Guyer, Jonathan E. Dr. (Fed); FIPY Subject: Re: Some questions on the viewer Hi Jon, It looks like pyvista does support VTK_CONVEX_POINT_SET. Please take a look at the discussion I started on https://github.com/pyvista

viewing cylindrical grids [was Re: Some questions on the viewer]

2020-01-22 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
I've added comments to your https://github.com/usnistgov/fipy/issues/693, but the short answer is that FiPy's not exporting a VTK cell type that pyvista understands. FiPy should put out VTK_PIXELs or VTK_QUADs in this case. > On Jan 22, 2020, at 6:22 AM, A A wrote: > > On another note, I've

nth-order diffusion [was Re: Some questions on the viewer]

2020-01-22 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Amine - The n is effectively a power, or how many times the operator $\nabla\cdot\Gamma\nabla$ should be applied. The index i runs from 1..n to denote that each operator gets its own coefficient. If n=1, then apply the operator $\nabla\cdot\Gamma_1\nabla$ to the argument $\phi$ and you get

Re: Some questions on the viewer

2020-01-22 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
d, Jan 22, 2020 at 12:22 PM > Subject: Re: Some questions on the viewer > To: Guyer, Jonathan E. Dr. (Fed) , > > > Hi Jonathan, > > The lines do remain dashed on successive calls. I guess the viewer keeps > pointing to the right objects even if their propertie

Re: Some questions on the viewer

2020-01-21 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
I'm curious. Do the lines remain dashed on successive calls to plot()? As to the third question, where are you seeing exponent n and subscript i? I'm not suggesting we don't use them, just that I don't know where. Is the discussion at

Re: Problem in dump.write for vector variables

2020-01-14 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
I filed https://github.com/usnistgov/fipy/issues/691 to address this > On Jan 9, 2020, at 8:34 AM, Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: > > Thank you for the feedback. I'm inclined to agree. > > - Jon > >> On Jan 9, 2020, at 3:47 AM, Marcel UJI (IMAP)

Re: Problem in dump.write for vector variables

2020-01-09 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
her processing. Actually this is not much an issue, as I can > simply save phi and later recompute phi.faceGrad, which is also much more > economic in terms of storage. > > Thank you anyway for spending some time on this > > Marcel > > > > El 20/12/19 a les 16:27, Guyer, Jonat

Re: Problem in dump.write for vector variables

2019-12-20 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Glad you found a solution, Marcel. The issue is that a FaceGradVariable doesn't pickle itself properly. It stores the state for a generic FaceVariable, but then it doesn't know how to rebuild itself from that. It either should - pickle the correct information, which would also involve

Re: Need help to set up the model

2019-12-02 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
t getting any value higher than 200 but when I use > the actual Ux and Uy component of velocities, it gives me unrealistic values. > Could you please help me to fix this. > > Attached are my code and one nc file that contains mesh node and element > information, temperature, and velocity componen

Re: Need help to set up the model

2019-11-22 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Mohammad - Welcome to FiPy. It's not a problem to mix triangles and quadrilaterals. FiPy is designed for this. The complication is that FiPy constructs cells from faces and faces are defined by vertices (nodes), so we need to reconstruct the face definitions from your cell_node_id. Cribbing

Re: Problems using Grid2D

2019-09-30 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> > Nz, Ny, and Nx are the number of cells in the z, y, and x direction > respectively. > > Best wishes, > Martin > > > > On 27/09/2019 20:03, Guyer, Jonathan E. Dr. (Fed) via fipy wrote: >>> On Sep 26, 2019, at 7:29 PM, Justin Pothoof wrote: >>> >>

Re: Problems using Grid2D

2019-09-27 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> On Sep 26, 2019, at 7:29 PM, Justin Pothoof wrote: > > I noticed that if i print(shape(CellVariable.value)) after defining a > CellVariable I get the output (2000,) for example.. which isn't a 2D array. FiPy is designed for unstructured meshes, so there is no internal structure to the

Re: Problems using Grid2D

2019-09-27 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
dx needs to be a float: `dx = 1.` This doesn't always seem to be true, but it is often enough that we should figure out how to fix it or raise an error. https://github.com/usnistgov/fipy/issues/672 > On Sep 26, 2019, at 7:29 PM, Justin Pothoof wrote: > > Hello, > > I'm trying to set up a 2D

Re: Boundary condition problem

2019-08-15 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
ial > potential.constrain(0., where=mesh.exteriorFaces) > > ### Solve Equations ### > eq = Pion.equation & Nion.equation & potential.equation > > steps = 1000 > timestep = 0.5 > for step in range(steps): > eq.solve(dt=timestep ) > if (step%1000)==0: > view

Re: Boundary condition problem

2019-08-13 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
eGrad, var=P_variable) instead of DiffusionTerm(coeff=P_variable, var=V_variable) Generally, though, I hate the drift-diffusion equations and find them challenging to solve. From: Fangyuan Jiang Sent: Tuesday, August 13, 2019 1:11 PM To: Guyer, Jonathan E. Dr. (

Re: Boundary condition problem

2019-08-13 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Jiang - FiPy is no-flux by default, so if you apply no constraints, P should not flow out. By constraining P to be zero on the exteriorFaces, you guarantee that there will be a flux in our out of the external boundary. - Jon From: fipy-boun...@nist.gov

Re: Drift Diffusion Equation Setup

2019-08-13 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
not be be used together. From: Justin Pothoof Sent: Friday, August 9, 2019 8:24 PM To: Guyer, Jonathan E. Dr. (Fed); FIPY Subject: Re: Drift Diffusion Equation Setup When taking the divergence of current density: divergence.(-mu_p * grad.potential(x,t

Re: Drift Diffusion Equation Setup

2019-08-09 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
19 2:51 PM To: Guyer, Jonathan E. Dr. (Fed); FIPY Subject: Re: Drift Diffusion Equation Setup Hi Jon, I've been continuing to work on my problem. I've implemented the divergence of the current density mathematically into the positive charge and negative charge density equations. Now, I'm encounte

Re: Is faceGrad at boundaries assumed zero by default, or only its component normal to the boundary?

2019-08-08 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
No need to apologize. I'm glad you were able to find the information you were looking for. As [noted here](https://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.mesh1D.html?highlight=gradient) the normal component of the boundary gradients are zero by default. You can

Re: Drift Diffusion Equation Setup

2019-07-26 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
teful for your help! > Justin > > On Thu, Jul 25, 2019 at 10:55 AM Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: > Justin - > > I would define a function that takes an argument x for each of your > analytical expressions, e.g., > > ``` > def y01(

Re: Drift Diffusion Equation Setup

2019-07-25 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
initial positive/negative charge density curves > described by a specific equation I'll show in a file. > > Thanks for the help! > Justin > > On Wed, Jul 24, 2019 at 6:06 AM Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: > Justin - > > What that error means is tha

Re: Drift Diffusion Equation Setup

2019-07-24 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Justin - What that error means is that if you write 'var=' for any Term, then you must write 'var=' for every Term. In your equations: ``` Pion.equation = TransientTerm() + k_rec * Pion * Nion + ConvectionTerm(coeff=1 / q, var=Jp) == 0 Nion.equation = TransientTerm() + k_rec * Pion * Nion +

ANN: FiPy 3.3

2019-07-01 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
We are pleased to announce the release of FiPy 3.3. http://www.ctcms.nist.gov/fipy This release brings support for Python 2 and Python 3 from the same source, without any 2to3 translation. Thanks to @pya and @woodscn for getting things started. This transition secures FiPy for the scheduled

Re: ternary electrolyte

2019-06-17 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
ary system where both non-depositing ions have zero flux. > > Regarding the environment, I’m using python 3.7, fipy 3.2 converted using > 2to3, and numpy 1.6.3. I apologize that this is taking up a lot of your time. > > ☘ > > >> On Jun 14, 2019, at 3:39 PM, Guyer,

Re: ternary electrolyte

2019-06-14 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
t; sulfuric acid. In this case the three species might be copper, protons, and > sulfate ions. > > ☘ > >> On Jun 14, 2019, at 11:26 AM, Guyer, Jonathan E. Dr. (Fed) via fipy >> wrote: >> >> Phi = 0 is a solution. Are you suggesting that this set of equations has

Re: ternary electrolyte

2019-06-14 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
the problem is well defined. > I’ll be happy to share those calculations if needed. I’m using this problem > as an example to learn more about fipy. > >> On Jun 14, 2019, at 9:10 AM, Guyer, Jonathan E. Dr. (Fed) via fipy >> wrote: >> >> I had the same initial thou

Re: ternary electrolyte

2019-06-12 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Scott - Eq2 appears to have a typo: -Eq2 = DiffusionTerm(coeff=z2*C1, var=Phi) + DiffusionTerm(coeff=1.0, var=C2) +Eq2 = DiffusionTerm(coeff=z2*C2, var=Phi) + DiffusionTerm(coeff=1.0, var=C2) Eq3 has (much) better coupling if written like this: -Eq3 = DiffusionTerm(coeff=z3*C3, var=Phi) +

ANN: FiPy 3.2

2019-04-22 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
We are pleased to announce the release of FiPy 3.2. http://www.ctcms.nist.gov/fipy This is predominantly a DevOps release. The focus has been on making FiPy easier to install with conda. It's also possible to install a minimal set of prerequisites with pip. Further, FiPy is automatically

Re: 1D diffusion problem

2019-04-22 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Also, the natural boundary condition for FiPy is no-flux, so there's no need to do T_var.faceGrad.constrain(0, where=mesh.facesLeft) > On Apr 22, 2019, at 1:28 PM, Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: > > Clara - > > - The cause of everything dropping to zero

Re: 1D diffusion problem

2019-04-22 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Clara - - The cause of everything dropping to zero is that T_var.old is initialized to zero. This isn't a particularly useful initial value, but that's what it is. Usually, T_var.updateOld() is the first thing called in the time step loop, so this initial condition doesn't matter, but because

Re: Question regarding Boundary Condition Implementation

2019-04-22 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
; is the rank of the velocity -1? What does the Face Variable rank indicate? > > Thank you, > Dan > > On Thu, Apr 11, 2019 at 8:14 AM Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: > > > > On Apr 10, 2019, at 4:42 PM, Daniel DeSantis wrote: > > > > 1) S

Re: A very basic question

2019-04-18 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
That's not unsurprising. The scipy solvers are terribly slow *and* the pysparse LU solver is quite fast, but uses a lot of memory. From: fipy-boun...@nist.gov on behalf of Dario Panada Sent: Wednesday, April 17, 2019 12:03 PM To: FIPY Subject: A very

Re: Setting CellVariable values

2019-04-10 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> On Apr 10, 2019, at 11:12 AM, Dario Panada wrote: > > In my case, as I just have only one dimension, using sourceGrid.value[i] or > sourceGrid[...,i] should be equivalent though? Yes ___ fipy mailing list fipy@nist.gov

Re: Setting CellVariable values

2019-04-09 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> On Apr 8, 2019, at 6:38 PM, Dario Panada wrote: > DP: I guess what confuses me here is the [..., i] syntax on the CellVariable > object thought. FiPy is built on NumPy. `...` or Ellipsis means "all the indices except for the one specified". FiPy stores cells in the last index of the

Re: Setting CellVariable values

2019-04-08 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> On Apr 8, 2019, at 4:09 PM, Dario Panada wrote: > > DP: That would be diffusion of solubles from blood vessels (endothelial > cells). Specifically, glucose or oxygen. It wouldn't change significantly be > increasing it to a 40x40x40 grid, you'd just be simulating a larger section > of

Re: Setting CellVariable values

2019-04-08 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> I suppose I could build the entire vector of sources before and then doing a >> single assignment to _array, but again you correctly mentioned >> that relying on that is bad practice. >> >> You mention: >> >> sourceGrid[..., i] = sourceRate >> >> Can

Re: Setting CellVariable values

2019-04-08 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> On Apr 8, 2019, at 11:30 AM, Dario Panada wrote: > I two initial numpy grids (n*n*n) where each value corresponds to a > source/sink. Eg: Given my source grid and coordinates (1,2,3) having value 5, > I want to set such value as a source in FiPy. That wasn't my question. When you publish

Re: Setting CellVariable values

2019-04-08 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Iterating over a mesh with a Python `for` loop is, as you've found, an incredibly inefficient way to do things. FiPy, like numpy it relies on, is intended to be used with vectorized operations. As far as your approach, things that start with `_` in Python are internal implementation details

Re: Setting up 3D Diffusion

2019-04-04 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
> On Apr 3, 2019, at 6:36 PM, Dario Panada wrote: > > Many thanks, I think that is making more sense now. I assume I could also > change D to be expressed in terms of 0.042**(2./3) to keep consistency? (It > would be a bit of a bizarre setup I admit..) If you choose to scale things on a

Re: Setting up 3D Diffusion

2019-04-03 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
sing integer for dx etc. Maybe that's why?) > > Kind Regards, > Dario > > On Wed, Apr 3, 2019 at 8:48 PM Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: > Dario - > > - FiPy's DiffusionTerm is implicit, so there is no Fourier limit on your time > step. > >

Re: Setting up 3D Diffusion

2019-04-03 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Dario - - FiPy's DiffusionTerm is implicit, so there is no Fourier limit on your time step. - There's no particular advantage to scaling length and time to 1 - Be sure to set dx = dy = dz = 1., a float, not dx = dy = dz = 1, an integer - Jon > On Apr 3, 2019, at 11:28 AM, Dario Panada

Re: Using a different Matplotlib backend on a per-script basis

2019-03-13 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
I think option 3 is what you want. Before import fipy or anything else, start your script with ``` import matplotlib matplotlib.use('backend') ``` > On Mar 13, 2019, at 9:43 AM, Christoph Margenfeld > wrote: > > Hello, > > as mentioned in the FiPy FAQ, a different Matplotlib backend has

Re: source term that is a discontinuous function of time

2019-02-01 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
a manual section you can point me to, that would be great. > > (I changed the function to return a floating point number instead of an > integer but it is still > being treated as a constant.) > > Thanks, > > Bill > > On Fri, Feb 1, 2019 at 9:40 AM Guyer, Jonathan

Re: source term that is a discontinuous function of time

2019-02-01 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
`time` is a Variable as FiPy understands it, but stepFunc() simply returns an integer, so eqI is defined with a source that is the integer 0. I'd try eqI = fipy.TransientTerm(coeff=1.) == ((time < 0.1) * 0. + (time >= 0.1) * 1.) > On Feb 1, 2019, at 6:05 AM, Bill Greene wrote: > > I am

FiPy developers unresponsive during federal government shutdown

2018-12-26 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Due to the federal government shutdown, the FiPy developers are unable to access e-mails. We will respond to your questions in a timely manner once funds have been appropriated and the shutdown ends. We apologize for any inconvenience and look forward to assisting you with FiPy once operations

Re: how to apply convection boundary condition in 2D?

2018-12-18 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
ong. Instead, I put comments at the > top of my scripts to document how I was looking at your code and > documentation. > > Thanks > > > On Fri, Dec 14, 2018 at 8:20 PM Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: > Drew - > > I had found the same sign

Re: how to apply convection boundary condition in 2D?

2018-12-14 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
d, and am just going on a hunch. > > It also seemed to me that there might be a minus sign missing in the > RobinCoeff. The solution I get is still pinned at initial condition > regardless of a minus sign or no minus sign there. > > Thanks > > On Fri, Dec 7, 2018 at 6:05

Re: how to apply convection boundary condition in 2D?

2018-12-07 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
ss around a little in IPython seeing if any terms are coming out all zeros. > > Again, I put everything at > https://github.com/cashTangoTangoCash/Convection2DFiPyExample01. > > Thanks > > On Mon, Dec 3, 2018 at 4:21 PM Guyer, Jonathan E. Dr. (Fed) via fipy > wrote: >

Re: semiconductor pn junction, problem with current density

2018-12-06 Thread Guyer, Jonathan E. Dr. (Fed) via fipy
Peter - The semiconductor drift-diffusion equations are notoriously challenging to solve. As you may well be aware, many people use alternative formulations such as pseudo-Fermi-levels and Slotboom variables to mitigate some of the difficulties that arise from the enormous range of

Re: Boussinesq Equations

2018-09-18 Thread Guyer, Jonathan E. Dr. (Fed)
t;>> zVelocity = CellVariable(mesh=mesh, name='Zvelocity', value = 0.) >>>> velocity = FaceVariable(mesh=mesh, name='velocity', rank=1) >>>> # Init Condition >>>> T.setValue(T0) >>>> # Boundary Conditions >>>> T.constrain(Tmax, m

Re: Boussinesq Equations

2018-08-15 Thread Guyer, Jonathan E. Dr. (Fed)
Fabien - I think the code below should get you going. The changes I made were: - `xVelocity` and `zVelocity` changed to rank-0 CellVariables. FiPy *always* solves at cell centers. - Created a rank-1 FaceVariable to hold the velocity. The cell components must be interpolated and manually

Re: Remeshing and code speedup

2018-07-24 Thread Guyer, Jonathan E. Dr. (Fed)
94305 Stanford, CA > _____ > >> On Jul 24, 2018, at 6:11 AM, Guyer, Jonathan E. Dr. (Fed) >> wrote: >> >> FiPy still does not support remeshing. >> >> As Dario said, choice of solver can make a big difference. I've no

Re: FiPy Heat Transfer Solution

2018-07-24 Thread Guyer, Jonathan E. Dr. (Fed)
> On Jul 24, 2018, at 9:12 AM, Daniel Wheeler wrote: > > Jon, is that correct? I honestly don't know ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Re: Remeshing and code speedup

2018-07-24 Thread Guyer, Jonathan E. Dr. (Fed)
FiPy still does not support remeshing. As Dario said, choice of solver can make a big difference. I've not used PyAMG much, but PySparse is dramatically faster than SciPy. PyTrilinos is slower than PySparse, but enables you to solve in parallel. I've also found that 2D problems solve much

Re: FiPy on Linux

2018-07-20 Thread Guyer, Jonathan E. Dr. (Fed)
Augh. This much I can explain: I copied the installation from .travis.yml without thinking about it. `conda create` does not explicitly install fipy because the whole point of that file is to test the current git commit, which is done later in the recipe. Adding `fipy` to the `conda create`

Re: Fresh installation ... fipy.test() and diffusion examples fail

2018-07-20 Thread Guyer, Jonathan E. Dr. (Fed)
Our most current notion of how to install is captured [here](https://github.com/usnistgov/fipy/blob/develop/.travis.yml) In short, on Mac OS: conda create --name --channel guyer --channel conda-forge python=2.7 fipy weave and on linux: conda create --name --channel guyer --channel

Re: Fresh installation ... fipy.test() and diffusion examples fail

2018-07-20 Thread Guyer, Jonathan E. Dr. (Fed)
FiPy should be installed with Python 2.7. We are aware that the documentation doesn't say this right now; getting the installation working smoothly and ensuring that all of the documentation describes the process completely and accurately is a non-trivial task. > On Jul 19, 2018, at 8:02 PM,

Re: how to compute the area of the solid material in examples.phase.anisotropy?

2018-07-19 Thread Guyer, Jonathan E. Dr. (Fed)
`phase.cellVolumeAverage * mesh.cellVolumes.sum()` ought to do it From: fipy-boun...@nist.gov on behalf of Drew Davidson Sent: Thursday, July 19, 2018 11:57:37 AM To: FIPY Subject: how to compute the area of the solid material in

Re: Can Gmsh2D read a 1D gmsh mesh?

2018-07-14 Thread Guyer, Jonathan E. Dr. (Fed)
ve found the mailing list message in (3). > > I did not see how to get the Physical Groups data from the pygmsh mesh into > the FiPy mesh. > > Thanks > > > > On Thu, Jul 12, 2018 at 3:26 PM Guyer, Jonathan E. Dr. (Fed) > wrote: > No, FiPy doesn't pr

Re: Logistic ODE as a source term

2018-06-13 Thread Guyer, Jonathan E. Dr. (Fed)
Hello Derek - Thanks for your question. > So does this imply that the correct way to implement this source term would > be: > > ImplicitSourceTerm(coeff = r_H * C_A * A * (1 - H_bar()/K_H) - delta_H - > delta_D * S) Yes > With H_bar() being a function: > > # Set up the summing of HSCs >

Re: Flux BC Dependent on Potential

2018-06-08 Thread Guyer, Jonathan E. Dr. (Fed)
David - The problem is here: diffCoeff=Variable(value=1.) diffCoeff.constrain(0., mesh.facesLeft) It doesn't mean anything to constrain a Variable at particular faces. A Variable doesn't exist on a mesh; it's just a value. You can either do diffCoeff=CellVariable(mesh=mesh,

Re: Solving nonlinear coupled reaction diffusion equations (reaction networks) in FiPy

2018-04-06 Thread Guyer, Jonathan E. Dr. (Fed)
> On Apr 5, 2018, at 6:02 PM, Alokendra wrote: > > I am not so sure about the reaction > terms which can be coupled nonlinear functions. Do I need to use some > variation of `ImplicitSource` term? Yes, these terms are appropriate for ImplicitSourceTerms, e.g., I would

Re: Units within sweeping a system

2018-03-27 Thread Guyer, Jonathan E. Dr. (Fed)
Units are not as well integrated in FiPy as I would like. The best I can offer is that you declare dimensional parameters and then combine them into dimensionless coefficients before sending them off to the solvers. Not very satisfactory, I'll admin. Even if they did work, you'll find that

Re: Viewer Feature Request / Clarification

2018-03-22 Thread Guyer, Jonathan E. Dr. (Fed)
neering > Materials Research Center 110 > Rensselaer Polytechnic Institute > 110 8th Street > Troy, NY 12180 > lewi...@rpi.edu > 518-276-2297 > > On Tue, 2018-03-20 at 13:21 +, Guyer, Jonathan E. Dr. (Fed) wrote: >> I must confess that this answer makes me sad. F

Re: Viewer Feature Request / Clarification

2018-03-20 Thread Guyer, Jonathan E. Dr. (Fed)
tribution is > very important to open source projects! > > Best, > > -Mike > > On 3/20/18 8:21 AM, Guyer, Jonathan E. Dr. (Fed) wrote: >> I must confess that this answer makes me sad. FiPy is object oriented >> precisely so that you don't need to do this.

Re: Viewer Feature Request / Clarification

2018-03-20 Thread Guyer, Jonathan E. Dr. (Fed)
I must confess that this answer makes me sad. FiPy is object oriented precisely so that you don't need to do this. The intended design is that you subclass Matplotlib1DViewer to override the behavior you want. There are two places you can do this: * In Matplotlib1DViewer.__init__(), around

Re: Using ModularVariable in a mesh generated by gmsh

2018-02-08 Thread Guyer, Jonathan E. Dr. (Fed)
it possible to solve the grain impingement > problem in a circular domain with triangular meshes using FiPy? > Or is there any other way than using gmsh to get FiPy solve the grain > impingement problem in a non-standard geometry? > > > On Wed, Feb 7, 2018 at 2:34 PM, Guyer, Jonathan

Re: Using ModularVariable in a mesh generated by gmsh

2018-02-07 Thread Guyer, Jonathan E. Dr. (Fed)
g quad meshes from gmsh (I suppose this is what you meant by > skew grids), but the same error shows up. So, the problem is that > '_meshSpacing' is not an attribute for 'Gmsh2D' mesh if I define a > ModularVariable on that mesh. > > On Wed, Feb 7, 2018 at 11:49 AM, Guyer, Jona

Re: Using ModularVariable in a mesh generated by gmsh

2018-02-07 Thread Guyer, Jonathan E. Dr. (Fed)
_meshSpacing is only implemented for (square (including skew)) grids and only used by the _ModCellGradVariable. It's apparently been like that since before FiPy was FiPy, 14 years ago. I'll need to think about this more deeply to understand why normalizing by grid spacing even makes sense,

Re: How to declare diffusion function

2018-02-06 Thread Guyer, Jonathan E. Dr. (Fed)
Kevin - You are correct that there's no way to project a FaceVariable back to a CellVariable. Since this is only for the initial condition, I would just explicitly set it, e.g., phi.value = (1 + x) / (gamma * psi.grad[0]) As for the boundary condition, I think FiPy's default no-flux

Re: Gradient in cylindrical coordinates

2018-01-09 Thread Guyer, Jonathan E. Dr. (Fed)
Leyton - A compressible flow example contribution would be most welcome! Please submit a [pull request](https://github.com/usnistgov/fipy/pulls) and we'll work with you to get it integrated and released. [don't hesitate to ask if you need help making the pull request] - Jon > On Jan 5, 2018,

Re: Compute total free energy of a system

2018-01-04 Thread Guyer, Jonathan E. Dr. (Fed)
I believe (...).cellVolumeAverage * mesh.cellVolumes.sum() is what you want. > On Jan 4, 2018, at 10:49 AM, Daniel Wheeler wrote: > > You might want to multiply by the cell volumes, "mesh.cellVolumes". > > On Thu, Jan 4, 2018 at 10:22 AM, Anders Ericsson >

Re: How to represent strange terms in FiPy

2018-01-03 Thread Guyer, Jonathan E. Dr. (Fed)
t; > I apologize if the code is a little difficult to read. > > Thanks, > Kevin > > On 12 December 2017 at 16:37, Guyer, Jonathan E. Dr. (Fed) > <jonathan.gu...@nist.gov> wrote: > Kevin - > > - Should I model the last term in the temperature (T) equa

Re: How to represent strange terms in FiPy

2017-12-12 Thread Guyer, Jonathan E. Dr. (Fed)
Kevin - - Should I model the last term in the temperature (T) equations as a convection term or explicit source term? The best coupling would be obtained by treating this term as a convection term on n with a velocity proportional to \partial T/\partial x. Unfortunately, (D/n) sits outside

Re: fipy python 2.7

2017-11-13 Thread Guyer, Jonathan E. Dr. (Fed)
I've filled [an issue](https://github.com/usnistgov/fipy/issues/530) > On Nov 13, 2017, at 10:04 AM, Guyer, Jonathan E. Dr. (Fed) > <jonathan.gu...@nist.gov> wrote: > > Not noise. We'll amend the instructions to make this clear. > >> On Nov 9, 2017, at 5:25 PM, Jame

Re: 2D anisotropic unstructured mesh and non-classical FV schemes

2017-10-18 Thread Guyer, Jonathan E. Dr. (Fed)
Daniel is much better versed in the nuances of FV schemes than I am, but I did want to question one assertion you made: > On Oct 16, 2017, at 6:16 PM, F Hssn wrote: > > If you wish to use an unstructured Delaunay mesh, it has > to be isotropic (equilateral triangles) or

Re: 2D Periodic Grid in Parallel

2017-09-25 Thread Guyer, Jonathan E. Dr. (Fed)
Jonathan - I see what you're talking about. Fixing (or even working around) has proven elusive so far, but I'm working on it. - Jon > On Sep 20, 2017, at 10:02 AM, Jonathan Smyth wrote: > > Hello, > > I am working on a 2D simulation of the drift-diffusion model for >

Re: FiPy Interest: Question about Diffusion and Convection Terms

2017-09-07 Thread Guyer, Jonathan E. Dr. (Fed)
Nicholas - Please see the end of https://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.mesh1D.html Search for the text "Often, the diffusivity is not only non-uniform, but also depends on the value of the variable" (the Search function built into the web page isn't

Re: PyTrilinos import error Mac OS

2017-08-25 Thread Guyer, Jonathan E. Dr. (Fed)
e --name --channel guyer --channel conda-forge python >> numpy scipy matplotlib mayavi >> source activate >> pip install fipy >> >> There are presently no conda packages of any solver suite but scipy >> available for Windows. >> >> >>>

Re: PyTrilinos import error Mac OS

2017-08-25 Thread Guyer, Jonathan E. Dr. (Fed)
Make that `activate ` on Windows > On Aug 25, 2017, at 12:54 PM, Guyer, Jonathan E. Dr. (Fed) > <jonathan.gu...@nist.gov> wrote: > > OK, multiple things are messed up here and I'm not sure any of them are > related to Apple possibly moving things. > > Things should

Re: PyTrilinos import error Mac OS

2017-08-25 Thread Guyer, Jonathan E. Dr. (Fed)
yer, Jonathan E. Dr. (Fed) > <jonathan.gu...@nist.gov> wrote: > > Apple moved something between 10.11 and 10.12. It looks like my rebuild for > 10.12 from a few weeks ago broke 10.11. I'll have to figure out how to post > both versions (and rebuild the 10.11 version at all). >

Re: PyTrilinos import error Mac OS

2017-08-22 Thread Guyer, Jonathan E. Dr. (Fed)
Apple moved something between 10.11 and 10.12. It looks like my rebuild for 10.12 from a few weeks ago broke 10.11. I'll have to figure out how to post both versions (and rebuild the 10.11 version at all). > On Aug 22, 2017, at 9:58 AM, Seufzer, William J. (LARC-D307) >

Re: Convergence problem while increasing domain size

2017-07-25 Thread Guyer, Jonathan E. Dr. (Fed)
Clara - The mesh needs to be fine enough to resolve the interfaces. How thick is the phase interface for your parameters? Generally, you need O(10) grid points across the interface. - Jon > On Jul 25, 2017, at 1:50 PM, Clara Maurel wrote: > > Hello, > > Sorry in advance

Re: Using FiPy to solve a 1D diffusion problem under a potential profile

2017-07-18 Thread Guyer, Jonathan E. Dr. (Fed)
Other than a change of sign on the ConvectionTerm, I don't see any problem with how you wrote your equation. There's not much to do to debug a seg fault, other than isolate what line of code is causing it. Comment out all the lines in your code and successively add them until the seg fault

  1   2   >