pyoomph.equations.contact_angle module

class pyoomph.equations.contact_angle.CassieBaxterContactLine(pillar_fraction=0.5, sigma_sg=None, sigma_sl=None, cl_speed_scale=1.0000000000000000818E-5 * second**-1 * meter, cl_speed_exponent=1)[source]

Bases: YoungDupreContactLine

This assumes that we have pillars with air pockets. There is a more general version of Cassie-Baxter for arbitrary heterogenous substrates. See https://www.researchgate.net/profile/Gene-Whyman/publication/239161424_The_rigorous_derivation_of_Young_Cassie-Baxter_and_Wenzel_equations_and_the_analysis_of_the_contact_angle_hysteresis_phenomenon/links/56def81a08ae6a46a1849b06/The-rigorous-derivation-of-Young-Cassie-Baxter-and-Wenzel-equations-and-the-analysis-of-the-contact-angle-hysteresis-phenomenon.pdf for more information.

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

class pyoomph.equations.contact_angle.DynamicContactLineEquations(model, wall_normal=[[0], [1], [0]], wall_tangent=None, unpinned_indicator_name='_is_unpinned', velocity_enforcing_name='_cl_velo_lagr', actual_theta_name='measured_contact_angle', surface_tension_name='surf_tens_at_cl', override_dynamics_name='_override_cl_dynamics', with_observables=False)[source]

Bases: InterfaceEquations

Represents the boundary conditions to be set at the moving contact line.

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

Parameters:
  • model (GenericContactLineModel) – The model for the contact line. This model must be a subclass of GenericContactLineModel.

  • wall_normal (Union[Expression, int, float]) – The normal vector of the wall. Default is vector(0,1).

  • wall_tangent (Union[Expression, int, float]) – The tangent vector of the wall. Default is None, meaning it is calculated from the wall normal and the normal of the free surface.

  • unpinned_indicator_name (str) – Optional. The name of the unpinned indicator. Default is “_is_unpinned”.

  • velocity_enforcing_name (str) – Optional. The name of the velocity enforcing field. Default is “_cl_velo_lagr”.

  • actual_theta_name (str) – Optional. The name of the actual contact angle. Default is “measured_contact_angle”.

  • surface_tension_name (str) – Optional. The name of the surface tension. Default is “surf_tens_at_cl”.

  • override_dynamics_name (str) – Optional. The name of the override dynamics field. Default is “_override_cl_dynamics”.

  • with_observables (bool) – Optional. If True, the observables for the contact line will be added. Default is False.

required_parent_type

alias of MultiComponentNavierStokesInterface

class pyoomph.equations.contact_angle.GenericContactLineModel[source]

Bases: object

Represents a generic contact line model. This class is inherited by the specific contact line models (e.g. pinned, unpinned, stick-slip, etc.). It contains the basic methods that are common to all contact line models.

class pyoomph.equations.contact_angle.KwokNeumannContactLine(cl_speed_scale=1.0000000000000000818E-5 * second**-1 * meter, beta=124.70000000000000284 * second**4 * kilogram**-2, sigma_sg_0=None, cl_speed_exponent=1)[source]

Bases: StickSlipContactLine

Represents a contact line model using the Kwok-Neumann law for the contact angle. It is useful to use this model when the equilibrum contact angle is composition-dependent.

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

Parameters:
  • cl_speed_scale (Union[Expression, int, float, None]) – Optional. The speed with which the contact line moves towards the equilibrium contact angle. Default is 1e-5 m/s.

  • beta (Union[Expression, int, float]) – Optional. The fit parameter beta. Default is 124.7 m^4/J^2.

  • sigma_sg_0 (Union[Expression, int, float, None]) – Optional. The surface tension of the gas-liquid interface at the contact line. If not set, it will be estimated from the initial contact angle and surface tension. Default is None.

  • cl_speed_exponent (int) – Optional. The exponent of the speed with which the contact line moves towards the equilibrium contact angle. Default is 1.

class pyoomph.equations.contact_angle.PinnedContactLine(enforcing_condition=None)[source]

Bases: GenericContactLineModel

Represents a pinned contact line model. It uses a Lagrange multiplier to enforce the contact line to be pinned.

Parameters:

enforcing_condition (Optional[Expression]) – Optional. An expression that can be used to enforce the contact line to be pinned.

