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

Python FiPy execution error for example circle.py

On Windows 10 I'm running Python 3.7 with the current FiPy version 3.4.2.1. If I run circle.py I get: Traceback (most recent call last): File "circle.py", line 182, in exec(fipy.tests.doctestPlus._getScript()) File "",…
Michael Hecht
  • 2,093
  • 6
  • 25
  • 37
0
votes
1 answer

FiPy: Can I directly change faceVariables depending on neighboring cells?

I am working with a biological model of the distribution of microbial biomass (b1) on a 2D grid. From the biomass a protein (p1) is produced. The biomass diffuses over the grid, while the protein does not. Only if a certain amount of protein is…
Inopinans
  • 43
  • 4
0
votes
1 answer

Problem in loading (.msh) file in fipy via Gmsh3D

I'm trying to import my mesh file (.msh) from Gmsh 4.7.0 into FiPy==3.4.2.1 (Windows 10)(Python 2.7.9). This mesh was created using open source FEM software (Cast3M) and then it was exported to Gmsh as .MED file. Gmsh was viewing perfectly my mesh…
youssef
  • 3
  • 2
0
votes
1 answer

Special meshing in Fipy(3d meshing of a hollow cylinder)

I would like to mesh a cylindrical fracture as follows in the picture: enter image description here The cells in the mesh have the hexahedral form with 6 faces and 8 nodes.This mesh will be used in fipy to solve a diffusion equation.(radial…
youssef
  • 3
  • 2
0
votes
1 answer

Solving stochastic PDEs in Fipy

I would like to simulate coupled PDEs with a Gaussian white noise field, and was unable to find any examples or documentation that suggests how it should be done. In particular, I am interested in Cahn-Hilliard-like systems with noise: d/dt(phi) =…
Aaron
  • 3
  • 1
0
votes
1 answer

fit pde solution to data

I have solved a pde (second Fick's law with non-uniform diffusivity) using fipy. I now would like to estimate the diffusion coefficient in one of the layers by fitting solutions of the pde to the measurements. Do you have any suggestions on how to…
0
votes
1 answer

Trouble representing terms for the momentum equation using Fipy

How would i go about representing the dyad (tensor product) in the following equation? I can't seem to figure out what terms in Fipy I should be using in general. More specifically the resulting equation: I'm mostly familiar with the transient and…
0
votes
1 answer

RuntimeError: Factor is exactly singular (and overflow encountered in square in FiPy)

I was trying to solve pde using FiPy in python. It is showing RuntimeError: Factor is exactly singular. This is not the case in these equation but in most of the equations I have computed. The equations are- ∂u/∂t = σu(1-u/C) - …
0
votes
1 answer

Computing simultaneous Partial differential equation using FIPY in python

I was trying to solve pde using fipy, since I'm new to it; I'm unable to debug error in my code. It is not giving any spatial pattern but just different monochromatic square(s) over a period of time.The equation which I'm trying to solve…
0
votes
2 answers

How can I express the term like diffusion term?

How can I express the term like diffusion term but with a transposed matrix in FIPY?
0
votes
1 answer

Problems re-implementing the fipy mesh20x20 example from my own IDE

I am currently using fipy but am still relatively new to the nuiances associated with the package. While I have been able to regenerate the desired heatmap from the examples folder in for the mesh20x20 diffusion example using the command line, I…
0
votes
1 answer

Mathematical operations with ConvectionTerm() or DiffusionTerm() in FiPy

I'm currently learning how to use FiPy and eventually want to use it to solve some biological problems. I have been trying to implement the following PDE system which describes hyphal growth of fungi: PDE system I can implement the system without…
Inopinans
  • 43
  • 4
0
votes
1 answer

Coupled non-linear equations in FyPi

I'm trying to set up a system for solving these 5 coupled PDEs in FyPi to study the dynamics of electrons and holes in semiconductors The system of coupled PDEs I'm struggling with defining the terms highligted in blue as they're products of one…
josefT
  • 21
  • 2
0
votes
0 answers

Strange velocity results seem to can not satisfy continuity when I solve the N-S equation

I want to solve N-S equations with a model which water flows vertically from high position to low. So, the inlet boundary is 'mesh.facesBack' with a assigned pressure or velocity, the outlet boundary is 'mesh.facesFront' with zero pressure. I…
0
votes
1 answer

How to set the parameter 'underRelaxation' to a coupled equation?

I know that we can set the parameter 'underRelaxation' if we use 'sweep' to solve the equation. eg: xVelocity_eq.sweep(dt=dt, underRelaxation = 0.5) But how to set this parameter to coupled equation. eg: coupled_eq = xVelocity_eq & yVelocity_eq &…