fipy.boundaryConditions package

Submodules

fipy.boundaryConditions.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 (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

__dict__ = mappingproxy({'__module__': 'fipy.boundaryConditions.boundaryCondition', '__doc__': '\n Generic boundary condition base class.\n\n .. attention:: This class is abstract. Always create one of its subclasses.\n ', '__init__': <function BoundaryCondition.__init__>, '_buildMatrix': <function BoundaryCondition._buildMatrix>, '_getDerivative': <function BoundaryCondition._getDerivative>, '__repr__': <function BoundaryCondition.__repr__>, '_resetBoundaryConditionApplied': <function BoundaryCondition._resetBoundaryConditionApplied>, '_test': <function BoundaryCondition._test>, '__dict__': <attribute '__dict__' of 'BoundaryCondition' objects>, '__weakref__': <attribute '__weakref__' of 'BoundaryCondition' objects>, '__annotations__': {}})
__init__(faces, value)
Parameters
  • faces (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

__module__ = 'fipy.boundaryConditions.boundaryCondition'
__repr__()

Return repr(self).

__weakref__

list of weak references to the object (if defined)

fipy.boundaryConditions.constraint module

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

Bases: object

Object to hold a Variable to value at where

see constrain()

__annotations__ = {}
__dict__ = mappingproxy({'__module__': 'fipy.boundaryConditions.constraint', '__init__': <function Constraint.__init__>, '__repr__': <function Constraint.__repr__>, '__dict__': <attribute '__dict__' of 'Constraint' objects>, '__weakref__': <attribute '__weakref__' of 'Constraint' objects>, '__doc__': None, '__annotations__': {}})
__init__(value, where=None)

Object to hold a Variable to value at where

see constrain()

__module__ = 'fipy.boundaryConditions.constraint'
__repr__()

Return repr(self).

__weakref__

list of weak references to the object (if defined)

fipy.boundaryConditions.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.

Parameters
  • faces (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

__annotations__ = {}
__init__(faces, value)
Parameters
  • faces (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

__module__ = 'fipy.boundaryConditions.fixedFlux'

fipy.boundaryConditions.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 (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

__annotations__ = {}
__module__ = 'fipy.boundaryConditions.fixedValue'

fipy.boundaryConditions.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 (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

  • order (int) – 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.

__annotations__ = {}
__init__(faces, value, order)

Creates an NthOrderBoundaryCondition.

Parameters
  • faces (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

  • order (int) – 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.

__module__ = 'fipy.boundaryConditions.nthOrderBoundaryCondition'

fipy.boundaryConditions.test module

Test numeric implementation of the mesh

Module contents

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

Bases: object

Object to hold a Variable to value at where

see constrain()

__annotations__ = {}
__dict__ = mappingproxy({'__module__': 'fipy.boundaryConditions.constraint', '__init__': <function Constraint.__init__>, '__repr__': <function Constraint.__repr__>, '__dict__': <attribute '__dict__' of 'Constraint' objects>, '__weakref__': <attribute '__weakref__' of 'Constraint' objects>, '__doc__': None, '__annotations__': {}})
__init__(value, where=None)

Object to hold a Variable to value at where

see constrain()

__module__ = 'fipy.boundaryConditions.constraint'
__repr__()

Return repr(self).

__weakref__

list of weak references to the object (if defined)

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.

Parameters
  • faces (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

__annotations__ = {}
__init__(faces, value)
Parameters
  • faces (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

__module__ = 'fipy.boundaryConditions.fixedFlux'
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 (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

__annotations__ = {}
__module__ = 'fipy.boundaryConditions.fixedValue'
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 (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

  • order (int) – 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.

__annotations__ = {}
__init__(faces, value, order)

Creates an NthOrderBoundaryCondition.

Parameters
  • faces (FaceVariable of bool) – Mask of faces where this condition applies.

  • value (float) – Value to impose.

  • order (int) – 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.

__module__ = 'fipy.boundaryConditions.nthOrderBoundaryCondition'
Last updated on Jan 14, 2021. Created using Sphinx 3.4.3.