class pyoomph.equations.contact_angle.PinnedContactLineWithCollapsePrevention(min_local_contact_angle=1 / 36 * Pi, contact_line_position=None, shift_velocity=1.0000000000000000555E-4 * second**-1 * meter)[source]

Bases: PinnedContactLine

In case of regular Marangoni flow (e.g. glycerol+water), the pinned contact line can collapse, i.e. the local contact angle can go to zero. We allow to move the contact line here to prevent this collapse, while replicating a pinned contact line.

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

Parameters:
  • min_local_contact_angle (Union[Expression, int, float]) – The minimum local contact angle that is allowed. Default is 5 degrees.

  • contact_line_position (Union[Expression, int, float, None]) – Optional. The position of the contact line. If not set, it will be set to the initial contact line position. Default is None.

  • shift_velocity (Union[Expression, int, float]) – The velocity with which the contact line is shifted to prevent collapse. Default is 0.1 mm/s.

class pyoomph.equations.contact_angle.StickSlipContactLine(theta_eq=None, cl_speed_scale=1.0000000000000000818E-5 * second**-1 * meter, cl_speed_exponent=1)[source]

Bases: UnpinnedContactLine

Represents a stick-slip contact line model, where the contact line can be pinned or unpinned depending on the contact angle dynamics.

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

Parameters:
  • theta_eq (Union[Expression, int, float, None]) – Optional. The equilibrium contact angle. If not set, it has to be passed in the set_missing_information method. Default is None.

  • cl_speed_scale (Union[Expression, int, float, None]) – Optional. The speed with which the contact line moves towards the equilibrium contact angle. Default is 1e-5 m/s.

  • cl_speed_exponent (int) – Optional. The exponent of the speed with which the contact line moves towards the equilibrium contact angle. Default is 1.

pin(forced=False)[source]

Pins the contact line. If forced is set to True, the contact line will be pinned even if the dynamics would not pin it.

Parameters:

forced (bool) – Force the contact line to be pinned. Default is False.

set_advancing_pin_below_angle(angle, explicit=True, as_factor=False, only_if_decaying=True, heaviside_smoothing=0.0)[source]

Set the dynamics for the contact line to pin when the contact angle is below a certain angle.

Parameters:
  • angle (Union[Expression, int, float]) – Angle or relative factor to the equilibrium contact angle.

  • explicit (bool) – Handle the dynamics after each successful time step.

  • as_factor (bool) – angle is treated as numerical factor times the equilibrium contact angle.

  • only_if_decaying (bool) – Dynamics are only applied if the contact angle is decaying.

  • heaviside_smoothing (float) – Smoothing parameter for the Heaviside function for an implicit treatment of the dynamics.

Returns:

The StickSlipContactLine itself for chaining.

set_advancing_unpin_above_angle(angle, explicit=True, as_factor=False, only_if_growing=True, heaviside_smoothing=0.0)[source]

Set the dynamics for the contact line to unpin when the contact angle is above a certain angle.

Parameters:
  • angle (Union[Expression, int, float]) – Angle or relative factor to the equilibrium contact angle.

  • explicit (bool) – Handle the dynamics after each successful time step.

  • as_factor (bool) – angle is treated as numerical factor times the equilibrium contact angle.

  • only_if_growing (bool) – Dynamics are only applied if the contact angle is growing.

  • heaviside_smoothing (float) – Smoothing parameter for the Heaviside function for an implicit treatment of the dynamics.

Returns:

The StickSlipContactLine itself for chaining.

set_receding_pin_above_angle(angle, explicit=True, as_factor=False, only_if_growing=True, heaviside_smoothing=0.0)[source]

Set the dynamics for the contact line to pin when the contact angle is above a certain angle.

Parameters:
  • angle (Union[Expression, int, float]) – Angle or relative factor to the equilibrium contact angle.

  • explicit (bool) – Handle the dynamics after each successful time step.

  • as_factor (bool) – angle is treated as numerical factor times the equilibrium contact angle.

  • only_if_growing (bool) – Dynamics are only applied if the contact angle is growing.

  • heaviside_smoothing (float) – Smoothing parameter for the Heaviside function for an implicit treatment of the dynamics.

Returns:

The StickSlipContactLine itself for chaining.

set_receding_unpin_below_angle(angle, explicit=True, as_factor=False, only_if_decaying=True, heaviside_smoothing=0.0)[source]

