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
0 answers

Strang splitting for solving stiff source FiPy

I have a problem with trying to use strang splitting with fipy to solve for stiff systems. Here is a sample code attached. At steady state I have balance issues. Would there be any problem with the implementation? Thanks. import numpy import…
Markiv
  • 1
0
votes
1 answer

stackoverflow error in 2d fipy PDE solver in python

I am trying to solve a system of three coupled PDEs and two ODEs (coupled) in 2D. The problem tries to solve for a case of a particle moving in a medium. The medium is given by the fields- velocity components vx, vy, and density m and there is one…
Deb S. B.
  • 78
  • 8
0
votes
1 answer

the linear system being solved in Fipy

Do I get the linear system from caching the Matrix and RHS and running solve/sweep for 1 iteration? Also, is it possible to manually set the Matrix being utilised? Thanks
Markiv
  • 1
0
votes
1 answer

flux boundary condition 1D diffusion

I am currently learning how to work with fipy and I have run into an issue when trying to run the code below. The problem is stationary 1D diffusion with a flow out of the right boundary. I read in other posts that the approach…
0
votes
1 answer

fipy problem with discontinuity in an 1D advection-diffusion system

I am trying to model a 1-D advection-diffusion problem involving a variable advection velocity. It concerns a block of ice flowing downwards. I experience problems with an unphysical discontinuity occurring at the point in the grid where the…
VG_nbi
  • 51
  • 6
0
votes
1 answer

What are the details of the iterative solvers in FiPy?

In fipy there is a default solver for the equations but it isn't clear as to which one it is out of the plethora of possibilities mentioned in the manual. I was wondering as to what kind of algorithm it follows (and what package - Scipy, Pysparse)?…
0
votes
1 answer

Unable to reproduce results for spherical grid in FIPY

I'm trying to reproduce a result from this post (considering fixes provided in answer by jeguyer). But when I try to run the exact same code I receive the following…
Perfy
  • 15
  • 4
0
votes
1 answer

Having trouble solving Population balance PDE in FiPy

I am a beginner in using FiPy and also in working with Finite Volume Methods in general. So please forgive me if my questions are naïve I am trying to solve a population balance equation of the form PDE with the boundary conditions as…
veeman
  • 1
  • 1
0
votes
1 answer

Chosen dt in sweep in FiPy package changes time domain of solution?

I am currently trying to solve a large PDE system with 18 PDEs and ODEs (which is why I use FiPy and not odeint from scipy). One of the equations is quite simple: dROS/dt = 0.06 which I implemented as follows: eqn_ROS = ( TransientTerm(var=ROS) ==…
0
votes
1 answer

FiPy Solving Couple PDEs Results in IndexError

I am new to FiPy and am trying to solve a pair of coupled PDEs describing adsorption of a material to an adsorbent packed in a cylinder. The material is flowing through the cylinder and its concentration is in either of 2 phases: a mobile phase or a…
0
votes
1 answer

How to represent these non-standard pdes with FiPy?

I am trying to solve a set of PDEs with FiPy, but not sure how to represent the equations: see the PDEs here. The terms give me trouble are those in red rectangle and blue rectangle. The one in red rectangle is a convection term times a function…
Rui Yang
  • 3
  • 1
0
votes
1 answer

Reverse diffusion with FiPy

Still with my bird migration, I would like to represent the return of the birds in Europe after spending time in Africa. To achieve that, I need to be able to "reverse" the diffusion of the birds. I tried to put a negative coefficient for diffusion,…
Jouline
  • 90
  • 7
0
votes
1 answer

Evolutive advection coefficient with time in FiPy, advection - diffusion equation (2D)

I am trying to develop a model that represent the stork migration from France to middle Africa. I chose to go with FiPy. I would like to set the time as a full migration time : First, storks diffuse randomly in France, but when the time gets to a…
Jouline
  • 90
  • 7
0
votes
1 answer

How to solve 1D Poisson equation with Dirichlet and Neumann boundary conditions on the same side using FiPy

Clearly an 1D Poisson equation with a constant source has an unique solution even if both Dirichlet and Newmann boundary conditions are on the same side. However I can't think of a way to solve this in FiPy. Please advise. I tried: from fipy import…
DKS
  • 188
  • 10
0
votes
1 answer

viewer error when running the stokesCavity.py example

Running Manjaro stable with python-3.9 and python-fipy-3.4.2.1-1. Just got started with FiPy, ultimately interested in writing single and two-phase flow code. Naturally I tried to run examples/flow/stokesCavity.py (stripped down from all rst text)…
zbinkz
  • 97
  • 8