pyoomph.equations.lubrication module

class pyoomph.equations.lubrication.LubricationBoundary(*, sigma=None, use_exact_pressure=None)[source]

Bases: InterfaceEquations

Represents the Neumann boundary condition for the lubrication equations, given by:

dot(n,sigma * grad(h)) = 0

Optionally, the exact pressure can be used, transforming the boundary condition to:

dot(n,sigma * grad(h)/sqrt(1+dot(grad(h),grad(h)))) = 0

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

Parameters:
  • sigma (ExpressionNumOrNone) – Surface tension. Default is None.

  • use_exact_pressure (Optional[bool]) – Use the exact pressure. Default is None.

required_parent_type

alias of LubricationEquations

class pyoomph.equations.lubrication.LubricationBoundaryByLagrange(*args: Any, **kwargs: Any)[source]

Bases: InterfaceEquations

Represents an alternative way of imposing the Neumann boundary condition for the lubrication equations, via a Lagrange Multiplier restraining the pressure, given by:

dot(n,grad(p)) = 0

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

required_parent_type

alias of LubricationEquations

class pyoomph.equations.lubrication.LubricationBulkField(*, name='c', space='C2', diffusion=1, sigma=None, height_multiplied=False, scheme='BDF2')[source]

Bases: Equations

Represents the evolution of a field in the bulk of the lubrication system, e.g. temperature, concentration, etc., given by:

d(hc)/dt + div(-h**2 * c / (2*mu) * grad(sigma) + h**3 * c / (3*mu) * grad(p)) - D * h * div(grad(c)) = 0

where h is the height of the liquid, c is the field, p is the pressure, mu is the dynamic viscosity of the liquid, sigma is the surface tension of the liquid, and D is the diffusion coefficient of the field.

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

  • space (FiniteElementSpaceEnum) – Finite element space. Default is “C2”.

  • diffusion (ExpressionOrNum) – Diffusion coefficient. Default is 1.

  • sigma (ExpressionNumOrNone) – Surface tension. Default is None.

  • height_multiplied (bool) – Whether the field is multiplied by the height. Default is False.

  • scheme (TimeSteppingScheme) – Time stepping scheme. Default is “BDF2”.

class pyoomph.equations.lubrication.LubricationEquationOnNavierStokes(dynamic_viscosity, sigma_top, disjoining_pressure=0, normal=None, add_traction_to_ns=True, gravity=0)[source]

Bases: Equations

To be used in combination with Navier-Stokes equations, this class represents the lubrication equations on the Navier-Stokes free interface, given by:

TODO

Parameters:
  • dynamic_viscosity (ExpressionOrNum) – Dynamic viscosity of the liquid. Default is 1.0.

  • sigma_top (ExpressionOrNum) – Surface tension of the liquid at the top interface. Default is 1.0.

  • disjoining_pressure (ExpressionOrNum) – Disjoining pressure. Default is 0.

  • normal (ExpressionNumOrNone) – Normal vector. Default is None.

  • add_traction_to_ns (bool) – Whether to add the traction to the Navier-Stokes equations. Default is True.

  • gravity (ExpressionOrNum) – Gravity vector. Default is 0.

class pyoomph.equations.lubrication.LubricationEquations(*, space='C2', mu=1.0, disjoining_pressure=None, sigma=1, fluid_props=None, use_exact_pressure=False, height_source=0, dt_h_factor=1, mu0=None, sigma0=None, swap_test_functions=False, scheme='BDF2', pfactor=1, use_subexpressions=True)[source]

Bases: Equations

Represents the lubrication equations, which are second order partial differential equation given by:

dh/dt + div(-h^3 / (3 * mu) * grad(p) + h^2 / (2 * mu) * grad(sigma)) = 0 p + div(sigma * grad(h)) - disjoining_pressure = 0

where h is the height of the liquid, p is the pressure, mu is the dynamic viscosity of the liquid, sigma is the surface tension of the liquid, and disjoining_pressure is the disjoining pressure. div is the divergence operator and grad is the gradient operator.

Parameters:
  • space (FiniteElementSpaceEnum) – Finite element space. Default is “C2”.

  • mu (ExpressionOrNum) – Dynamic viscosity of the liquid. Default is 1.0.

  • disjoining_pressure (Union[ExpressionNumOrNone,Dict[str,ExpressionOrNum]]) – Disjoining pressure. Default is None.

  • sigma (ExpressionOrNum) – Surface tension of the liquid. Default is 1.0.

  • fluid_props (AnyLiquidProperties) – Liquid properties. Default is None.

  • use_exact_pressure (bool) – Use the exact pressure. Default is False.

  • height_source (ExpressionOrNum) – Source term for the height equation. Default is 0.

  • dt_h_factor (ExpressionOrNum) – Time factor for the height equation. Default is 1.

  • mu0 (ExpressionNumOrNone) – Dynamic viscosity scaling. Default is None.

  • sigma0 (ExpressionNumOrNone) – Surface tension scaling. Default is None.

  • swap_test_functions (bool) – Swap test functions between pressure and height. Default is False.

  • scheme (TimeSteppingScheme) – Time stepping scheme. Default is “BDF2”.

  • pfactor (ExpressionOrNum) – Multiplicative factor for pressure. Default is 1.

  • use_subexpressions (bool) – Use subexpressions to speed up. Might be incompatible with some features. Default is True.

class pyoomph.equations.lubrication.LubricationHeightAveragedBulkVelocity(*args: Any, **kwargs: Any)[source]

Bases: Equations

Represents the projection of the velocity field to the bulk, given by:

u = -h**2/(3*mu)*grad(p)+h/(2*mu)*grad(sigma)

where u is the velocity field, h is the height of the liquid, p is the pressure, mu is the dynamic viscosity of the liquid, and sigma is the surface tension of the liquid.

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

class pyoomph.equations.lubrication.LubricationVelocityAtH(at_height=field(height, < code=0, tags=>), space='C2', name='velocity')[source]

Bases: Equations

Represents the velocity field at a given height, given by:

u = 1 / mu * (grad(sigma) - h * grad(p)) * H + 1 / mu * grad(p) * H**2 / 2

where u is the velocity field, h is the height of the liquid, p is the pressure, mu is the dynamic viscosity of the liquid, sigma is the surface tension of the liquid, and H is the height at which the velocity is calculated.

Parameters:
  • at_height (ExpressionOrNum) – Height at which the velocity is calculated. Default is var(“height”).

  • space (Optional[FiniteElementSpaceEnum]) – Finite element space. Default is “C2”.

  • name (str) – Name of the velocity field. Default is “velocity”.