Bookmark and Share FiPy: A Finite Volume PDE Solver Using Python
Version 3.0.1-dev139-ge5d2233

Previous topic

subpackage Package

Next topic

matrices Package

This Page

Contact

FiPy developers
Jonathan Guyer
Daniel Wheeler
James Warren

Join our mailing list

100 Bureau Drive, M/S 6555
Gaithersburg, MD 20899

301-975-5329 Telephone
301-975-4553 Facsimile

boundaryConditions Package

boundaryConditions Package

class fipy.boundaryConditions.Constraint(value, where=None)

Bases: object

Object to hold a Variable to value at where

see constrain()

class fipy.boundaryConditions.FixedFlux(faces, value)

Bases: fipy.boundaryConditions.boundaryCondition.BoundaryCondition

The FixedFlux boundary condition adds a contribution, equivalent to a fixed flux (Neumann condition), to the equation’s RHS vector. The contribution, given by value, is only added to entries corresponding to the specified faces, and is weighted by the face areas.

Creates a FixedFlux object.

Parameters :
  • faces: A list or tuple of Face objects to which this condition applies.
  • value: The value to impose.
class fipy.boundaryConditions.FixedValue(faces, value)

Bases: fipy.boundaryConditions.boundaryCondition.BoundaryCondition

The FixedValue boundary condition adds a contribution, equivalent to a fixed value (Dirichlet condition), to the equation’s RHS vector and coefficient matrix. The contributions are given by -\mathtt{value}
\times G_{\text{face}} for the RHS vector and G_{\text{face}} for the coefficient matrix. The parameter G_{\text{face}} represents the term’s geometric coefficient, which depends on the type of term and the mesh geometry.

Contributions are only added to entries corresponding to the specified faces.

Parameters :
  • faces: A list or tuple of exterior Face objects to which this condition applies.
  • value: The value to impose.
class fipy.boundaryConditions.NthOrderBoundaryCondition(faces, value, order)

Bases: fipy.boundaryConditions.boundaryCondition.BoundaryCondition

This boundary condition is generally used in conjunction with a ImplicitDiffusionTerm that has multiple coefficients. It does not have any direct effect on the solution matrices, but its derivatives do.

Creates an NthOrderBoundaryCondition.

Parameters :
  • faces: A list or tuple of Face objects to which this condition applies.
  • value: The value to impose.
  • order: The order of the boundary condition. An order of 0 corresponds to a FixedValue and an order of 1 corresponds to a FixedFlux. Even and odd orders behave like FixedValue and FixedFlux objects, respectively, but apply to higher order terms.

boundaryCondition Module

class fipy.boundaryConditions.boundaryCondition.BoundaryCondition(faces, value)

Bases: object

Generic boundary condition base class.

Attention

This class is abstract. Always create one of its subclasses.

Parameters :
  • faces: A list or tuple of exterior Face objects to which this condition applies.
  • value: The value to impose.

constraint Module

class fipy.boundaryConditions.constraint.Constraint(value, where=None)

Bases: object

Object to hold a Variable to value at where

see constrain()

fixedFlux Module

class fipy.boundaryConditions.fixedFlux.FixedFlux(faces, value)

Bases: fipy.boundaryConditions.boundaryCondition.BoundaryCondition

The FixedFlux boundary condition adds a contribution, equivalent to a fixed flux (Neumann condition), to the equation’s RHS vector. The contribution, given by value, is only added to entries corresponding to the specified faces, and is weighted by the face areas.

Creates a FixedFlux object.

Parameters :
  • faces: A list or tuple of Face objects to which this condition applies.
  • value: The value to impose.

fixedValue Module

class fipy.boundaryConditions.fixedValue.FixedValue(faces, value)

Bases: fipy.boundaryConditions.boundaryCondition.BoundaryCondition

The FixedValue boundary condition adds a contribution, equivalent to a fixed value (Dirichlet condition), to the equation’s RHS vector and coefficient matrix. The contributions are given by -\mathtt{value}
\times G_{\text{face}} for the RHS vector and G_{\text{face}} for the coefficient matrix. The parameter G_{\text{face}} represents the term’s geometric coefficient, which depends on the type of term and the mesh geometry.

Contributions are only added to entries corresponding to the specified faces.

Parameters :
  • faces: A list or tuple of exterior Face objects to which this condition applies.
  • value: The value to impose.

nthOrderBoundaryCondition Module

class fipy.boundaryConditions.nthOrderBoundaryCondition.NthOrderBoundaryCondition(faces, value, order)

Bases: fipy.boundaryConditions.boundaryCondition.BoundaryCondition

This boundary condition is generally used in conjunction with a ImplicitDiffusionTerm that has multiple coefficients. It does not have any direct effect on the solution matrices, but its derivatives do.

Creates an NthOrderBoundaryCondition.

Parameters :
  • faces: A list or tuple of Face objects to which this condition applies.
  • value: The value to impose.
  • order: The order of the boundary condition. An order of 0 corresponds to a FixedValue and an order of 1 corresponds to a FixedFlux. Even and odd orders behave like FixedValue and FixedFlux objects, respectively, but apply to higher order terms.

test Module

Test numeric implementation of the mesh