pyoomph.equations.stokes_stream_func module

class pyoomph.equations.stokes_stream_func.StreamFunctionFromVelocity(*, name='streamfunc', space='C2', velocity=field(velocity, < code=0, tags=>), with_error_estimator=True, axisymmetric='auto', DG_alpha=10)[source]

Bases: Equations

This class defines the equations for the stream function of a velocity field in 2D Cartesian or axisymmetric coordinates. The stream function is defined as the scalar field phi such that u = (dphi/dy,-dphi/dx) in 2D Cartesian coordinates or u = (-1/r dphi/dz,dphi/dr) in axisymmetric coordinates.

Parameters:
  • name (str) – Name of the stream function field. Default is “streamfunc”.

  • space (FiniteElementSpaceEnum) – The finite element space for the stream function. Default is “C2”.

  • velocity (Expression) – The velocity field for which the stream function is defined. Default is var(“velocity”).

  • with_error_estimator (bool) – If True, an error estimator is added to the equations. Default is True.

  • axisymmetric (Union[Literal["auto"],bool]) – If True, the equations are defined in axisymmetric coordinates. If “auto”, the equations are defined in axisymmetric coordinates if the coordinate system is axisymmetric. Default is “auto”.

  • DG_alpha (ExpressionOrNum) – The penalty parameter for the DG formulation of the stream function. If the stream function is defined in a DG space, this parameter is used to penalize jumps in the stream function across element boundaries. Default is 10.

class pyoomph.equations.stokes_stream_func.StreamFunctionFromVelocityInterface(*args: Any, **kwargs: Any)[source]

Bases: InterfaceEquations

This class defines the Neuamnn boundary conditions for the calculation of the stream function from the velocity field in 2D Cartesian or axisymmetric coordinates.

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

required_parent_type

alias of StreamFunctionFromVelocity