pyoomph.equations.poisson module

class pyoomph.equations.poisson.DiffusionEquation(*, name='u', space='C2', source=None, diffusivity=1, temporal_factor=1)[source]

Bases: PoissonEquation

Represents the diffusion equation in the form:

partial_t(u) - div(coeff*grad(u)) = f

where u is the dependent variable, coeff is the diffusivity, and f is the source term.

This class is a subclass of PoissonEquation and inherits all its arguments.

Parameters:
  • name (str) – The name of the dependent variable. Default is “u”.

  • space (FiniteElementSpaceEnum) – The finite element space. Default is “C2”, i.e. second order continuous Lagrangian elements.

  • source (ExpressionNumOrNone) – The source term. Default is None.

  • diffusivity (ExpressionOrNum) – The diffusivity. Default is 1.

  • temporal_factor (ExpressionOrNum) – The temporal factor. Default is 1.

class pyoomph.equations.poisson.PoissonEquation(name='u', *, space='C2', source=None, coefficient=1, DG_alpha=1)[source]

Bases: Equations

Represents the Poisson equation in the form:

-div(coeff*grad(u)) = f

where u is the dependent variable, coeff is the coefficient, and f is the source term.

Parameters:
  • name (str) – The name of the dependent variable. Default is “u”.

  • space (FiniteElementSpaceEnum) – The finite element space. Default is “C2”, i.e. second order continuous Lagrangian elements.

  • source (ExpressionNumOrNone) – The source term. Default is None.

  • coefficient (ExpressionOrNum) – The coefficient. Default is 1.

  • DG_alpha (ExpressionOrNum) – The penalty parameter for the interior facet terms in case of use of Discontinuous Galerkin discretisation. Default is 1.

class pyoomph.equations.poisson.PoissonFarFieldMonopoleCondition(far_value=0, name=None, coefficient=None, origin=[[0], [0], [0]])[source]

Bases: InterfaceEquations

Represents a far-field condition for the Poisson equation in the form:

u + R * du/dr = far_value

where u is the dependent variable, far_value is the value at infinity, and R is the distance from the origin and r is the radial coordinate.

This class requires the parent equations to be of type PoissonEquation, meaning that if PoissonEquation (or subclasses) are not defined in the parent domain, an error will be raised.

Parameters:
  • far_value (ExpressionOrNum) – The value at infinity. Default is 0.

  • name (str) – The name of the dependent variable. Default is None, meaning that the name of the parent Poisson equation is used.

  • coefficient (ExpressionOrNum) – The coefficient. Default is None, meaning that the coefficient of the parent Poisson equation is used.

  • origin (ExpressionOrNum) – The origin of the far-field condition. Default is (0,0,0).

required_parent_type

alias of PoissonEquation