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

storing value of ImplicitSourceTerm

I am working with fipy and I wish to simulate a flow with a free flux BC on some selected faces. Following other examples, I tried 2 different technics: from fipy import * from fipy.meshes.nonUniformGrid1D import NonUniformGrid1D as Grid1D from…
rbtlm640
  • 79
  • 5
0
votes
2 answers

FiPy for charged particle flow

Premise I am trying to solve a set of coupled PDEs that describes the diffusion of charged particles with different diffusion coefficients using FiPy. The ultimate goal is to obtain the concentration profile for both species and the electric…
nabz
  • 11
  • 1
0
votes
1 answer

FiPy Modelling water pumping with FiPy

I am trying to model water pumping with Fipy in a domain where I want to simulate diffusion and advection. Water is extracted from one point, and is discharged in another point. However, I am having issues with regard to the definition of the…
Toni P
  • 47
  • 5
0
votes
0 answers

Fipy Change CellValue between solving timesteps

I want to connect a mesh (partial differential equations) with a complex mixture reactor (ordinary differential equations). I want to take the values in one point, solve the ODEs, and reinput the values in the mesh (in which PDEs will be solved). #…
Toni P
  • 47
  • 5
0
votes
1 answer

Fipy Get values from a mesh region and not by point coordinates

I am trying to get values from a region. I know that there is a method to call the values by introducing the coordinates: var([(x1, x2, x3) #xvalues (y1, y2, y3)]) #yvalues But, for instance, it is confusing to how many points and which…
Toni P
  • 47
  • 5
0
votes
1 answer

FiPy viewer logarithmic axes scaling and aspect ratio

Is there an easy way to make different axes scale logarithmically? I am using the Matplotlib2DGridContourViewer and I managed to make the plotted data scale logarithmically using fipy.Viewer(vars=somevariable, log=True) but I couldn't find anything…
0
votes
1 answer

Best way to address outer mesh surfaces of a cylinder by FiPy ,

Could I address outer mesh face centers by any FiPy or ... modules? For a cylinder by radius of 'R', related meshes are created O'grid sweep-like on it. As it seems, 'R' is greater than the most outer mesh face centers; so there is a difference…
Ali_Sh
  • 2,667
  • 3
  • 43
  • 66
0
votes
1 answer

how to solve PFC FiPy imported gmsh, which is converted from .msh Ansys format, error

what is the problem for meshing in PFC software by importing .msh2 mesh type by FiPy.grid3D("")? this mesh is exported from openFOAM and converted to the readable .msh for FiPy. Embedded FiPy version is 3.1 and Python version is 2.7. IPython 3.1.0…
Ali_Sh
  • 2,667
  • 3
  • 43
  • 66
0
votes
1 answer

How to implicitly represent a term in FiPy that is quadratically dependent on the dependent variable

I'm trying to model a multi-component reaction diffusion system using FiPy. Each component, \phi_i, has a diffusive term and multiple bi-molecular reaction terms (\phi_m, \phi_n). Each component's time evolution is given by the following…
0
votes
1 answer

FiPy Transport-reaction with one term depending on two variables on two different equations

I am trying to solve a transport-reaction problem, but I have different solutions depending on the approach. I think that the problem arises if I am trying to solve the coupled equations. These are the PDEs: I assume constant Temperature (T in the…
Toni P
  • 47
  • 5
0
votes
1 answer

Solving a steady flow in a subdomain of a mesh using FiPy

I'm fairly new to FiPy and I'm currently facing an issue of which I am sure can be solved easily: I want to solve a 3D steady flow of the form: eq = ( DiffusionTerm(var=u) == -(1/mu) * dP + g_acc * (rho/mu) * ymax ) Where velocity u is in the…
0
votes
1 answer

Solving Fick's second law of diffusion in 1D sphere using FiPy

I'm trying to solve the second law of diffusion for spheres PDE using fipy. I've checked the documentation but there's no example for such a case, so I was wondering if it is actually possible to do it, as I was not successful reaching for the…
0
votes
2 answers

Solving a PDE with 1D zero gradient boundary condition and zero flux condition with FiPy

I modified the examples.convection.exponential1D.mesh1D example and it gives an error when I run it. from fipy import CellVariable, Grid1D, DiffusionTerm, PowerLawConvectionTerm from fipy.tools import numerix diffCoeff = 1. convCoeff = (10.,) L =…
0
votes
1 answer

Best way to solve coupled PDEs in fipy

I am trying to solve the following problem using fipy but I am a bit overwhelmed. Hoping someone can point me in the right direction. C and q are the dependent variables and I am solving in 2 dimensions, time (t) and length (z). Is there any…
Synergix
  • 145
  • 1
  • 10
0
votes
1 answer

FiPy evaluates different solutions on the same system using python2 or python3

I'm experimenting FiPy with a system of partial differential equations and I get different results running the same script in Python2 or Python3. More precisely, I get the result I expect running the script in Python 2.7, while I get a completely…
francop94
  • 15
  • 4