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

Can't call examples in FiPy when installed from conda

I installed FiPy following the site's preferred method of conda installation in a virtual environment. However, I can't seem to call/run any of the examples using, for instance, command such as python setup.py test --examples. I was also…
neither-nor
  • 1,245
  • 2
  • 17
  • 30
0
votes
2 answers

Problem importing 3D Mesh by Gmsh in fipy

I am trying to import a 3D mesh produced with Gmsh in FiPy. A test with a 2D mesh worked fine. If the model then is extruded and imported with Gmsh3D I get an error message. GmshException: Gmsh hasn't produced any cells! Check your Gmsh code. I'm…
TThe
  • 69
  • 1
  • 7
0
votes
1 answer

How to fix an endless computation on FiPy?

My problem is quite simple: when I get the equations (last section of the code) I want to solve, the computation is endless. Maybe is it a problem of mesh or steps? So my problem is to solve 3 PDE, with two similar. I've changed some parameters but…
0
votes
2 answers

Recreate fipy Grid2D with Mesh2D constructor

If I create a fipy 2D grid using: mesh = Grid2D(nx=3, ny=3, dx=1., dy=1.) I get a reasonable grid of rectangular elements. However, if I take the values of this mesh and use them to construct a vanilla Mesh2D: mesh2d = Mesh2D(mesh.vertexCoords,…
Fadecomic
  • 1,220
  • 1
  • 10
  • 23
0
votes
1 answer

Solution to diffusion equation in cylindrical coordinates using FiPy not correct

The steady-state solution to a diffusion equation in cylindrical geometry using FiPy is rather different from the solution obtained from another software, eg., Mathematica. The equation is: $0 =…
AJHC
  • 285
  • 3
  • 7
0
votes
1 answer

Cannot find numpy._import_tools when testing pysparse

After installing pysparse with Python version 2.7.15: $ pyenv local 2.7.15 $ pip install pysparse==1.2-dev213 I tried to test the installation as shown at the pysparse home page. But when I run the test testSuperlu.py, I get the following…
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174
0
votes
1 answer

Error in importing 3D mesh generated from gmsh into fipy

I am having a lot trouble importing 3D mesh from gmsh to fipy. I have looked through all the questions regarding gmsh and fipy on this forum, but unfortunately I didn't find a similar topic. I am importing a 3D cylindrical mesh generated by gmsh 4.0…
0
votes
1 answer

How to convert face variable to cell variable to insert it into equation?

I want to solve a fluid flow problem with some source terms. But I am not able to write the equation at the end with the source term as desired by me. Is there a way to convert the FaceVariable to cellVariable. I am getting this error TypeError:…
psnbaba
  • 91
  • 3
0
votes
0 answers

Reflecting boundary conditions in FiPy

I am attempting to solve the convection diffusion equation in FiPy. For the moment, all I am trying to achieve is a Neumann boundary condition, so that the wave reflects back at the right-hand boundary rather than travelling out of the domain. I…
freitreppe
  • 11
  • 1
0
votes
1 answer

Get FaceVariable at GMSH Physical Line

I successfully set up a very simple diffusion problem including a source face (continuum) and sink faces (sidewall, top) on a mesh generated with GMSH. from fipy import * mesh = Gmsh2D('''Point(1) = {0, 0, 0, 1.0}; Point(2) = {12, 0, 0,…
Christoph
  • 49
  • 5
0
votes
0 answers

IntelliJ cannot import module but works fine from command line

I am using Ubuntu and trying to run a simple Python script: from fipy import Grid1D nx = 50 dx = 1. mesh = Grid1D(nx=nx, dx=dx) print(mesh) If I run this from command line everything is fine: dario@dario-X750JB:~$…
MrD
  • 4,986
  • 11
  • 48
  • 90
0
votes
1 answer

FiPy Setting outflow condition the correct way

I need some help with a quiete simple problem in FiPy. My goal is to simulate a fluid flowing through a concrete block while phase change. But first of all I tried to do a simple 1D simulation assumed a fluid massflow and a constant wall temperature…
TThe
  • 69
  • 1
  • 7
0
votes
1 answer

Derivative terms in Fipy

What's the correct approach to the terms containing derivatives that cannot be represented (at least in any obvious way) as either convection or diffusion in FiPy? For example, in a system of PDEs being solved for functions u_i on a 2d region with…
morion
  • 1
0
votes
1 answer

How do you raise CellVariables or ImplicitSourceTerms to a power in FiPy?

With FiPy (Python library) I want to solve the coupled of pdes system shown below. The code below works, but doesn't give the correct solution. p, q, r, s = 2, 1, 2, 0 Du, Dv = 0.0004, 0.04 mesh = Grid1D(nx=500, Lx=5.) U = CellVariable(name =…
0
votes
1 answer

Face areas in fipy

Is there a possibility to extract the area of a face between two cells in fipy? I know that each mesh has got the property cellVolume and in the specific case I investigate, this allows me to deduce the relevant surface areas. Furthermore, I can…
lmr
  • 174
  • 2
  • 10