Set the dynamics for the contact line to unpin when the contact angle is below a certain angle.

Parameters:
  • angle (Union[Expression, int, float]) – Angle or relative factor to the equilibrium contact angle.

  • explicit (bool) – Handle the dynamics after each successful time step.

  • as_factor (bool) – angle is treated as numerical factor times the equilibrium contact angle.

  • only_if_decaying (bool) – Dynamics are only applied if the contact angle is decaying.

  • heaviside_smoothing (float) – Smoothing parameter for the Heaviside function for an implicit treatment of the dynamics.

Returns:

The StickSlipContactLine itself for chaining.

unpin(forced=False)[source]

Unpins the contact line. If forced is set to True, the contact line will be depinned even if the dynamics would pin it.

Parameters:

forced (bool) – Force the contact line to be unpinned. Default is False.

class pyoomph.equations.contact_angle.UnpinnedContactLine(theta_eq=None, cl_speed_scale=1.0000000000000000818E-5 * second**-1 * meter, cl_speed_exponent=1)[source]

Bases: GenericContactLineModel

Represents an unpinned contact line model using Cox-Voinov theory (doi:10.1017/S0022112086000332).

Parameters:
  • theta_eq (Union[Expression, int, float, None]) – Optional. The equilibrium contact angle. If not set, it has to be passed in the set_missing_information method. Default is None.

  • cl_speed_scale (Union[Expression, int, float, None]) – Optional. The speed with which the contact line moves towards the equilibrium contact angle. Default is 1e-5 m/s.

  • cl_speed_exponent (int) – Optional. The exponent of the speed with which the contact line moves towards the equilibrium contact angle. Default is 1, use 3 for Cox-Voinov.

get_unpinned_motion_velocity_expression(dyncl, theta_act_for_popov=None)[source]

Get the velocity with which the contact line moves towards the equilibrium contact angle. In this method, we just return a Cox-Voinov-like expression: The velocity of the contact line is proportional to the difference between the equilibrium contact angle and the actual contact angle, possibly raised to a power given by cl_speed_exponent.

Parameters:
  • dyncl (Optional[DynamicContactLineEquations]) – The dynamic contact line equations.

  • theta_act_for_popov (Union[Expression, int, float, None]) – If we do not have the dynamic contact line equations, we can pass the actual contact angle here (can be used for more simple models). Default is None.

Return type:

Expression

Returns:

The velocity with which the contact line moves towards the equilibrium contact angle.

class pyoomph.equations.contact_angle.WenzelContactLine(roughness=1, sigma_sg=None, sigma_sl=None, cl_speed_scale=1.0000000000000000818E-5 * second**-1 * meter, cl_speed_exponent=1)[source]

Bases: YoungDupreContactLine

See https://www.researchgate.net/profile/Gene-Whyman/publication/239161424_The_rigorous_derivation_of_Young_Cassie-Baxter_and_Wenzel_equations_and_the_analysis_of_the_contact_angle_hysteresis_phenomenon/links/56def81a08ae6a46a1849b06/The-rigorous-derivation-of-Young-Cassie-Baxter-and-Wenzel-equations-and-the-analysis-of-the-contact-angle-hysteresis-phenomenon.pdf for more information.

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

class pyoomph.equations.contact_angle.YoungDupreContactLine(sigma_sg=None, sigma_sl=None, cl_speed_scale=1.0000000000000000818E-5 * second**-1 * meter, cl_speed_exponent=1, line_tension=None)[source]

Bases: StickSlipContactLine

Represents a contact line model using the Young-Dupre law for the contact angle. It is useful to use this model when the equilibrum contact angle is composition-dependent.

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

Parameters:
  • sigma_sg (Union[Expression, int, float, None]) – Optional. The surface tension of the gas-liquid interface. If not set, it has to be passed in the set_missing_information method. Default is None.

  • sigma_sl (Union[Expression, int, float, None]) – Optional. The surface tension of the solid-liquid interface. If not set, it has to be passed in the set_missing_information method. Default is None.

  • cl_speed_scale (Union[Expression, int, float, None]) – Optional. The speed with which the contact line moves towards the equilibrium contact angle. Default is 1e-5 m/s.

  • cl_speed_exponent (int) – Optional. The exponent of the speed with which the contact line moves towards the equilibrium contact angle. Default is 1.

  • line_tension (Union[Expression, int, float, None]) – Optional. The line tension. Default is None.