Questions tagged [fipy]

FiPy: A Finite Volume PDE Solver Using Python. FiPy is an object oriented, partial differential equation (PDE) solver, written in Python, based on a standard finite volume (FV) approach.

FiPy: A Finite Volume PDE Solver Using Python. FiPy is an object oriented, partial differential equation (PDE) solver, written in Python, based on a standard finite volume (FV) approach.

The framework has been developed in the Materials Science and Engineering Division (MSED) and Center for Theoretical and Computational Materials Science (CTCMS), in the Material Measurement Laboratory (MML) at the National Institute of Standards and Technology (NIST).

The solution of coupled sets of PDEs is ubiquitous to the numerical simulation of science problems. Numerous PDE solvers exist, using a variety of languages and numerical approaches. Many are proprietary, expensive and difficult to customize. As a result, scientists spend considerable resources repeatedly developing limited tools for specific problems.

Our approach, combining the FV method and Python, provides a tool that is extensible, powerful and freely available. A significant advantage to Python is the existing suite of tools for array calculations, sparse matrices and data rendering.

The FiPy framework includes terms for transient diffusion, convection and standard sources, enabling the solution of arbitrary combinations of coupled elliptic, hyperbolic and parabolic PDEs.

Currently implemented models include phase field [BoettingerReview:2002] [ChenReview:2002] [McFaddenReview:2002] treatments of polycrystalline, dendritic, and electrochemical phase transformations as well as a level set treatment of the electrodeposition process [NIST:damascene:2001].

Source:http://www.ctcms.nist.gov/fipy/index.html

216 questions
1
vote
1 answer

store old values FiPy

I'm trying to solve some differential equations using FiPy in Python and as a newbie, I still have some problems. What I do is the following: I define a cell variable, I solve an equation for this variable and I update it. I want to store its…
Gal_
  • 11
  • 3
1
vote
1 answer

FiPy: spatially varying coefficient outside of gradient?

This may be a simple question but what is the correct FiPy syntax to use if I want to solve PDE with spatially varying coefficient that is outside of gradient? All the examples I've seen so far only talk about coefficient inside of the gradient. For…
equel
  • 11
  • 1
1
vote
1 answer

fipy - level set 1D

I am trying to run the code below for a level set 1D problem (example in fipy webpage). I am getting this error: Traceback (most recent call last): File "C:/Users/sgowda/Documents/pde solver code/level set 1D.py", line 20, in …
1
vote
1 answer

fipy viewer not plotting

from fipy import * nx = 50 dx = 1. mesh = Grid1D(nx=nx, dx=dx) phi = CellVariable(name="solution variable", mesh=mesh, value=0.) D = 1. valueLeft = 1 valueRight = 0 phi.constrain(valueRight,…
sankethrg
  • 23
  • 2
1
vote
3 answers

Where is the FiPy "base directory"?

I have recently installed the FiPy package onto my Macbook, with all the dependencies, through MacPorts. I have no troubles calling FiPy and NumPy as packages in Python. Now that I have it working I want to go through the examples. However, I…
wgwz
  • 2,642
  • 2
  • 23
  • 35
1
vote
1 answer

NumPy: TypeError: reshape() got an unexpected keyword argument 'order'

I get the following error while reshaping a numpy ndarray DeprecationWarning: :func:`reshape` is deprecated, use :func:`numerix.reshape()` instead! return reshape(newshape, order=order) Traceback (most recent call last): File…
gora
  • 381
  • 3
  • 6
  • 15
1
vote
0 answers

UserWarning: Module fipy was already imported

I get the following error when I try to import fipy from the python prompt. >>>import fipy /home/jana/Builds/lib/python2.6/site-packages/fipy/__init__.py:34: UserWarning: Module fipy was already imported from…
gora
  • 381
  • 3
  • 6
  • 15
0
votes
1 answer

How can i offset the Fipy mesh?

i'm solving some PDE's using Fipy and it would be really handy to translate the mesh so it doesn't start at 0 instead of modifying all my equations. This is important since my convection term is dependent on x. Example of my focker-planvk…
alxg
  • 368
  • 1
  • 4
  • 15
0
votes
1 answer

Python Fipy explicit terms with derivatives and variable diffusion constant

I am trying to solve four coupled PDEs (two scalar density fields and one vector field- but I solve it component wise). where the second term in first equation is given by Now, in the Fipy code (the \rho and the vector components are denoted as by…
Deb S. B.
  • 78
  • 8
0
votes
0 answers

Inaccuracy when applying internal fixed gradient: evident leakage through zero-flux boundaries

I implemented zero-flux internal boundary condition in 2d space using the official method, i.e., through the use of an implicit source term (https://www.ctcms.nist.gov/fipy/documentation/USAGE.html#internal-fixed-value). In the simple diffusion…
neither-nor
  • 1,245
  • 2
  • 17
  • 30
0
votes
0 answers

Using FiPy for internal heat flux boundary conditions

I need some help with setting boundary conditions for a material simulation, which is thermally degrading. The following aspects are of main concern to me at this stage: Mesh motion or deformation is substituted by some kind of loose level set…
ATG12
  • 3
  • 2
0
votes
2 answers

How to simulate a heat diffusion on a rectangular ring with FiPy?

I am new to solving a PDE and experimenting with a heat diffusion on a copper body of a rectangular ring shape using FiPy. And this is a plot of simulation result at some times. I am using the Grid2D() for a mesh and the CellVariable.constrain() to…
relent95
  • 3,703
  • 1
  • 14
  • 17
0
votes
0 answers

"iteration over a 0-d array" error in multiprocessing when applying zip function

Dear programmers: We tried to solve a non-linear coupled Poisson drift-diffusion PDE in Fipy, which implemented well. But, considering the amount of processing(which takes less than a month) we tried to solve the equations in parallel via…
0
votes
1 answer

What is the best way to install fipy with anaconda?

What is the best way to install fipy with anaconda3 (in a ubuntu 16.04 machine)? I have tried conda create --name FIPY --channel conda-forge python=3 fipy numpy scipy matplotlib pysparse gmsh but the results in a lot of conflicts like…
Deb S. B.
  • 78
  • 8
0
votes
1 answer

Representing "zero-order" saturable sinks in FiPy efficiently and without negative concentration

I'm trying to use FiPy to solve for the transient behaviour of a simple 2D particle diffusion scenario with a small circular sink (particle concentration = n). I would like the sink to be saturable, i.e., there should be a maximum possible loss rate…