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
0
votes
1 answer

Fipy Grid3D 'an index can only have a single ellipsis' error

I am interesting in solving differential equation using fipy. The following code is working correctly when I am using Grid2D. from fipy import * mesh = Grid2D(nx=3, ny=3) #mesh = Grid3D(nx=3, ny=3, nz=3) phi = CellVariable(name='solution variable',…
Mikhail
  • 1
  • 2
0
votes
2 answers

Error while install FiPy "Command "python setup.py egg_info" failed with error code 1"

I'm trying to install FiPy on Python 3.6. and ran into trouble. I followed the installation instruction from the NIST website: https://www.ctcms.nist.gov/fipy/INSTALLATION.html But at the last step pip install fipy I get an error that I don't…
TThe
  • 69
  • 1
  • 7
0
votes
1 answer

FaceVariables in FiPy

I am modeling electrical current through various structures with the help of FiPy. To do so, I solve Laplace's equation for the electrical potential. Then, I use Ohm's law to derive the field and with the help of the conductivity, I obtain the…
lmr
  • 174
  • 2
  • 10
0
votes
1 answer

Fipy 3.1.3: applying fixed flux BC on 3D mesh with bumps

I notice a strange behavior when using Fipy and fixed flux boundary condition on a 3D mesh with bumps. On the left hand of the attached picture I show a 2D cut of the geometry with the theoretical heat flux boundary condition, without (A: top) and…
Bragostin
  • 1
  • 1
0
votes
1 answer

Solving non linear PDE using FiPy - Grid and diffusion term #Python

I am trying to use fipy to solve a non linear pde and i have a couple of questions regarding the usage. 1- can i set the grid1D object to start from a specific number rather than 0 ? 2- is it possible to use a coefficient variable with x as a…
BerlAb
  • 1
0
votes
0 answers

How to compute grain boundary diffusion with Fipy using Fisher model?

I'm new in fipy and I would like to know if its possible to compute grain boundaries diffusion using the Fisher model with the following set of equations : dc/dt = D*(d2c/dx2 + d2c/dy2) dcb/dt = Db*(d2cb/dy2) + (2D/d)*(dc/dx)|x=d/2 with the…
0
votes
0 answers

FiPy fork error

I am currently trying to use fipy on our local cluster (Scientific Linux 6.9 and Python 2.7.8) to perform some drift-diffusion calculations, and I'm having difficulty with solving in parallel. When I attempt to run my script invoking the --trilinos…
J. Smyth
  • 1
  • 1
0
votes
1 answer

General boundary conditions

I’d appreciate help on setting general boundary conditions, -grad(y) + g(y) = 0 where g is some function of the unknown y. Here’s a simple 1D example that I can’t get to work: N=3 h=1./(float(N)-1.) mesh = Grid1D(nx=N,…
0
votes
1 answer

Solving heat equation in pipe

I want to simulate heat transfer from a hot fluid flowing through a pipe into a surrounding solid. The temperature of the fluid entering the pipe is varying. The best thing I've thought of so far, is using variable which stores its previous value…
fAX
  • 1,451
  • 1
  • 10
  • 11
0
votes
1 answer

Estimating the parameters of a PDEs system using Fipy

I am solving a system of PDEs using Fipy which involve two parameters or constants, so I would like to know whether is also possible to estimate those parameters in Fipy, or what others libraries would be more adequate for that. Note: I know that…
Irbin B.
  • 382
  • 3
  • 18
0
votes
1 answer

Fipy nominally installed but fipy.test() fails with error messages

I'm attempting to get FiPy set up using Miniconda 2 on a Windows 7 system, and got to the point of running the test suite with the recommended python -c "import fipy; fipy.test()". Unfortunately rather than getting test results, the suite gave me an…
0
votes
1 answer

FiPy Setting Initial Grid Values

I am a usecase whereby I need to transpose values from a 2D Numpy array to a 2D FiPy grid which will then be used to solve the system. My code is as follows: for x in range(0, size[0]): for y in range(0, size[1]): …
MrD
  • 4,986
  • 11
  • 48
  • 90
0
votes
1 answer

how to enhance Fipy efficiency

I am using fipy to solve a diffusion problem with isolated regions in a calculation domain. See the schematic pic. below: where there is no flux between isolated BC, and flux exists at periodic BC The problem is modeled under Fipy with varing coeff…
0
votes
1 answer

FiPy Source term non-dependence on concentration

I am attempting to solve two coupled 1D advection-dispersion-reaction equations: ∂[CO2]/∂t = -v∂[CO2] + D∂^2[CO2]/dx^2 - k([CO2]air - [CO2]w) - alpha([Ca2+]eq - [Ca2+]), and ∂[Ca2+]/∂t = -v∂[Ca2+] + D∂^2[Ca2+]/dx^2 + alpha([Ca2+]eq -…
MaxC
  • 43
  • 5
0
votes
1 answer

Using FiPy and Mayavi to solve the diffusion equation in 3D

I'm interested in solving, \frac{\delta \phi}{\delta t} - D \nabla^2 \phi - \alpha \phi - \gamma \phi = 0 The following is working, but I have a few questions: Is it possible to increase performance with FiPy? I feel like the nx, ny, nz bins are…
Paul
  • 358
  • 3
  • 14
1 2 3
14
15