Surfactant spreading in a two-dimensional cavity and emergent contact-line singularities

Extracted source text ยท arXiv 2105.10543

% This is file JFM2esam.tex
% first release v1.0, 20th October 1996
%       release v1.01, 29th October 1996
%       release v1.1, 25th June 1997
%       release v2.0, 27th July 2004
%       release v3.0, 16th July 2014
%   (based on JFMsampl.tex v1.3 for LaTeX2.09)
% Copyright (C) 1996, 1997, 2014 Cambridge University Press

\documentclass{jfm}
\usepackage{graphicx}
\usepackage{epstopdf, epsfig}

\usepackage{xcolor}% Include figure files

\usepackage{amsmath}
 \usepackage{amssymb}
 \usepackage{subcaption}
 \usepackage{makecell}
 \usepackage{blkarray}
 \usepackage{mathtools}
 \numberwithin{equation}{section}
\usepackage{stmaryrd}

\newcommand{\dx}{\mathrm{d}x}
\newcommand{\dy}{\mathrm{d}y}
\newcommand{\dz}{\mathrm{d}z}
\newcommand{\fd}[3]{\frac{\mathrm{d}^{#3}#1}{\mathrm{d}#2^{#3}}} % for full derivative
\newcommand{\fp}[3]{\frac{\partial^{#3}#1}{\partial#2^{#3}}} % for partial derivative

\newcommand{\getrid}[1]{\textcolor{green}{\xout{#1}}}
\newcommand{\jl}[1]{\textcolor{red}{#1}}
\newcommand{\oj}[1]{\textcolor{red}{#1}}
\newcommand{\rmc}[1]{\textcolor{red}{#1}}



\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}

\shorttitle{Surfactant cavity flow}
\shortauthor{Richard Mcnair,
  Oliver E. Jensen
 and Julien R. Landel}

\title{Surfactant spreading in a two-dimensional cavity and emergent contact-line singularities}

\author{Richard Mcnair\aff{1}\corresp{\email{richard.mcnair@postgrad.manchester.ac.uk}},
  Oliver E. Jensen\aff{1}\corresp{\email{oliver.jensen@manchester.ac.uk}}
 \and Julien R. Landel \aff{1}\corresp{\email{Julien.Landel@manchester.ac.uk}}}

\affiliation{\aff{1}Department of Mathematics, University of Manchester, Oxford Road, Manchester M13 9PL, UK}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% REVISION VERSION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\maketitle

\begin{abstract}
We model the advective Marangoni spreading of insoluble surfactant at the free surface of a viscous fluid that is confined within a two-dimensional rectangular cavity.  Interfacial deflections are assumed small, with contact lines pinned to the walls of the cavity, and inertia is neglected.  Linearizing the surfactant transport equation about the equilibrium state allows a modal decomposition of the dynamics, with eigenvalues corresponding to decay rates of perturbations. Computation of the family of mutually orthogonal two-dimensional eigenfunctions reveals singular flow structures near each contact line, resulting in spatially oscillatory patterns of wall shear stress and a pressure field that diverges logarithmically.  These singularities at a stationary contact line are associated with dynamic compression of the surfactant monolayer. We  show how they can be regularized by weak surface diffusion. Their existence highlights the need for careful treatment in computations of unsteady advection-dominated surfactant transport in confined domains.
\end{abstract}

\begin{keywords}
% Interfacial Flows; Contact lines; Low-Reynolds-number Flows
\end{keywords}

\section{Introduction}

Surfactants play a crucial role in a variety of natural and industrial flows \citep{kovalchuk2020}, including cleaning and decontamination \citep{landel2021}, transport in lung airways \citep{filoche2015, stetten2018}, and microfluidic applications \citep{temprano2018soap}.  Understanding how surfactants equilibrate near contact lines is also  important for flows over superhydrophobic surfaces, and slippery-liquid-infused-porous-surfaces (SLIPS) \citep{wang2020comparison}. As recently shown, surfactants can significantly affect the drag reducing properties of superhydrophobic surfaces when a flow concentrates them at stationary contact lines \citep{baier2021, landel2020, peaudecerf2017}. Surfactants are amphiphilic materials that accumulate at interfaces, where they lower surface tension.  Surfactant concentration gradients induce surface tension gradients, leading to so-called Marangoni flows of adjacent liquids that transport the surfactant itself \citep{manikantan2020}.  Here, we address a canonical surfactant transport problem in a two-dimensional confined geometry, showing how singular flow structures arise when spreading is impeded by a solid boundary.  

The self-induced spreading of a surfactant monolayer over a gas--liquid interface generates a variety of striking flow features \citep{afsar2003, matar2009dynamics, liu2019}.   If surface diffusion and solubility effects are weak, the leading edge of a localised surfactant monolayer spreading on an otherwise uncontaminated interface effectively rigidifies the interface locally.  For a monolayer spreading on a thin viscous film, this induces a jump in film depth via mass conservation effects \citep{dussaud2005, gaver1990dynamics}, that is captured within lubrication theory as a kinematic shock \citep{borgas1988monolayer}.  Lubrication theory also predicts a jump in surface shear stress, although a more refined analysis over shorter lengthscales reveals an integrable shear-stress singularity at the  leading edge of the monolayer, which can be regularised by surface diffusion or the presence of low levels of pre-existing (endogenous) surfactant \citep{jensen1998stress1}.   Out-of-plane displacement of the free surface may be suppressed by surface tension or gravity \citep{gaver1992droplet, jensen1992insoluble}. Inertial effects (which may be important if the initial spreading flow is sufficiently rapid) can generate an interfacial deflection at the  leading edge of the monolayer known as the Reynolds ridge, arising due to displacement effects in the viscous boundary layer beneath the spreading monolayer \citep{scott1982, jensen1998stress2}.   Spreading on thin films may also be accompanied by dramatic secondary fingering instabilities \citep{warner2004, jensen2006, liu2019}, showing the richness of surfactant flow phenomena.

The present paper addresses a complementary spreading problem, namely  surfactant spreading at the free surface of viscous fluid that is confined within a two-dimensional cavity.  We make a number of simplifying assumptions to aid our analysis: the free surface remains (almost) flat as a result of a restoring force, provided for example by surface tension, with contact lines pinned to the lateral walls of the cavity; the surfactant is insoluble and has a linear equation of state (a weakness discussed by \cite{swanson2015}); inertial effects are neglected and the Stokes flow is two-dimensional; molecular diffusion of surfactant at the free surface is  assumed negligible, except when analysing its impact on the regularisation of the singularities at the contact line; and the interface is pre-loaded with endogenous surfactant, to which exogenous surfactant is added. These modelling assumptions and their implications are discussed further in \S\ref{sec:disc}.

The aim of this study is to describe 
% the manner in which surfactants equilibrate under a self-induced Marangoni flow 
the interfacial and bulk transient flows produced by  self-induced Marangoni spreading of surfactant in a confined geometry. Exogenous surfactant added to the interface spreads, compressing the endogenous surfactant ahead of it \citep{grotberg1995, sauleda2021}.   Since the surfactant monolayer is laterally confined, the surfactant concentration rises at the pinned contact lines, while Marangoni stresses drive further surfactants towards the stationary boundary. Although there is no  motion of the contact line with respect to the solid wall, and therefore no risk of generating a non-integrable stress singularity associated with contact line motion \citep{huh71}, we nevertheless find that the unsteady Marangoni flow generates its own singular flow behaviour. We find two separate classes of singularities generated at the corner, one inducing an oscillatory shear stress pattern and the other a logarithmic pressure singularity.
In the main part of the paper, we focus our study to the case of a single-fluid flow with a free surface pinned at the contact line at an angle of $\pi/2$. This special case simplifies the numerical simulation and asymptotic analysis. In \S\ref{sec:disc} we relax these assumptions and discuss other wedge angles, between $0$ and $\pi$, and  two-fluid flows with arbitrary viscosities and where the surfactants lie at the interface. Our asymptotic analysis shows that the structure of the flow and the type of singularities identified for the single-fluid flow with $\pi/2$ contact-angle extend to this broader class of problems.

These findings complement studies of the lid-driven and shear-driven cavity problems \citep{shankar00},  benchmark problems for computational fluid dynamics, for which corner singularities are a recognised computational challenge \citep{kuhlmann2019}. Rather than tackle the full unsteady nonlinear problem numerically, our approach is to address the problem of small surfactant gradients, allowing the advective surfactant transport equation to be linearized.  When coupled to the linear Stokes flow in the cavity, we derive a problem that admits a decomposition into eigenmodes, with each eigenvalue representing the decay rate of a particular modal disturbance. This approach allows us to focus our numerical effort on capturing spatial structures.  While the temporal dynamics resembles a purely diffusive process, with mutually orthogonal modes decaying exponentially in time, each eigenmode has a singular form near the contact lines in the absence of surface diffusion.  We combine asymptotic and numerical approximations to obtain a full understanding of the flow structure at the interface and in the bulk.  

The model and the methods used to solve this surfactant Marangoni-driven cavity flow problem are described in \S\ref{sec:model}, with results presented in \S\ref{sec:results}.  Implications of the study are discussed in \S\ref{sec:disc}.


%The full set of governing equations that describe the spreading of surfactant in two dimensions is too large a system to easily solve numerically. We would like some simplification of these equations. The most common way this has been done in the past is with lubrication theory. A lot of nice results have been found using this method, but these are only relevant to a limited class of problems where we are justified in using the lubrication theory limit.

%We will show that the governing equations can be nicely simplified, and useful results obtained relevant in non lubrication theory situations for two dimensional Stokes flow using an ansatz for the form of the surfactant concentration profile. Using this, we can show we are able to obtain an infinite set of solutions such that any profile can be represented as a linear sum of modes of the form of the ansatz.

%The problem that we arrive at using this method has singularities at the top corners of the rectangular domain. We provide an asymptotic solution about these singular corners, and show that the surface stress caused by the spreading surfactant has an interesting behaviour, oscillating about a constant infinitely often with exponentially decreasing amplitude and wavelength as we get closer to the corner.

\section{Model}
\label{sec:model}

\begin{figure}
	\centering	\includegraphics[width=0.5\textwidth]{figure1.eps}
	\caption{Diagram of the two-dimensional rectangular domain of the  flow problem. The flow is confined within rigid walls (hashed lines) and a free surface, for $-W^*\leq x^* \leq W^*$ and $-H^*\leq y^* \leq 0$. The incompressible Stokes flow in the bulk has velocity $u^*$ in the $x^*$ coordinate direction, and $v^*$ in the $y^*$ direction. At the free surface located at $y^*=0$ and $-W^*\leq x^* \leq W^*$, {an arbitrary initial non-uniform concentration profile of surfactant leads to an unsteady Marangoni flow that drives the flow in the bulk. The arbitrary initial concentration profile can be formed by  exogeneous surfactant (in red) deposited on the free surface at $t^*=0$, and some pre-existing endogenous surfactant with uniform concentration (in blue)}.}
	\label{fig:Domain}
\end{figure}

% \subsection{Dimensional model}

We model the spreading of an insoluble surfactant at the surface of an incompressible liquid of dynamic viscosity $\mu^*$ in a two-dimensional rectangular domain. The domain $V$ spans from $-W^* \leq x^* \leq W^* $ and $-H^*\leq y^* \leq 0$ with $x^*$ and $y^*$ in the horizontal and vertical directions, respectively, with $W^*$ the half width of the cavity,  $H^*$ its height, as shown in figure \ref{fig:Domain}.  Stars in superscript indicate dimensional variables. To model the flow induced by the surfactant spreading at the free surface, we  use the Stokes equations to relate the velocity field $\mathbf{u}^*(\mathbf{x}^*,t^*)=(u^*,v^*)$ to the pressure $p^*(\mathbf{x}^*,t^*)$, with $\mathbf{x}^*=(x^*,y^*)$ ignoring gravity and inertia. We impose the no slip and no penetration conditions on the three solid boundaries found at $x^*=-W^*$ and $W^*$ for $-H^*\leq y^*\leq0$ for the side walls, and $y^*=-H^*$ for $-W^*\leq x^*\leq W^*$ for the bottom wall. The free surface $\mathcal{F}$, assumed flat to leading order, is located at  $y^*=0$ for $-W^*\leq x^*\leq W^*$. % We also assume an (almost) flat surface, using the normal stress condition later on to derive the induced deflection, but retaining the tangential stress condition at the surface to balance shear stress at the surface of the liquid 
We balance the  Cauchy stress $\boldsymbol{\sigma}^*\cdot \mathbf{n}$ at $\mathcal{F}$ (with the normal unit vector $\mathbf{n}=(0,1)$) with the gradient of the surface tension $\gamma^*$ tangentially and a restoring force due to strong surface tension normally.  The insoluble surfactant concentration $\Gamma^*$ at the surface is coupled to the flow via a time-dependent advective transport equation, and to the surface tension via an equation of state, assumed linear, which is valid for small variations of the concentration of surfactant from a reference concentration \citep{stone1990effects}.  %or for small variations in surfactant concentration about a mean value.   % relates surface tension and surfactant concentration, which we will take as given by the linear approximation in (CITE). So our 
The governing equations are therefore
%\begin{subequations}
\begin{align}\label{eq:goveq}
		\boldsymbol{\nabla}^* p^* &=  % - \mathbf{g} +  
		\mu^*\nabla^{*2} \mathbf{u}^*, \quad 
		\boldsymbol{\nabla}^*\cdot \mathbf{u}^* = 0, \quad
	\Gamma^*_{t^*} = - \frac{\partial}{\partial x^*} %  \fp{}{y^*}{}
	\left(u_s^*\Gamma^* \right), \quad
	% \gamma^* &=
	\gamma^* = \gamma_0^* - (\gamma_0^* - \gamma_c^*) \frac{\Gamma^*}{\Gamma_c^*},
\end{align}
%\end{subequations}
where subscript $s$ denotes evaluation on $\mathcal{F}$, $\gamma_0^*$ is the reference surface tension and $\gamma_c^*$ is its (lower) value when the surfactant is at a reference concentration $\Gamma_c^*$. % We note that the linearized version of the equation of state (last equation in (\ref{eq:goveq})) results from our assumption that $\Gamma^*/\Gamma_c \ll 1$. 
The  boundary conditions associated with (\ref{eq:goveq}) are
\begin{subequations}
\begin{align}
	\mathbf{u}^* &= \mathbf{0} \quad \text{ on } x^*=\pm W^*, \quad y^*=-H^*,
	\\
	\mathbf{u}^* \cdot \mathbf{n} &= 0 \quad \text{ on } y^*=0,
	\\
		\boldsymbol{\sigma}^* \cdot \mathbf{n} &= -\gamma^* \mathbf{n} (\boldsymbol{\nabla}^*\cdot \mathbf{n}) + \frac{\partial \gamma^*}{\partial x^*} %\fp{\gamma^*}{y^*}{} 
		\mathbf{t} \quad \text{on} \quad \mathcal{F},
\end{align}
\label{eq:bcs}
\end{subequations}
with $\mathbf{t}=(1,0)$ the tangential unit vector at the free surface. We have made the assumption that $S^*= \gamma_0^*-\gamma_c^*\ll \gamma_c^*$, so that the  surface tension remains sufficiently large, in comparison to its reduction by surfactant $S^*$, to suppress deflections of the free surface from $y^*=0$. Effectively, the  capillary number in our problem is $S^*/\gamma_c\ll 1$, since $S^*$ is a characteristic viscosity--velocity scale. This small capillary number assumption is discussed further in \S\ref{sec:results} and \ref{sec:disc}.  Hence, the leading-order kinematic boundary condition reduces to (\ref{eq:bcs}b) and any surface curvature can be neglected, such that $W^*\boldsymbol{\nabla}^*\cdot \mathbf{n}\ll 1$. We will exploit the normal stress condition later to evaluate the small surface deflections induced by the flow, while imposing the tangential component of (\ref{eq:bcs}\textit{c}) on $\mathcal{F}$.

% \subsection{Non-dimensionalisation and scaling}

Using the length scale $W^*$, velocity scale $S^*/\mu^*$ and pressure scale $S^*/W^*$, we relate dimensional starred variables to their dimensionless counterparts via 
%The typical length scale we use in the $y$ direction is the length of one half of the domain, $D$. We use the convention that variables without a $^*$ refer to non-dimensional quantities. The scale in the vertical coordinate direction $y$ is also scaled by $D$, as is the height of the domain. We use the saturation concentration of surfactant $\Gamma_c$ to scale the concentration of surfactant $\Gamma^*$, and the surface tension of the fluid corresponding to saturation $\gamma_c$ to scale the surface tension $\gamma^*$. If we call $\gamma_0$ the surface tension of the liquid when no surfactant is present then the Marangoni force that drives the spreading is $S=\gamma_0-\gamma_c$. The scaling of the velocity $v^*$ in the $y$ coordinate direction, is $ S/\mu$, and this is also the scale for $W$, the velocity in the $y$ direction. We can find a time scale $D \mu / S$ by dividing the length scale by the velocity scale. The natural pressure scale $S/D$ comes from the non-dimensionalisation of the momentum equations. Therefore the non-dimensional variables (un-starred) we use are
%\begin{samepage}
\begin{subequations}
	\begin{equation}
\mathbf{x}= (x,y)= \left(\frac{x^*}{W^*},\frac{y^*}{W^*} \right), \quad  H=\frac{H^*}{W^*}, \quad \Gamma = \frac{\Gamma^*}{\Gamma_c^*}, \quad \gamma = \frac{\gamma^*-\gamma_c^*}{S^*},
	\end{equation}
%	\nopagebreak
	\begin{equation}
\mathbf{u}=(u,v)=\frac{\mu^*  }{ S^*}(u^*,v^*), \quad t = \frac{S^* t^* }{W^* \mu^*}, \quad p = \frac{ W^* p^*}{S^*}.
	\end{equation}
%\end{samepage}
\label{scales}
\end{subequations}
%\subsection{Governing equations}
After rescaling, the governing equations become, in the bulk,
\begin{subequations}
\begin{equation}
% \label{Stokes}
	\begin{pmatrix}
		p_x \\ p_y
	\end{pmatrix} = 
	\begin{pmatrix}
		u_{xx} +u_{yy} \\ % -G +
		v_{xx} +w_{yy}
	\end{pmatrix}, \quad
  u_x+v_y = 0 ,\quad 
\label{incompessibility}
%\end{equation}
%subject to 
% \begin{equation}
	\gamma = 1 - \Gamma,
\end{equation} 
with, at the free surface,
\begin{equation}% \label{B11}
		{ \Gamma}_{ t} = - (\Gamma u)_x , \quad
 u_y = - \Gamma_x, \quad
v = 0, \quad \text{ on } y = 0
 \label{B13}
\end{equation}
and
\begin{equation}
\label{B12}
	\mathbf{u} = \mathbf{0}, \quad \text{ on } x=\pm1, \text{ and }  y = -H.
\end{equation}
\end{subequations}
%\subsection{Formulation of the problem}
We introduce a stream function $\psi(x,y,t)$ such that $\psi_y=u$, and $\psi_x=-v$, enforcing incompressibility.  The problem reduces to the biharmonic equation in the bulk
% Equation \eqref{incompessibility} is then immediately satisfied, and equation \eqref{Stokes} becomes
% \begin{equation}
%	\begin{pmatrix}
%		p_y \\ p_z
%	\end{pmatrix}
%	=
%	\begin{pmatrix}
%		\psi_{zyy} + \psi_{zzz} \\
%		-G - \psi_{yyy} -\psi_{yzz}
%	\end{pmatrix}
% end{equation} by taking the derivative of the first component with respect to  $z$, and the second % with respect to $y$ we can combine these to get
%
% \begin{equation}
%	\psi_{zzzz} +\psi_{zzyy} =  - \psi_{yyyy} - \psi_{yyzz}
% \end{equation} we can write this as
\begin{equation}
	\nabla^4 \psi = 0
	\label{eq:bih}
\end{equation} 
subject to
%This needs to be solved according to the following boundary conditions which are equivalent to the boundary conditions \eqref{B11} to \eqref{B13}
\begin{subequations} 
\label{UnIntegratedBoundaryCond}
\begin{gather}
%\end{equation}
%\begin{equation}
\Gamma_t=-(\Gamma \psi_y)_x,\quad	 \psi_{yy} = -\Gamma_{x}, \quad \psi=0 \quad \text{on} \quad y=0, \label{UnIntegratedBoundaryConda} \\
	\psi_x(\pm 1,y) = \psi(\pm 1,y) = 0, \\ % = \psi_x(1,y) = \psi(1,y) =0, \\
	\psi(x,-H)=\psi_y(x,-H) = 0.
%\end{equation}
%\begin{equation}
\end{gather} 
\end{subequations}
The stream function vanishes at the four boundaries of the domain, in order to impose the no-flux boundary condition. The problem is closed by imposing an initial surfactant profile, representing the addition of exogenous surfactant to an  endogenous monolayer initially present on the interface. We note that the transport equation (\ref{UnIntegratedBoundaryCond}a) is linear in $\Gamma$, given a surface velocity $\psi_y$.  Therefore writing $\Gamma$ as the sum of endogenous and exogenous components, $\Gamma=\Gamma_1+\Gamma_2$ say, the two components satisfy the same transport equation $\Gamma_{it}=-(\Gamma_i\psi_y)_x$ ($i=1,2$), allowing the evolution of the components to be tracked individually if necessary \citep{grotberg1995}. From (\ref{UnIntegratedBoundaryCond}\textit{a,b}) we anticipate the presence of singularities at the contact lines $(x,y)=(\pm 1,0)$, as the boundary conditions are discontinuous here. We discuss these in detail in \S\ref{sec:corners} below, to understand their impact on the surface and bulk velocity fields and the surfactant distribution.
 
\subsection{Linearization}\label{sec:linearization}

At large times, the surfactant relaxes to a uniform level $\bar{\Gamma}$ and the velocity field decays to zero.  We perturb the system around this state, noting that the resulting problem is homogeneous.  We decompose the solution into individual eigenmodes, writing for one such mode %This problem however involves an unknown surfactant concentration profile. Now comes the key idea where we make the ansatz 
\begin{equation}
	\Gamma(x,t) = \bar{\Gamma} + \hat{\Gamma}(x)e^{-\lambda t}, \quad \mathrm{where}\quad \int_{-1}^1 \hat{\Gamma}(x)\,\mathrm{d}x=0,
	\label{eq:larget}
\end{equation} 
assuming the same time-dependence for other variables, for example $u(x,y,t) = \hat{u}(x,y)e^{-\lambda t}$.  The surfactant transport equation at the free surface (first equation in \eqref{UnIntegratedBoundaryConda}) is the only equation that changes under linearization, becoming
%\begin{equation}
%	\Gamma_t = -(\Gamma u_s)_x = -\Gamma_xu_s - \Gamma u_{sx}
%\end{equation} The stress condition at the surface is $u_y = -\Gamma_x$, which means that it also must %be the case that . Putting these into the surfactant transport equation we get
%\begin{equation}
%	-\lambda \widehat{\Gamma}(x) e^{-\lambda t}= -\widehat{\Gamma}_x(x)\widehat{u}_s(x)e^{-2\lambda t} - \bar{\Gamma}\widehat{u}_{sx}(x)e^{-\lambda t} - \widehat{\Gamma}(x)\widehat{u}_{sx}(x)e^{-2\lambda t}
%\end{equation} If we assume $t$ is large we are left with
%\begin{equation}
\begin{equation}
\alpha \hat{\Gamma} = \hat{u}_{x}, \quad \text{on } y=0,
\label{eq:bc4}
\end{equation}
where $\alpha = \lambda/\bar{\Gamma}$. Equation (\ref{eq:bc4}) is valid for small surfactant concentration perturbation, or at large times since we assume $\vert \hat{\Gamma}(x)\vert e^{-\lambda t}\ll \bar{\Gamma}$.
% \end{equation} 
Equation (\ref{eq:bc4}) may be combined with 
% Taking the derivative of this with respect to $x$ and using 
the stress condition $\Gamma_x = - u_y$ to give the homogeneous boundary condition
\begin{equation}
	-\alpha \hat{u}_{y} = \hat{u}_{xx}, \quad \text{on } y=0.
\end{equation}
%\subsection{Full statement of problem}
The resulting eigenvalue problem for the perturbation stream function may then be stated as the biharmonic equation (\ref{eq:bih}), under the boundary conditions (\ref{UnIntegratedBoundaryCond}\textit{b,c}) for $\hat{\psi}$ and
%\begin{equation}
%	\nabla^4 \psi = 0,
%\end{equation} subject to
%\begin{equation}
%	\psi(x,-H)=\psi_z(x,-H) = 0,
%\end{equation}
%\begin{equation}
%	\psi_x(-1,y) = \psi(-1,y) = \psi_x(1,y) = \psi(1,y) =0,
%\end{equation}
\begin{equation}
	\alpha \hat{\psi}_{yy} = -\hat{\psi}_{xxy} \qquad \hat{\psi}=0, \quad \text{on } y=0.
	\label{eq:bc3}
\end{equation}
We seek the set of decay rates  $\alpha_n$, $n=1,2,\dots$, which are  eigenvalues for which a solution exists with the corresponding eigenmodes $\hat{\psi}_n$. We distinguish two families for the decay rates $\alpha_n$ and eigenmodes $\hat{\psi}_n$, such that $\hat{\psi}_n$ is either an even or odd function of $x$. For the rest of this study the subscript $n$ will refer to the odd modes  unless otherwise specified. From each of these eigenmodes and eigenvalues we can derive the associated surfactant distribution $\hat{\Gamma}_n$, the shear stress at the free surface $\tau_n(x) = \partial \hat{u}_{n}(x,0)/\partial y $, the vorticity field $\hat{\omega}_n = -\nabla^2\hat{\psi}_n$, and the pressure field $\hat{p}_n$, obtained from the vorticity via $\nabla \hat{p}_n = (-\partial \hat{\omega}_n/\partial y,\partial \hat{\omega}_n/\partial x)$.  

This problem has two key global characteristics.  An energy dissipation argument (see Appendix~\ref{app:energy}) shows that all the decay rates satisfy
\begin{equation}
    \alpha_n=\frac{\int_V \hat{\omega}_n^2 \,\mathrm{d}A}{\int_{-1}^1 \hat{\Gamma}_n^2 \, \mathrm{d}x},
    \label{eq:energy}
\end{equation}
where $V$ is the rectangular flow domain (see figure~\ref{fig:Domain}).  Application of the reciprocal theorem \citep{masoud_stone_2019} %equivalently, recognition that the problem is self-adjoint, 
(see Appendix~\ref{app:ortho}) yields the orthogonality condition
\begin{equation}\label{eq:orthcond}
    \int_{-1}^1 \hat{\Gamma}_m \hat{\Gamma}_n \,\mathrm{d}x=0, \quad  \forall \ m\neq n.
\end{equation}
When solving an initial value problem with time-dependent surfactant and velocity fields, the condition (\ref{eq:orthcond}) can be used to project the initial condition for $\hat{\Gamma}$ onto its component modes. The initial Marangoni gradient that drives the flow can arise for example from the addition of exogenous surfactant to an otherwise uniform endogenous surfactant distribution. In this study, we do not track the interface between these distributions explicitly, and we assume that the exogenous and endogenous surfactant concentrations add together to form a single concentration field \citep{grotberg1995}.

\subsection{Finite-difference numerical solution}
\label{subsec:finitedifference}

% We solved using a finite difference method that was second-order accurate in space. 
% Details are provided in Appendix~\ref{app:fd}. 
We compute a numerical solution $\widetilde{\psi}_n$ (where a wide tilde denotes a numerically computed variable)  of the unknown perturbation modes of the stream function, $\hat{\psi}_n$, satisfying the biharmonic equation (\ref{eq:bih}) and the boundary conditions (\ref{UnIntegratedBoundaryCond}\textit{b,c}) and (\ref{eq:bc3}), using a finite-difference scheme. Using a row$\times$column ordering convention, the domain described in figure~\ref{fig:Domain} is discretized as an $M\times N$ rectangular grid, in the $y$ and $x$ directions, respectively, with uniform spacing $\Delta y$ and $\Delta x$, and supplemented with a set of ghost-points around the periphery creating an $(M+2)\times(N+2)$ grid. We use a second-order-accurate 13 point stencil, involving standard finite-difference approximations of derivatives \cite[see e.g.][]{fornberg1988generation}, to approximate the biharmonic operator in \eqref{eq:bih} on the grid of unknowns. These unknowns correspond to the unknown values of the perturbation stream function of a given mode at a given grid point $\widetilde{\psi}_n(x_j,y_i)$, with $3\leq i\leq M$, $3\leq j\leq N$. 
We impose $\widetilde{\psi}_n(x_j,y_i)=0$ at the boundaries of the domain $j=2$ and $j=N+1$, with $2\leq i\leq M+1$, and $i=2$ and $i=M+1$, with $2\leq j\leq N+1$, to implement the boundary conditions in (\ref{UnIntegratedBoundaryCond}\textit{b,c}) and (\ref{eq:bc3}) which state that the  stream function vanishes at all the boundaries. The $(M-2)\times(N-2)$ grid of unknowns is expressed as a column vector $\boldsymbol{\psi}$ which is assembled by the vertical concatenation of the rows of unknowns of $\widetilde{\psi}_n(x_j,y_i)$. The numerical operator modelling the biharmonic operator on the grid can then be approximated by a matrix operating on $\boldsymbol{\psi}$. The remaining no-slip boundary conditions in  (\ref{UnIntegratedBoundaryCond}\textit{b,c}) at the walls and the surfactant boundary condition in (\ref{eq:bc3}) at the free-surface can be approximated by a finite difference discretisation acting on the $M\times N$ grid and the ghost points. Values of the stream function at the ghost points are calculated as functions of the values in the interior points and added to the linear system such that the boundary conditions are satisfied. The system can then be rearranged so that $\boldsymbol{\psi}$ satisfies,
% \mathsf{A}^T\mathsf{L}^{-2}\mathsf{A}.
%We compute the stream function at each gridpoint, enforcing $\psi=0$ on the domain boundary %nodes and using ghost-points to implement boundary conditions (using second-order accurate %finite differences). The solution is expressed as a vector $\boldsymbol{\psi}$, satisfying
% This was expressed as a matrix vector equation for a vector $\boldsymbol{\psi}$ of the stream function evaluated at gridpoints,
\begin{equation}
	\mathsf{B} \boldsymbol{\psi}= \alpha\mathsf{C}\boldsymbol{\psi},
	\label{eq:fd}
\end{equation}
where $\mathsf{B}$ and $\mathsf{C}$ are sparse $(N-2)(M-2)\times (N-2)(M-2)$ matrices. Equation \eqref{eq:fd} represents a generalised numerical eigenvalue problem for the eigenmodes $\widetilde{\psi}_n$ and the associated numerically-calculated decay rates $\widetilde{\alpha}_n$, from the free-surface boundary condition (\ref{eq:bc3}). We solved \eqref{eq:fd} using the MATLAB function \texttt{eigs}.  From the solutions for each mode $\widetilde{\psi}_n$  we compute numerical approximations of all other quantities of interest for each mode, such as the surfactant concentration profile $\widetilde{\Gamma}_n(x)$, the surface stress $\widetilde{\tau}_n(x) = \widetilde{\psi}_{n,yy}(x,y=0)$, the velocity field $(\widetilde{u}_n,\widetilde{v}_n)(x,y)$, the vorticity field $\widetilde{\omega}_n(x,y)$, and the pressure field $\widetilde{p}_n(x,y)$. The solutions $\widetilde{\psi}_n$ are normalised by requiring $\max(\widetilde{\Gamma}_n(x)) - \min(\widetilde{\Gamma}_n(x)) = 1$ for each $n$.

\begin{table}
    \centering
    \begin{tabular}{c|c|c|c}
    \hline
   Even modes & Eigenvalue $\widetilde{\alpha}_n$ & Eigenvalue $\breve{\alpha}_n$ from \eqref{eq:energy} & Relative error $(\widetilde{\alpha}_n-\breve{\alpha}_n)/\widetilde{\alpha}_n$ \\ \hline
      1 &  0.57313 & 0.57290 & 0.00039  \\
      2 &  2.10723 & 2.10738 & -0.00007  \\
      3 &  3.67670 & 3.67710 & -0.00011  \\
      4 &  5.24715 & 5.24820 & -0.00020  \\
    %   5 &  6.81765 & 6.81982 & -0.00032  \\ 
      \hline
      Odd modes % & Eigenvalue $\alpha_n$ & Eigenvalue $\hat{\alpha}_n$ from \eqref{eq:energy} & Normalised error $(\alpha_n-\hat{\alpha}_n)/\alpha_n$ 
      \\ \hline
      1 &  1.29728 & 1.29725 & 0.00002  \\
      2 &  2.88997 & 2.89018 & -0.00007  \\
      3 &  4.46164 & 4.46232 & -0.00015  \\
      4 &  6.03235 & 6.03390 & -0.00026  \\
    %   5 &  7.60285 & 7.60581 & -0.00039  \\ 
      \hline
    \end{tabular}
    \caption{Decay rates predicted as eigenvalues $\widetilde{\alpha}_n$ computed numerically from (\ref{eq:fd}) compared to $\breve{\alpha}_n$, which are those computed from eigenmodes using (\ref{eq:energy}) for $H=2$, found using a $4000\times4000$ grid. The relative error provides a measure of global numerical error, suggesting that the values for $\widetilde{\alpha}_n$ are accurate up to three significant figures.}
\label{tab:decayrates}
\end{table}

We use global integrated measures to estimate the accuracy of the computational scheme, such as the energy balance (\ref{eq:energy}), see table~\ref{tab:decayrates}, and mode orthogonality, see Appendix \ref{app:ortho}. The  relative error of the decay rates computed directly as eigenvalues from \eqref{eq:fd} and indirectly from the eigenmodes via \eqref{eq:energy} (denoted as $\breve{\alpha}_n$) remains less than $4\times10^{-4}$ for all odd and even modes calculated (up to $n=4$) for $H=2$ using a $4000\times4000$ grid (see table~\ref{tab:decayrates}). For the same refinement and the same modes, the concentration profiles $\widetilde{\Gamma}_n$ are orthogonal with an absolute error less than $8\times10^{-6}$ (see \eqref{eq:ortho}). We use asymptotic methods, described below, to assess and contain (via global grid refinement) the inevitable local numerical inaccuracies associated with corner singularities at the contact lines $(x,y)=(\pm 1,0)$. 

\subsection{Corner asymptotics}
\label{sec:corners}

We anticipate from the outset the appearance of Moffatt vortices \citep{moffatt1964viscous} in the lower corners of the domain, at $(x,y) = (\pm 1,-H)$, as we will show in our results presented in \S\ref{sec:results}.  However, the structure of the flow %he problem as we have posed it involves a discontinuity of second derivatives 
at the top corners of the domain, where the surfactant-laden surface meets the wall, needs separate asymptotic treatment. %. The solution at the top corner is therefore singular and numerics relating to second derivative quantities breaks down near this corner, so we construct a local asymptotic solution.  
We illustrate this at the top left corner, introducing polar coordinates $(r,\theta)$ centred on $(x,y)=(-1,0)$ with $\theta=0$ along $y=0$ (and $r$ increasing in the positive $x$ direction) and $\theta=-\pi/2$ along $x=-1$ (and $r$ increasing in the negative $y$ direction) and  %We will do this in plane polar coordinates taking the left top corner as the origin. 
seeking separable solutions of the form
\begin{equation}
	\hat{\psi}(r,\theta) \approx \Re\left[ \sum_i A_i r^{\Phi_i} f_{\Phi_i}(\theta) \right], \quad \text{for} \ r\rightarrow 0.
	\label{eq:psiexp}
\end{equation} 
Here $\Re\left[\cdot\right]$ indicates taking the real part, noting that the amplitudes $A_i$ and exponents $\Phi_i$ of local modes of the biharmonic equation may be complex. We will find that the sum in (\ref{eq:psiexp}) is a sum of multiple countable series. For notational simplicity, we will use $\Phi$ to represent exponents, and we will suppress the subscript $n$ on $\hat{\psi}$ and $\alpha$ associated with each eigenmode. To satisfy the governing biharmonic equation (\ref{eq:bih}),  $\nabla^4\hat{\psi}(r,\theta)=0$, and the boundary conditions (\ref{UnIntegratedBoundaryCond}\textit{b,c}), $\hat{\psi}(r,0) = \hat{\psi}(r,-\pi/2) = \hat{\psi}_\theta(r,-\pi/2)=0$, 
% If we take solutions of this form, for them to satisfy the biharmonic equation, and the boundary conditions of no slip and no penetration on the side wall, and the boundary condition of a flat surface, 
starting from more general formulas for the $\theta$-dependent functions \citep{moffatt1964viscous}, we find that
% amplitudes have been removed from definition of f_i
\begin{subequations}
\begin{align}\label{f_1}
	f_1(\theta) &= % A_1\left(
	\frac{\pi}{2}\sin{\theta} - \frac{2}{\pi}\theta \cos{\theta} +\theta \sin{\theta} % \right) 
	 & (\Phi=1),\\
%\end{equation} 
%\begin{equation}
\label{f_2}
	f_2(\theta) &= % A_2\left(
	\cos{(2\theta)}-\frac{2}{\pi}\sin{(2\theta)} - \frac{4 \theta}{\pi} -1 % \right)
     & (\Phi=2),
\end{align}
and generally for $\Phi > 0$, $\Phi \neq 1,2$,
\begin{multline}\label{f_mu}
	f_{\Phi}(\theta) =% A_{\Phi} \bigg(
	\frac{\cos{(\Phi\pi/2)}\sin{(\Phi \pi/2)}}{\sin^2{(\Phi\pi/2)}-\Phi } (\cos{(\Phi\theta)}-\cos{((\Phi-2)\theta)})\\ + 
	\frac{\cos^2{(\Phi\pi/2)}-\Phi+1}{\sin^2{(\Phi\pi/2)}-\Phi }\sin{(\Phi\theta)}  +\sin{((\Phi-2)\theta)},% \bigg)
\end{multline} 
which in the special case of integer $\Phi$ reduces to
\begin{equation}\label{f_mu odd}
	f_{\Phi}(\theta) = 
\begin{cases}
	% A_{\Phi}(
	\sin{(\Phi\theta)}+\sin{((\Phi-2)\theta)}, %)
% $\end{equation} 
&  \quad $if $\Phi$ is an odd integer strictly greater than $1$,$ \\
\frac{\Phi-2}{\Phi} \sin(\Phi\theta)+\sin((\Phi-2)\theta),
% \begin{equation}\label{f_mu even}
%	f_{\Phi}(\theta) = A_{\Phi}\left(
%\frac{\Phi-2}{\Phi}  \sin{(\Phi\theta)}+\sin{((\Phi-2)\theta)}
% \right)
& \quad $if $\Phi$ is an even integer strictly greater than $2$.$ 
\end{cases}
\end{equation}  
\end{subequations}
%
% \subsubsection{Applying the stress boundary condition}
The final boundary condition, the surfactant boundary condition at the free surface in (\ref{eq:bc3}): $-\alpha \hat{\psi}_{yy} = \hat{\psi}_{xxy}$ at $y=0$, is, in polar coordinates,
\begin{equation}
	-\alpha\left( \frac{1}{r^2} \hat{\psi}_{\theta \theta} + \frac{1}{r} \hat{\psi}_{r}\right)
	=\frac{1}{r} \hat{\psi}_{rr \theta} -\frac{2}{r^2}\hat{\psi}_{r \theta} + \frac{2}{r^3} \hat{\psi}_{\theta}, \quad \text{for} \ \theta=0.
	\label{eq:topbc}
\end{equation} 
% So substituting in equation \eqref{AsympForm}, and using the fact that $\psi_r = 0$ at $\theta=0$,
% The above gives the general form for $\psi$ according to three of the four boundary conditions. 
Writing the first few terms in the expansion (\ref{eq:psiexp}) for $\hat{\psi}$ in the form
\begin{equation}\label{AsympForm}
	\hat{\psi}  = \Re \left[ A_a r^{a}f_a(\theta)+A_b r^bf_b(\theta)+ A_c r^cf_c(\theta)+\dots \right]
\end{equation} 
where $a$, $b$, $c$... are complex numbers (representing exponents $\Phi_i$) such that ${\Re}(a)<{\Re}(b)<{\Re}(c)$ and $A_a\neq 0$, % and the $f$ functions are of the same form as shown in equation \eqref{f_mu} to \eqref{f_1}, 
we obtain from (\ref{eq:topbc}) (after 
%\begin{multline}
%	-\alpha ( r^{a-2}f^{\prime \prime}_a(0) + r^{b-2}f^{\prime \prime}_b(0) + r^{c-2}f^{\prime \prime}_c(0) + \dots )	\\
%	 = \left(a^2-3a +2\right)r^{a-3}f_a^{\prime}(0) + \left(b^2-3b +2\right)r^{b-3}f_b^{\prime}(0) + \left(c^2-3c +2\right)r^{c-3}f_c^{\prime}(0) + \dots
% \end{multline} 
multiplying by $r^3$)
\begin{multline}\label{AsympRelation}
	-\alpha ( A_a r^{a+1}f^{\prime \prime}_a(0) + A_b r^{b+1}f^{\prime \prime}_b(0) + A_c r^{c+1}f^{\prime \prime}_c(0) + \dots ) 
	\\
	= \left(a^2-3a +2\right)A_a r^{a}f_a^{\prime}(0) + \left(b^2-3b +2\right)A_b r^{b}f_b^{\prime}(0) + \left(c^2-3c +2\right)A_c r^{c}f_c^{\prime}(0) + \dots
\end{multline} 
The $r^a$ term is dominant as $r \to 0$, imposing that
\begin{equation}\label{eq:fcondition}
	(a-1)(a-2)f_a^{\prime}(0)=0.
\end{equation} 
This equation opens multiple possibilities. % The quadratic term implies that $a=1$ or $a=2$.
The first case $a=1$ corresponds to a solution with non-integrable stress $\tau(r) = \hat{\psi}_{\theta \theta}(\theta=0)/r^2$, and therefore unbounded surfactant concentration as $r\rightarrow 0$, so we impose $A_1=0$.  This leaves two other cases: $a=2$ and $f^{\prime}_a(0)=0$.  The latter third case
yields an infinite set of complex exponents of the type described by  \cite{moffatt1964viscous}, each representing a homogeneous local solution, which we will analyse further below.  The expansion (\ref{eq:psiexp}) therefore constitutes multiple independent series.  % , and we will have an infinite set of these. This means we have an infinite set of first terms for asymptotic series, and so we will have an infinite series of infinite series.

% \subsubsection{The case where $a=2$}

In the second case, with $a=2$, \eqref{AsympRelation} becomes
\begin{multline}\label{eq:Case2balance}
    	-\alpha (A_2 r^{3}f^{\prime \prime}_2(0) + A_b r^{b+1}f^{\prime \prime}_b(0) + A_c r^{c+1}f^{\prime \prime}_c(0) + \dots ) = \left(b^2-3b +2\right)A_b r^{b}f_b^{\prime}(0)\\ + \left(c^2-3c +2\right)A_c r^{c}f_c^{\prime}(0) + \dots
\end{multline} 
The dominant balance  must be between the $r^b$ and $r^3$ terms since we imposed ${\Re}(a)<{\Re}(b)$, hence $b=3$. We then have
\begin{equation}\label{eq:A2A3}
	-\alpha A_2 f_2^{\prime \prime}(0) = 2A_3 f_3^{\prime}(0).
\end{equation} 
Using \eqref{f_2} and \eqref{f_mu odd} for $f_2$ and $f_3$, respectively, (\ref{eq:A2A3}) becomes
%\begin{equation}
$\alpha A_2 = 2A_3$.
% \end{equation} 
The next balance in \eqref{eq:Case2balance} gives 
% \begin{equation}
$-\alpha A_3 f_3^{\prime \prime}(0) = 6A_4 f_4^{\prime}(0)$,
% \end{equation} 
however from \eqref{f_mu odd} we can see that $f_3^{\prime \prime}(0)=0$, which implies that $A_4=0$ and  this series terminates. The first series contributing to $\hat{\psi}$ is therefore simply
\begin{multline}\label{eq:realseriesPsi}
	 % A_2r^2f_2(\theta) +\frac{1}{2}A_2 \alpha r^3 f_3{\theta} = 
	 A_2r^2 \left(f_2(\theta) +\frac{\alpha}{2} r f_3{(\theta)} \right)
	= \\
	A_2r^2\left(\cos{(2\theta)}-\frac{2}{\pi}\sin{(2\theta)} - \frac{4 \theta}{\pi} - 1 +\frac{\alpha}{2} r(\sin{(3\theta)}+\sin{\theta})\right).
\end{multline}

% \subsubsection{The case where $f_a^{\prime}(0)=0$}
In the third case, setting $f_a^{\prime}(0)=0$ in \eqref{eq:fcondition} (with $a\neq 1$ and $2$) %the boundary condition to equation \eqref{f_mu} 
gives 
\begin{equation}
	\frac{\cos^2{(a\pi/2)}-a+1}{\sin^2{(a\pi/2)}-a }a  +(a-2) = 0,
\end{equation} 
%rearranging
%\begin{equation}
%	(\cos^2{(a\pi/2)}-a+1)a  =-(a-2) (\sin^2{(a\pi/2)}-a )
%\end{equation}
%\begin{equation}
%	a\cos^2{(a\pi/2)}-a^2+a  =-(a-2) \sin^2{(a\pi/2)}+a^2-2a 
%\end{equation}
%\begin{equation}
%	a\cos^2{(a\pi/2)}  =-(a-2) \sin^2{(a\pi/2)}+2a^2-3a 
%\end{equation}
%\begin{equation}
%	a  =2 \sin^2{(a\pi/2)}+2a^2-3a 
%\end{equation}
%\begin{equation}
%	2a-a^2  = \sin^2{(a\pi/2)} 
%\end{equation} 
so that the complex roots satisfy
\begin{equation}
  \sin^2{(a\pi/2)} -a(2-a)=0.
	\label{eq:g}
\end{equation}  
We label the roots of (\ref{eq:g}) which have non-zero imaginary part as $a_1, a_2,\dots$ with $0<\Re (a_1)<\Re (a_2)<\dots$. The roots $a_i$ are independent of $H$, and correspond to the exponents in Moffatt's series \citep{moffatt1964viscous} for anti-symmetric Stokes flow in a right-angle corner subject to arbitrary disturbance at a large distance. The first five complex roots are shown in table~\ref{tab:1}.
\begin{table}
    \centering
    \begin{tabular}{l|l}
         $a_1 \approx 3.7396 + 1.1190 i \quad $ & $\quad K_{11} \approx -0.036666 + 0.076161 i$\\
         $a_2  \approx 5.8083 + 1.4639 i$  & $\quad K_{12} \approx 0.046960 + 0.002377 i$\\
         $a_3 \approx 7.8451 + 1.6816 i$ & $\quad K_{13} \approx -0.001195 + 0.000349 i$\\
         $a_4 \approx 9.8688 + 1.8424 i$ & $\quad K_{14} \approx 0.000198 + 0.000122 i$\\
         $a_5 \approx 11.886 + 1.9702 i$ & $\quad K_{15} \approx -0.000002 - 0.000002 i$
    \end{tabular}
    \caption{Left: Approximate numerical values of the first five complex roots $a_i$ of equation (\ref{eq:g}). These roots are the exponents in Moffatt's series for anti-symmetric Stokes flow \citep{moffatt1964viscous} subject to a disturbance at a large distance in the case of right-angle corners.  Right: approximate values of the first five coefficients $K_{ij}$ for the dominant root $i=1$ in the series expansion (\ref{eq:kseries}) associated with $\hat{\psi}$ and computed using \eqref{eq:Kij}. All of these quantities are independent of the global parameter $H$.}
    \label{tab:1}
\end{table}
%\begin{verbatim}
%	Exponents =
%	3.739593356324596 + 1.119024534342417i
%	5.808250761274225 + 1.463928121698337i
%	7.845135158415644 + 1.681634695817452i
%	9.868825977288248 + 1.842383988914041i
%	11.885552350111785 + 1.970199497044725i
% \end{verbatim} 
Each complex root $a$ generates its own asymptotic series of the form \eqref{AsympForm} with $a=a_i$, $b=b_i$, $c=c_i$, etc. where $0<\Re (a_i)<\Re (b_i)<\dots$, for $i=1,2,3,\dots$ For example, for $i=1$ 
% the first of these we say $a=3.7+1.1i$, and plug this 
 \eqref{AsympRelation} gives
\begin{multline}
	-\alpha ( A_{a_1} r^{a_1+1% 4.7+1.1i
	}f^{\prime \prime}_{a_1% 3.7+1.1i
	}(0) + A_{b_1} r^{b_1+1}f^{\prime \prime}_{b_1}(0) + A_{c_1} r^{c_1+1}f^{\prime \prime}_{c_1}(0) + \dots ) =   
	\\ \left(b_1^2-3b_1 +2\right)A_{b_1} r^{b_1}f_{b_1}^{\prime}(0) + \left(c_1^2-3c_1 +2\right)A_{c_1} r^{c_1}f_{c_1}^{\prime}(0) + \dots
\end{multline} 
such that the dominant balance is $b_1=a_1+1% 4.7+1.1i
$, requiring that
\begin{equation}
	-\alpha A_{a_1}	f^{\prime \prime}_{a_1 % 3.7+1.1i
	}(0)  = a_1(a_1-1)A_{b_1} f_{b_1 % 4.7+1.1i
	}^{\prime}(0),
\end{equation} 
with the approximate value of $a_1$ given in table~\ref{tab:1}.
From such relations for $a_1$, $b_1$, $c_1,\dots$ we can derive the associated contribution to $\hat{\psi}$, of the form
\begin{equation}
A_{a_1} \left( r^{a_1}f_{a_{1}}(\theta) +\alpha K_{11}  r^{a_1+1} f_{a_1+1}(\theta) + \alpha^2 K_{12} r^{a_1+2}f_{a_1+2}(\theta) + \dots \right),
\label{eq:kseries}
\end{equation} % and of course we just take the real part of this. 
where the first five coefficients $K_{1j}$ related to $a_1$ in (\ref{eq:kseries}) are shown in table~\ref{tab:1}. These coefficients can be computed through the recurrence relation

\begin{equation}\label{eq:Kij}
    K_{ij} = -\frac{K_{i(j-1)} f^{\prime \prime}_{a_i+j-1}(0)}{((a_i+j)^2-3(a_i+j)+2)f^{\prime }_{a_i+j}(0)},
\end{equation}
for integers $i\geq 1$ and $j\geq 1$ and with $K_{i0}=1$.

In summary, the full asymptotic series for the $n$th eigenmode in the neighbourhood of the contact line, which we originally stated in the form  \eqref{eq:psiexp}, is  
\begin{equation}
\hat{\psi}_n(r,\theta)=
A_{n2}r^2 \left[f_2(\theta) +\frac{\alpha_n}{2} r f_3{(\theta)} \right] + \Re\left[\sum_{i=1}^{\infty}A_{na_i} \left(\sum_{j=0}^\infty \alpha_n^j K_{ij} r^{a_i+j}f_{a_i+j}(\theta) \right)
\right].
\label{eq:psifull}
\end{equation} 
The coefficients $K_{ij}$ can be computed from the recurrence relation (\ref{eq:Kij}), whilst the coefficients $A_{n2}$ and $A_{na_i}$ must be determined from fitting to numerical solutions. Analysing (\ref{eq:psifull}) we can notice that $\hat{\psi}_n$ approaches different values as $r\to0$ for different values of $\theta$, capturing the stream function's singular behaviour in this limit. Away from the corner, the complex exponents involved in the second term of (\ref{eq:psifull}) produce oscillatory behaviour as a function of $r$, such that for the corresponding parameters, (\ref{eq:psifull}) is capable of producing Moffat-type eddies at the top corners, which are observed in the numerical solution for higher-order modes (shown in \S\ref{sec:results}). This is a local expansion at the top corner, however global information about the aspect ratio of the domain and the global symmetry or anti-symmetry of $\hat{\psi}_n$ enters into this expression through $\alpha_n$. 
We note for later reference that the surface shear stress $\tau_n(x)$ has the local form
\begin{equation}
    \hat{\tau}_n(x) = \left.\fp{\hat{u}_{n}}{y}{}\right|_{y=0} \approx -4A_{n2} + \Re \left\{ A_{na_1} (1+x)^{a_1-2} f_{a1}''(0) +\dots \right\} \quad\mathrm{as} \quad x\rightarrow -1,
    \label{eq:shearwall}
\end{equation}
which has a non-zero asymptotic value at the contact lines $\hat{\tau}_n(-1)= - 4A_{n2}$. Moreover, the complex roots $a_i$ imply that the value of the shear stress oscillates as $x\to -1$. Near the contact line $(x,y)=(-1,0)$, the leading-order surfactant distribution has a finite non-zero gradient, computed from (\ref{eq:bc4}), 
\begin{equation}
    \hat{\Gamma}_n(x) \approx -\frac{8A_{n2}}{\pi\alpha_n}+4A_{n2}(1+x)+\dots \quad\mathrm{as} \quad x\rightarrow -1.
     \label{eq:Gamma}
\end{equation}
The leading-order vorticity near the contact line $(x,y)=(-1,0)$ has the form
\begin{equation}
\hat{\omega}_n\approx 4A_{n2}\left(1+\frac{4}{\pi}\tan^{-1}\frac{y}{1+x}\right)+\dots, 
    \label{eq:vortcorner}
\end{equation}
which shows that the vorticity is multi-valued at the corner owing to the singularity and depending on the angle of approach. From the vorticity, we find that the leading-order pressure locally is
\begin{equation}
\hat{p}_n\approx -\frac{8A_{n2}}{\pi}\log(y^2+(1+x)^2)+\dots,
\label{eq:presswall}
\end{equation}
which shows that the pressure diverges in a logarithmic fashion at the corner. The above expressions give the local expansion at the top left corner of the domain. A similar expansion is then trivially obtained at the top right corner by symmetry. These asymptotic results complement the numerical solutions, less accurate near the contact lines $(x,y)=(\pm1,0)$, providing a complete understanding of the effect of the corner singularities on the relevant physical quantities in this problem.
  
\section{Results}
\label{sec:results}

Figure~\ref{fig:Alphas}(\textit{a}) shows how the decay rates  $\widetilde{\alpha}_n$ of the odd and even modes, computed numerically from the eigenvalue problem (\ref{eq:fd}), vary with the depth of the domain $H$.  The decay rates become independent of the cavity depth for $H\gtrapprox 2$.  % indicating that the flow which means that the way the surfactant spreads on the surface is not affected by the height of the liquid, so long as $H\approx>1.75$.  
We can find an exact asymptotic expression for the odd and even decay rates in the limit $H\to 0$ using a lubrication approximation  (see Appendix~\ref{app:thin})
\begin{equation}
    \alpha_n \to \frac{n^2\pi^2 H}{4}, \ \text{(odd modes)}, \quad \alpha_n \to \frac{(2n-1)^2\pi^2H}{16} \ \text{(even modes)},
    \label{eq:alphalubapprox}
\end{equation}
as shown with dashed lines in figure~\ref{fig:Alphas}(\textit{a}) for the first two odd and even modes. The surfactant concentration profiles of the corresponding modes are shown in figure~\ref{fig:Alphas}(\textit{b}) (using the same colours as  in figure~\ref{fig:Alphas}\textit{a}). All the surfactant profiles have a non-zero finite value and slope at the boundaries $x=\pm1$, as anticipated from (\ref{eq:Gamma}). We compute the dominant singularity strength $-4A_{n2}$  from the slope of the surfactant profile at the boundaries $x=\pm1$ according to (\ref{eq:Gamma}).

\begin{figure}
	\centering
	\begin{subfigure}{0.495\textwidth}
		\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure2a.eps}
		\caption{}
	\end{subfigure}
	\begin{subfigure}{0.495\textwidth}
		\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure2b.eps}
		\caption{}
	\end{subfigure}
	\caption{(\textit{a}) Decay rates computed numerically by solving \eqref{eq:fd} (solid lines) as functions of $H$, and  compared to the analytical predictions obtained from lubrication theory (\ref{eq:alphalubapprox}) in the limit $H\to 0$ (dashed lines).  (\textit{b})  Plots of the surfactant concentration profiles (using the same colour code as in (\textit{a})) for the first two even and two odd modes for $H=2$ using a solution for the streamfunction  $\widetilde{\psi}_n$ calculated numerically using $4000\times4000$ gridpoints. 
	}
	\label{fig:Alphas}
\end{figure}


The contour plots computed numerically in figure~\ref{fig:firstmode}(\textit{a,b}) show the stream function and vorticity of the dominant mode (first odd eigenmode $n=1$) for $H=2$.  Weak Moffatt eddies can be seen in the lower corners of the cavity $(x,y)=(\pm 1,-2)$.  Vorticity contours converge at the upper corners, indicating that $\hat{\omega}$ is multivalued there, consistent with (\ref{eq:vortcorner}). The numerical results of the contour plot of the stream function in a deep channel with $H=8$, as shown in figure~\ref{fig:firstmode}(\textit{c}), reveals a sequence of recirculations. The strength of the stream function decreases rapidly with increasing depth, by approximately three orders of magnitude for the amplitude of the stream function  between successive cores.   In a shallow channel with $H=0.2$ (figure~\ref{fig:firstmode}\textit{d}), elongated eddies appear, consistent with predictions of lubrication theory.


\begin{figure}
	\centering
	\begin{subfigure}{0.49\textwidth}
	        \begin{subfigure}{\textwidth}
	            \includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure3a.eps}
		\vspace*{-5mm}
	       	\caption{}
	        \end{subfigure}
	        \begin{subfigure}{\textwidth}
	            \includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure3b.eps}
		\vspace*{-5mm}
	       	\caption{}
	        \end{subfigure}
	\end{subfigure}
	\begin{subfigure}{0.37\textwidth}
    	\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure3c.eps}
    	\vspace*{-8mm}
    	\caption{}
	\end{subfigure}
	\begin{subfigure}{\textwidth}
	\centering
    	\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure3d.eps}
    	\caption{}
	\end{subfigure}
	\caption{Contour plots of the dominant mode, the first  odd eigenmode ($n=1$), computed from numerical simulations in a square domain $(H=2)$, showing  (\textit{a}) the stream function and (\textit{b}) the vorticity. Similarly, (\textit{c}) shows numerical results of the contour plots of the stream function for the dominant mode (odd mode $n=1$) in a deep domain $(H=8)$ and (\textit{d}) a shallow domain $(H=0.2)$.  }
	\label{fig:firstmode}
\end{figure}

Figure~\ref{fig:StressAsymp}(\textit{a}) shows the surface shear stress, computed numerically from the viscous-Marangoni stress condition $\widetilde{\tau}(x)=-\widetilde{\Gamma}_x(x)$, for the dominant mode (first odd mode, $n=1$) for $H=2$, revealing an oscillatory structure near the contact lines as $x\rightarrow\pm 1$, consistent with (\ref{eq:shearwall}).  The log--log plot in figure~\ref{fig:StressAsymp}(\textit{b}) reveals in more detail how the stress calculated from the numerical solution matches against the stress found using the asymptotic approximation (\ref{eq:shearwall}).  The finite difference approximation, with a finite grid size, necessarily fails to capture the increasingly short-wavelength oscillations as $x\rightarrow -1$ (as plotted with dashed lines when $1+x\leq100\Delta x$), and the asymptotic solution can be expected to fail as $1+x$ becomes too large.  However, there is an overlap region (indicated by solid lines for the numerical results), which grows in size with increasing grid resolution, over which the agreement is sufficiently strong to provide confidence in the numerical predictions throughout the rest of the domain. Thus, at the maximum grid resolution ($\Delta x=1/8000$) the numerical results are close to the asymptotic results for $\log(1+x)\approx -1.8$. We note that the asymptotic results could be made more accurate by including more terms in the series (\ref{eq:shearwall}), which would for instance show variations in the wavelength of the shear stress oscillations as $x\to-1$. However, the dominant odd mode $n=1$ clearly captures the oscillatory behaviour of the shear stress near the corner.

\begin{figure}
	\begin{subfigure}{0.49\textwidth}
		\includegraphics[trim={0cm 0cm 1.75cm 0cm},clip,width=\textwidth]{figure4a.eps}
		\caption{}
	\end{subfigure}
	\begin{subfigure}{0.49\textwidth}
		\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure4b.eps}
		\caption{}
	\end{subfigure}
	\begin{subfigure}{0.49\textwidth}
		\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure4c.eps}
		\caption{}
	\end{subfigure}
	\begin{subfigure}{0.49\textwidth}
		\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure4d.eps}
		\caption{}
	\end{subfigure}
	\caption{Distribution of the surface shear stress computed from the dominant mode, the first odd mode $n=1$.  (\textit{a}) Numerical results (red) versus asymptotic results including two terms in (\ref{eq:shearwall}) (blue) with coefficients $4A_{12}=1.216$ and $A_{1a_{1}}\approx-0.175e^{0.157i}$ which were locally optimised to fit the numerical solution.  (\textit{b})  Logarithmic plot showing similar results as in (\textit{a}) versus $\log(1+x)$. This reveals overlap between asymptotics and numerics for different grid resolutions; dashed lines for the numerical results are used for $1+x\leq100\Delta x$, where numerical errors increase. (\textit{c}) Distributions of the shear stress, calculated numerically and when surface diffusion is included following \eqref{eq:diffusionBC}. (\textit{d}) Semi-log plots of the profiles in (\textit{c}), with the horizontal coordinate scaled by $D$ in the inset. The dashed line in the main graph is the asymptotic value of the shear stress at $x=-1$, i.e. $\tau=-4A_{12}=-1.216$}
	\label{fig:StressAsymp}
\end{figure}

\subsection{Regularising the corner singularities}

The corner singularities can be regularised by adding a small amount of {surface} diffusion in the problem. In this case the transport equation for the surfactant, the first equation in (\ref{UnIntegratedBoundaryCond}\textit{a}),  modifies to
$\Gamma^*_{t^*} = -(\Gamma^* u^*)_{x^*} + D^*\Gamma^*_{x^*x^*}$,
in dimensional form with $D^*$ the surface diffusivity of the surfactant.
Hence, the stress boundary condition in the eigenvalue problem for the perturbation stream function (first equation in \eqref{eq:bc3})  becomes
\begin{equation}\label{eq:diffusionBC}
  \alpha\hat{\psi}_{yy} = -\hat{\psi}_{xxy} +D\hat{\psi}_{xxyy},
\end{equation}
where $D = D^*\mu^*/(W^*S^*\bar{\Gamma}$). We then specify an additional boundary condition and impose no-flux of surfactant, $\Gamma_x=0$, at the contact lines $(x,y)=(\pm1,0)$.  Thus, in the presence of weak surface diffusion, surface stress falls abruptly to zero in small boundary layers at the wall for ${D}\ll 1$ (figure~\ref{fig:StressAsymp}\textit{c}). Increasing ${D}$ causes the surface stress of the first odd mode $n=1$ to take a smoother more sinusoidal profile, revealing the impact of surface diffusion on the free surface.  The profile of the shear stress distribution near the contact line is shown in greater detail in figure~\ref{fig:StressAsymp}(\textit{d}) (using a logarithmic spatial scale), demonstrating its adjustment from the constant value $-4A_{n2}$ (value of the shear stress at the corner for $D=0$, plotted with a dashed line) to zero over a very short length scale.  Collapse of this data when $x$ is rescaled by ${D}$ (inset) provides evidence that weak surface diffusion regularises the singularity over a boundary layer of characteristic length scale ${D}$.



\begin{figure}
    \centering
    \begin{subfigure}{0.5\textwidth}
    \centering
   \includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure5a.eps}
    \caption{}
   \end{subfigure}
    \begin{subfigure}{\textwidth}
		\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure5b.eps}
		 \caption{}
	\end{subfigure}
	 \caption{(\textit{a}) Surface pressure profiles computed numerically for the different values of the diffusion constant $D$ given using the colours indicated in figure \ref{fig:StressAsymp}(\textit{c}). The inset shows a scaled semi-log graph showing the pressure profiles collapsing on to each other in a diffusive boundary layer located for  $x\in [-1,0]$ as $D$ decreases. (\textit{b}) Non-dimensional interfacial deflections (relative to the length-scale $W^* S^*/\gamma_0^*$), computed numerically as the leading-order correction to the flat state for the first two odd and even modes.}
	 \label{fig:pressure}
\end{figure}

We assumed initially that a restoring force is present that is sufficiently strong to suppress interfacial deflections by imposing a flat interface and ignoring the normal stress condition.  Given the singularity in the pressure at the contact lines (\ref{eq:presswall}), it is prudent to revisit this boundary condition.  Linearizing the normal stress condition around $y=0$, we can state this as $\widetilde{p}(x,0)-p_{ext}-2\widetilde{\psi}_{xy}(x,0)=\widetilde{h}_{xx}$, where the dimensional deflection is $(W^* S^*/\gamma_0^*)\widetilde{h}$ and $p_{ext}$ is a reference pressure (recall that, for the small surfactant concentration variations considered here, we can assume $S^*\ll \gamma_0^*$).  The displacement is computed by imposing $\widetilde{h}=0$ at each contact line, and imposing a volume constraint $\int_{-1}^1 \widetilde{h}\,\mathrm{d}x=0$. 
The pressure field at the free surface (computed numerically with gauge $\widetilde{p}(0,0)=0$) is shown in figure~\ref{fig:pressure}(\textit{a}) for the same values of D as used in figure \ref{fig:StressAsymp}(\textit{c,d}).  Collapse of the data (inset in figure~\ref{fig:pressure}\textit{a}) demonstrates that the pressure, like the stress, is regularised over a length scale in $x$ of $O(D)$ at the contact lines, reaching a maximum value of $O(\log(1/D))$.  The corresponding interfacial displacement (figure~\ref{fig:pressure}\textit{b}), computed numerically with $D=0$, shows that, despite the strong local forcing, displacements remain bounded.  For the first odd mode, for example, there is weak upwelling near each contact line compensated by lowering of the free surface in the middle of the domain.

\section{Discussion}
\label{sec:disc}

Confined gas--liquid interfaces are commonly contaminated by surfactant, deliberately or by trace amounts naturally present in the environment.  Here, we have addressed Marangoni-driven spreading of insoluble surfactant, towards an equilibrium state with uniform concentration, taking place across the width of an interface in a channel, when viscosity dominates the flow.  Many features of this spreading are diffusive in character, particularly the decomposition of the flow into a set of mutually orthogonal eigenmodes.  The modes decay exponentially in time at different rates, with the longest-wave modes being the most long-lasting.  Despite this benign temporal structure, the dynamic compression of surfactant near each lateral boundary gives eigenmodes more exotic spatial features.  The logarithmic pressure singularity near each contact line (\ref{eq:presswall}) has the potential to generate a measurable surface deflection (figure~\ref{fig:pressure}), while the shear stress has a pronounced oscillatory structure (figure~\ref{fig:StressAsymp}\textit{b}).

So far, we have focussed our study to the special case of a single-fluid flow with a pinned contact line forming a $\pi/2$ contact angle with the cavity walls. However, we can relax these assumptions to show that our results extend to a broader class of problems. In Appendix \ref{app:Exponents}, we present a local asymptotic analysis for the case of a two-fluid incompressible Stokes flow, with fluids of arbitrary viscosities and with an arbitrary contact angle between 0 and $\pi$ for the interface which is still assumed locally flat and pinned to the flat walls of the cavity. We show that the structure of the (two-fluid) flow near the contact line and the type of singularities generated by the time-dependent spreading of the surfactants lying at the interface between the two fluids is similar to what we  found for the single-fluid flow with $\pi/2$ contact angle. Indeed, the  singularity is always associated with a real exponent of $2$ in the $r$-dependence of the streamfunction, which leads to the logarithmic pressure singularity and the multi-valuedness of the vorticity  near each contact line. The main difference is that the part of the series of the streamfunction associated with real exponents does not terminate at $r^3$ for contact angles different from $\pi/2$ (see \eqref{eq:realseriesPsi} for the streamfunction with $\pi/2$ contact angle). The oscillatory structure of the shear stress, associated with complex exponents in the $r$-dependence of the streamfunction,  depends on the wedge angle, but not on the viscosity ratio between the two fluids. The viscosity ratio only affects the coefficients of higher order terms in the series for each eigenmode. We note that a local analysis is sufficient to establish the local flow structure and type of singularities near the contact line, which can be generated by an arbitrary far-field disturbance of the surfactant distribution. Such fundamental surfactant flows are found across the range of applications mentioned in the introduction.


We have also shown how, in the case of a single-fluid flow with $\pi/2$ contact angle, the introduction of a small amount of surface diffusion regularises the contact line singularities, leading to prominent changes in stress distributions (figure~\ref{fig:StressAsymp}c,d).  Surface diffusivity of $7\times 10^{-10}\,$m$^2$/s for the common surfactant sodium dodecylsulfate (SDS) \citep{CHANG19951} translates to a dimensionless diffusion coefficient $D=\mu^* D^*/(S^* W^*)$ below $10^{-8}$ in magnitude, assuming a spreading coefficient $S^*=10^{-2}\,$kg/s$^2$ over water in a channel of width 1 cm.  At such low levels, the impact of the singularities may still be visible, with the pressure maximum near each contact line, proportional to $\log(1/D)$, generating surface deflections resembling that shown in figure~\ref{fig:pressure}. We expect that diffusion will act in the same way for the broader class of problems involving two-fluid viscous flows and arbitrary contact angles between 0 and $\pi$.

The singular flow structures near contact lines that we have identified have the potential to contaminate dynamic computations that do not take proper account of these small-scale local structures.  In our calculations of spatial eigenmodes, we chose to combine asymptotic analysis with a dense numerical grid to capture the dominant spatial features of the flow.  There are a range of alternative strategies that could be deployed, notably singularity removal \citep{sprittles2011,game2019}, although (at least) two distinct singularities would require removal in the present problem.  As indicated above, singularity regularisation via the introduction of surface diffusion can operate over extremely small lengthscales when using realistic parameter values, itself presenting a computational challenge.  Singularities can be expected to become a particular difficulty in time-dependent studies, when artificial diffusion associated with a computational scheme may generate spurious disturbances propagating outward from the contact lines.  Corner singularities can also present convergence difficulties for numerical schemes that represent solutions using (Fadle--Papkovich) eigenfunctions that assume separability of spatial variables \citep{meleshko96, meleshko1997}.

The present model rests on numerous assumptions.  We have restricted attention to the near-equilibrium state, ignoring nonlinearities associated with large concentration gradients.  One benefit of this assumption is that small concentration changes support our assumption of a linearized equation of state, and the assumption that the Marangoni flow is sufficiently weak for restoring forces to maintain a nearly flat interface.  We have assumed that the surfactant is insoluble, but anticipate that desorption near the contact line may contribute to regularisation of the singularity. While the planar flow studied here could readily be extended to an axisymmetric geometry, a potentially more interesting avenue, with regard to three-dimensionality, will be to examine how the transverse flow studied here interacts with axial flows along the channel, as may occur in plastrons used in superhydrophic drag reduction \citep{peaudecerf2017}, in maze solving by surfactant \citep{temprano2018soap}, or in microfluidic applications. Furthermore, although we have considered a purely viscous regime, Marangoni spreading can be very rapid.  The dimensional decay rates predicted here are $1/\alpha$ times $W^* \mu^*/ \overline{\Delta \gamma}^*$, where $\alpha$ is an $O(1)$ modal decay rate and  $\overline{\Delta\gamma}^*=(\gamma_0^*-\gamma_c^*)\bar{\Gamma}^*/\Gamma_c^*$ is the surface tension reduction due to the equilibrium surfactant distribution.  Taking this as low as $10^{-3}$kg/s$^2$, say, for water in a narrow channel of width 1 mm (and comparable depth), the decay timescale is approximately 1 ms$/\alpha$, with a Reynolds number of order unity. Despite decaying exponentially with respect to time, the structure of the flow in wider and deeper channels can therefore be expected to be influenced by inertia, at least initially.

% The dimensional decay rates satisfy $\alpha^* = \alpha W^*\mu^*/(S^*\Gamma_c)$

In summary, this study shows how the unsteady spreading of a surfactant monolayer along a liquid-liquid or liquid-gas interface, confined by a lateral rigid boundary, can generate singular flow structures near stationary contact lines, including a logarithmically divergent pressure field and an oscillatory shear stress distribution.  Careful treatment of these structures is needed in computational simulations involving dynamic surfactant transport in confined domains.  

% Canonical flow; snoeijer/lohse/quere/

\section*{Acknowledgements}
The authors are grateful to Prof.~David Silvester for enlightening discussions relating to the numerical methods used in this study.

\vspace{0.5cm}
\textbf{Declaration of Interests.}
The authors report no conflict of interest.

\appendix
\section{The energy budget}
\label{app:energy}

The Stokes equation can be written as $\boldsymbol{\nabla} \cdot \boldsymbol{\sigma} = \mathbf{0}$, where the non-dimensional Cauchy stress tensor is $\boldsymbol{\sigma} = -p\mathbf{I} + 2 \mathsf{e}$ and the strain-rate tensor $\mathsf{e} = (\boldsymbol{\nabla}\mathbf{u} + \boldsymbol{\nabla}\mathbf{u}^T)/2$. Thus, for a Stokes flow, % So if we take the dot product with the velocity field we have, 
%\begin{equation}
%	\mathbf{u} \cdot	\boldsymbol{\nabla} \cdot \boldsymbol{\sigma} = 0
%\end{equation} 
%If we put this in index notation we have
%\begin{equation}
%	u_i \frac{\partial}{\partial x_j} \sigma_{ij} = 0 = \frac{\partial}{\partial x_{j}} u_i \sigma_{ij} - \sigma_{ij} \frac{\partial}{\partial x_j}u_i
%\end{equation} by the product rule. Converting this back into vector calculus notation we then have
%\begin{equation}
$\boldsymbol{\nabla}\cdot (\mathbf{u}\cdot \boldsymbol{\sigma}) 
=  \boldsymbol{\sigma}: \boldsymbol{\nabla } \mathbf{u} = \boldsymbol{\sigma}:\mathsf{e}$, exploiting the symmetry of $\boldsymbol{\sigma}$.  Given 
%\end{equation} 
% the fact that $\boldsymbol{\nabla}\mathbf{u}$ will be symmetric and therefore equal to $\mathbf{e}$, and 
that $p\mathbf{I}:\mathbf{e} = \text{trace}(\mathsf{e})p = 0$ by incompressibility, it follows that
% \begin{equation}
	$\boldsymbol{\nabla}\cdot (\mathbf{u}\cdot \boldsymbol{\sigma}) = 2\mathsf{e}: \mathsf{e}$. 
% \end{equation} 
Integrating this over the domain and applying the divergence theorem gives
\begin{equation}\label{eq:viscousworkbalance}
	2\int_V \mathsf{e :e} \ \mathrm{d}A = \int_{\partial V} \mathbf{u} \cdot \boldsymbol{\sigma} \cdot {\mathbf{n}} \ \mathrm{d}s,
\end{equation}
where $\partial V$ represents the boundary of $V$ and $\mathrm{d}s$ is the curvilinear element along the boundary. For the present perturbation problem, described by equations (\ref{eq:bih}), (\ref{UnIntegratedBoundaryCond}\textit{b,c}) and (\ref{eq:bc3})  for each eigenmode, equation (\ref{eq:viscousworkbalance}) balancing work done by Marangoni forces with viscous dissipation becomes
%
%\begin{equation}
%	\boldsymbol{\sigma} \cdot \hat{\mathbf{n}} = \boldsymbol{\nabla}_s \gamma = \gamma_x \mathbf{e}_x.
% \end{equation} If we also use $\gamma_x=-\Gamma_x$, and the fact that the velocity is zero on the solid boundaries, the energy equation then becomes
\begin{equation}\label{eq:workbalance1}
2  \int_V \left(2\hat{\psi}_{yx}^2 + \frac{1}{2}\hat{\psi}_{yy}^2+\frac{1}{2}\hat{\psi}_{xx}^2  -\hat{\psi}_{xx}\hat{\psi}_{yy} \right) \ \mathrm{d}A  
% = - \int_{y=-1}^{1} \left[ \Gamma_yv \right]\vert_{z=0}  \ \mathrm{d}S  
= -\int_{-1}^{1} \left. \left(\hat{\Gamma}_x \hat{\psi}_y \right) \right|_{y=0} \ \mathrm{d}x .
\end{equation}   
%We can also note the following using 
Integration by parts of the left hand side of (\ref{eq:workbalance1}) and the use  of the no-slip boundary condition on vertical boundaries and no penetration boundary condition on horizontal boundaries gives
%\begin{equation}
%	\iint \psi_{xy} \psi_{xy} \mathrm{d}x \mathrm{d}y = \int \left[ \psi_{xy} \psi_y \right]_{x=-1}^1 \mathrm{d}y-  \iint \psi_y \psi_{yxx}  \mathrm{d}x \mathrm{d}y = -  \iint \psi_y \psi_{yxx}  \mathrm{d}x \mathrm{d}y
% \end{equation} as $\psi_{y}$ is zero on the left and right hand boundaries as $\psi=0$ here.
%\begin{equation}
%	\iint \psi_y \psi_{yxx}  \mathrm{d}x \mathrm{d}y = \int \left[ \psi_y \psi_{xx} \right]_{y=-H}^{0} \mathrm{d}x - \iint \psi_{yy} \psi_{xx}  \mathrm{d}x \mathrm{d}y =  - \iint \psi_{yy} \psi_{xx} \mathrm{d}x \mathrm{d}y
%\end{equation} So we have shown that
% \begin{equation}
%	\iint_V \psi_{xy} \psi_{xy} \mathrm{d}x \mathrm{d}y =  \iint \psi_{yy} \psi_{xx} \mathrm{d}x \mathrm{d}y$, 
% \end{equation} which means that
\begin{equation}
	2  \int_V \left(2\hat{\psi}_{yx}^2 + \frac{1}{2}\hat{\psi}_{yy}^2+\frac{1}{2}\hat{\psi}_{xx}^2  -\hat{\psi}_{xx}\hat{\psi}_{yy} \right) \ \mathrm{d}A =   \int_V \left(  \hat{\psi}_{yy}^2+\hat{\psi}_{xx}^2  +2\hat{\psi}_{xx}\hat{\psi}_{yy} \right) \ \mathrm{d}A  = \int_V \hat{\omega}^2 \ \mathrm{d}A,
\end{equation} 
where $\hat{\omega} =-(\hat{\psi}_{yy} + \hat{\psi}_{xx})$ is the vorticity.  Further integration by parts of the right-hand-side of \eqref{eq:workbalance1} gives 
\begin{equation}
	- \int_{-1}^{1} \left. \left(\hat{\Gamma}_x \hat{\psi}_y \right) \right|_{y=0}   \ \mathrm{d}x  = \int_{-1}^{1} \left. \left(\hat{\Gamma} \hat{\psi}_{xy}  \right) \right|_{y=0} \ \mathrm{d}x .
\end{equation} 
Since $\hat{\psi}_{xy} = \alpha \hat{\Gamma}$ from (\ref{eq:bc4}), we obtain (\ref{eq:energy})
% as only $\hat{\Gamma}$ is a function of $y$, the $\Gamma_y$ in the argument before we integrated by parts must be $\hat{\Gamma}_x$, and as we already know from section 1 that  we have 
%\begin{equation}
%	  \iint_V \hat{\omega}^2 \ \mathrm{d}V = \alpha \int_{x=-1}^{1} \hat{\Gamma}^2 \mathrm{d}S 
% \end{equation}  
for each decay rate $\alpha$ and corresponding eigenmode $\{\hat{\psi},\hat{\omega},\hat{\Gamma}\}$.
% This gives us a nice expression for the eigenvalues $\alpha$
%\begin{equation}
%	\alpha = \frac{\iint_V \omega^2  \ \mathrm{d}V }{\int_{x=-1}^{1} \hat{\Gamma}^2 \mathrm{d}S}
%\end{equation}

%\bibliographystyle{ieeetr}
% \bibliography{Refs} 

%\appendix

\section{Orthogonality of modes}
\label{app:ortho}

The reciprocal theorem \citep{masoud_stone_2019} states that two Stokes flows, with velocity fields and Cauchy stress tensors $(\mathbf{u},\boldsymbol{\sigma})$ and  $(\mathbf{u}',\boldsymbol{\sigma}')$,    satisfy in the same region
\begin{equation}
	\int_{\partial V} \mathbf{u} \cdot(\boldsymbol{\sigma}'\cdot \mathbf{n})\, \mathrm{d}A = 
	\int_{\partial V} \mathbf{u}' \cdot(\boldsymbol{\sigma}\cdot \mathbf{n})\, \mathrm{d}A
\label{eq:b1}
\end{equation} 
For the present perturbation problem, described by equations (\ref{eq:bih}), (\ref{UnIntegratedBoundaryCond}\textit{b,c}) and (\ref{eq:bc3}) for each eigenmode, we have $\mathbf{u}=\mathbf{0}$ on the three solid boundaries whilst at the free surface  $u_y = - \Gamma_x$. Thus, for two distinct modes $m$ and $n$, (\ref{eq:b1}) implies
\begin{equation}
	\int_{-1}^1 \hat{u}_m \hat{\Gamma}_{n,x}\, \dx = 	\int_{-1}^1 \hat{u}_n \hat{\Gamma}_{m,x}\, \dx.
\end{equation} 
Integrating by parts and using $\alpha \hat{\Gamma} = -\hat{u}_x$ gives
\begin{equation}
	\left[\hat{u}_m\hat{\Gamma}_n\right]_{-1}^1  - \int_{-1}^1 \alpha_m\hat{\Gamma}_m\hat{\Gamma}_n \dx = \left[\hat{u}_n\hat{\Gamma}_m\right]_{-1}^1  - \int_{-1}^1 \alpha_n\hat{\Gamma}_n\hat{\Gamma}_m \dx.
	\label{eq:b3}
\end{equation} 
As the surface velocity is zero at $x=\pm1$, (\ref{eq:b3}) becomes
\begin{equation}
	(\alpha_m-\alpha_n)\int_{-1}^1 \hat{\Gamma}_m \hat{\Gamma}_n\, \dx = 0,
\end{equation} 
which shows that the surfactant concentration profiles corresponding to different modes are orthogonal since $\alpha_m \neq \alpha_n$, as stated in (\ref{eq:orthcond}). Equivalently, we note that this result can be derived by exploiting the self-adjointness of (\ref{eq:bih}), (\ref{UnIntegratedBoundaryCond}\textit{b,c}) and (\ref{eq:bc3}).

Numerical computation of the scalar product of the surfactant concentration modes for $1\leq m,n\leq 5$ gives \small
	\begin{equation}
	\int_{-1}^1 \widetilde{\Gamma}_m \widetilde{\Gamma}_n \ \mathrm{d}x = \mathbf{A}_{m,n} = 
	  \begin{pmatrix}
		0.20243519  & -0.00000524 & -0.00000370 & -0.00000345 & -0.00000358\\
  -0.00000524 &  0.19832581 & -0.00000394 & -0.00000457 & -0.00000508\\
  -0.00000370 & -0.00000394 &  0.19136202 & -0.00000570 & -0.00000635\\
  -0.00000345 & -0.00000457 & -0.00000570 &  0.19112895 & -0.00000744\\
  -0.00000358 & -0.00000508 & -0.00000635 & -0.00000744 &  0.19096022
	\end{pmatrix} . 
	\label{eq:ortho}
	\end{equation} \normalsize
These results were computed using our numerical scheme presented in section \ref{subsec:finitedifference} with $4000\times4000$ gridpoints. The non-diagonal elements of the matrix $\mathbf{A}_{m,n}$ in (\ref{eq:ortho}) are very small, showing the orthogonality of the modes calculated numerically and the global accuracy of our numerical scheme.

\section{The thin-film limit}
\label{app:thin}

As $H\rightarrow 0$, the biharmonic equation \eqref{eq:bih} can be approximated as $\psi_{yyyy} = 0$, therefore the general solution in this limit is given by
\begin{equation}
\psi = f_1(x)y^3 + f_2(x)y^2+ f_3(x)y + f_4(x).
\end{equation} The boundary condition $\psi(x,y=0) = 0$ means $f_4(x)=0$. The boundary conditions $\psi(x,y = -H) = 0$ and $\psi_y(x,y=-H)=0$ give 
\begin{equation}
 0 = -f_1(x)H^3 + f_2(x)H^2 -f_3(x)H,
\end{equation} and
\begin{equation}
 0 = 3f_1(x)H^2 - 2
 f_2(x)H +f_3(x).
\end{equation} Eliminating $f_3$ 
% Multiplying the second equation by $H$ and adding it to the first one 
gives
%\begin{equation}
$f_2(x)= 2f_1(x)H$,
%\end{equation} 
implying
%\begin{equation}
$f_3(x) = f_1(x)H^2$.
%\end{equation}
Hence
%\begin{equation}
$\psi = f_1(x)(y^3+2Hy^2+H^2y)$.
%\end{equation} 
The stress boundary condition at the surface $y=0$ is $\alpha\psi_{yy} = - \psi_{xxy}$, which imposes
\begin{equation}
4\alpha H f_1(x) = - f_1^{\prime \prime}(x)H^2.
\end{equation} The solution of this ordinary differential equation for $f_1(x)$ is
\begin{equation}\label{eq:f1condition}
 f_1(x) = C_1 \cos{\left(\sqrt{\frac{4 \alpha}{H}}x\right)} + C_2 \sin{\left(\sqrt{\frac{4 \alpha}{H}}x\right)} ,
\end{equation} 
for some arbitrary integration constants $C_1$ and $C_2$. The odd and even modes are given by setting either of these constants to zero. Let $C_2=0$, then applying the boundary conditions $\psi(x = \pm1)=0$ at the side walls gives
%\begin{equation}
$\cos{\left(\sqrt{{4 \alpha}/{H}}\right)} = 0$,
%\end{equation} 
which implies
\begin{equation}\label{eq:alphaevenlub}
    \alpha_n = \frac{(2n-1)^2 \pi^2 H}{16},
\end{equation} 
where $n$ can be any positive integer, $n\geq 1$. Equation \eqref{eq:alphaevenlub} is an approximation for the decay rates for the  modes even of the stream function in $x$ as $H$ becomes small. Similarly, letting $C_1=0$ in \eqref{eq:f1condition}, and then applying the boundary conditions $\psi(x = \pm1)=0$ at the side walls gives
%\begin{equation}
$\sin{\left(\sqrt{\frac{4 \alpha}{H}}\right)}  = 0$,
%\end{equation} 
which implies
\begin{equation}\label{eq:alphaoddlub}
    \alpha_n = \frac{n^2\pi^2 H}{4},
\end{equation}
where $n$ can be any positive integer, $n\geq 1$. Equation \eqref{eq:alphaoddlub} is an approximation for the decay rates for the  modes even of the stream function in $x$ as $H$ becomes small. We note finally that the sinusoidal modes (\ref{eq:f1condition}) in this long-wave theory predict zero slope of the surfactant concentration at the contact lines, so fail to capture the finite slope predicted by (\ref{eq:Gamma}) and demonstrated in figure~\ref{fig:Alphas}(\textit{b}).

\section{Asymptotics with arbitrary contact angle and two fluids of arbitrary viscosities}
\label{app:Exponents}

\begin{figure}
    \centering
    \begin{subfigure}{0.40\textwidth}
    \centering
   \includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure6a.eps}
    \caption{}
   \end{subfigure}
    \begin{subfigure}{0.52\textwidth}
		\includegraphics[trim={0cm 0cm 1cm 0cm},clip,width=\textwidth]{figure6b.eps}
		 \caption{}
	\end{subfigure}
	 \caption{(\textit{a}) Schematic of the local problem near the contact line pinned at $O$, with surfactant on the interface $(\theta=0)$ between two incompressible fluids with viscosities $\mu_1$ (bottom fluid) and $\mu_2$ (top fluid) and contact angles $\Theta_1$ and $\Theta_2$, respectively. (\textit{b}) Plot of the real part of admissible exponents for the radial dependence of the stream function, calculated from \eqref{eq:ComplexLambda}, against the contact angle $\Theta_1$. This gives the exponents in the asymptotic series capturing the behaviour of the fluid as $r \to 0$. Importantly, this shows no admissible exponents with $1<\text{real}(a_1)<2$, which means that for any contact angle and viscosity ratio, the nature of the dominant singularity presented in the main text for a single-fluid flow with contact angle $\pi/2$ is generic.}
	 \label{fig:Exponents}
\end{figure}

We consider the generalisation of the local analysis of the single-fluid flow with $\pi/2$ contact angle made in \S\ref{sec:corners}. As depicted in figure \ref{fig:Exponents}(\textit{a}), we now assume a two-fluid incompressible Stokes flow with arbitrary viscosities. We assume that the interface is locally flat near the contact lines and remains pinned to the flat walls of the cavity at the contact line location at point $O$, which corresponds to the coordinates $(x,y)=(-1,0)$ in the original problem described in figure \ref{fig:Domain}. We allow the contact angle $\Theta$ to vary between 0 and $\pi$, thereby relaxing the assumption made in the main part of the text. We find local approximations to the stream functions in each fluid, $\psi_{(1)}$ in fluid $1$ (bottom fluid), and $\psi_{(2)}$ in fluid $2$ (top fluid). These fluids have viscosities $\mu_1$ and $\mu_2$, and  contact angles $\Theta_1$ and $\Theta_2 = \pi- \Theta_1$, respectively. 

We use a plane polar coordinate system with $r$ being the radial direction from the origin, and $\theta$ the angular coordinate, with the interface along the line $\theta=0$ (see figure \ref{fig:Exponents}\textit{a}). 
Similar to the model presented in \S\ref{sec:model}, we formulate the flow problem with the stream function, which follows the biharmonic equation \eqref{eq:bih} in each fluid, with no-flux and no-penetration at the cavity wall, and no penetration at the interface, which is assumed fixed and locally flat. At the interface $(r\geq 0,\theta=0)$, we also assume continuity of the tangential velocity, whilst the tangential dynamic boundary condition now becomes, in dimensional form,
\begin{equation}\label{eq:tangentialdynamicBC}
	-{\boldsymbol \tau }\cdot \llbracket \boldsymbol{\sigma}^*\rrbracket \cdot \mathbf{n} = {\boldsymbol \tau }\cdot {\bf \nabla}^*_s \gamma^*
\end{equation} 
where the jump in tangential stress across the interface is balanced by the surfactant-induced Marangoni stress.  The jump bracket is defined as $\llbracket \boldsymbol{\sigma}^*\rrbracket= \boldsymbol{\sigma}_2^*-\boldsymbol{\sigma}_1^*$. The stress tensor $\boldsymbol{\sigma}^*$ is assumed Newtonian for both fluids. The unit  tangential and normal vectors at the interface follow  ${\boldsymbol{\tau}}=(1,0)$ and ${\bf n}=(0,1)$, in polar coordinates, as depicted in figure \ref{fig:Exponents}(\textit{a}). The surface gradient operator is defined as ${\bf \nabla}^*_s={\bf \nabla}^* \cdot(\mathsf{I}-{\bf n} \otimes {\bf n})$, with $\otimes$ the outer product. Similar to before, we non-dimensionalize this problem using \eqref{scales}, taking fluid 1 as the reference fluid, then we linearize the surfactant distribution around $\bar{\Gamma}$, and decompose the perturbation for each variable in the form $\hat{\Gamma}(r)e^{-\lambda t}$ for example. Relating all variables to the streamfunction, as done previously in \S\ref{sec:linearization}, the  tangential dynamic boundary condition \eqref{eq:tangentialdynamicBC} becomes for each mode, in polar coordinates,
\begin{multline}\label{2FluidsPolarBoundCond}
-\alpha\left(\frac{1}{r^2} \psi_{(1)\theta \theta} + \frac{1}{r}\psi_{(1)r} -  \frac{\mu_r}{r^2} \psi_{(2)\theta \theta}  - \frac{\mu_r}{r}\psi_{(2)r} \right)
\\
=\frac{1}{r} \psi_{(1)rr \theta} -\frac{2}{r^2}\psi_{(1)r \theta} + \frac{2}{r^3} \psi_{(1)\theta} =\frac{1}{r} \psi_{(2)rr \theta} -\frac{2}{r^2}\psi_{(2)r \theta} + \frac{2}{r^3} \psi_{(2)\theta},
	\qquad \text{on } \theta = 0.
\end{multline} 
where $\alpha=\lambda/\bar{\Gamma}$ is the decay rate of each mode, and $\mu_r=\mu_2/\mu_1$ is the viscosity ratio between the two fluids.
The first term incorporates the difference in shear stress between the lower and the upper fluid; the middle and final terms describe stretching of the interface.  Continuity of the tangential velocity field along the interface requires both fluids to stretch at an equal rate.

We  seek separable solutions to the above problem such that the leading order terms in each series is $\psi_{(1)} = r^{a_1}f_{a_1}(\theta)$ and $\psi_{(2)} = r^{a_2}f_{a_2}(\theta)$ where the functions  $f$ are given by \eqref{f_1} to \eqref{f_mu odd}.
Applying the boundary conditions we find that the constants in the functions $f_{a_1}$ and $f_{a_2}$ depend on the contact angle, whilst the exponents $a_1$ and $a_2$ satisfy
\begin{equation}\label{eq:conditionf1f2}
    	\left(a_1^2-3a_1 +2\right)f_{a_1}^{\prime}(0;\Theta_1) = 0 
    	\qquad \text{or} \qquad
	\left(a_2^2-3a_2 +2\right)f_{a_2}^{\prime}(0;-\Theta_2) = 0. 
\end{equation} 
The conditions in \eqref{eq:conditionf1f2} can be satisfied with $a_1=a_2=2$, based on the first bracket in each condition, such that the stream function solutions must involve series with  exponent equal to $2$. However, we ask the question whether taking either $f_{a_1}^{\prime}(0;\Theta_1) = 0 $ or $f_{a_2}^{\prime}(0;-\Theta_2) = 0$ in \eqref{eq:conditionf1f2}  can give us an exponent with real part between $1$ and $2$. This is important as an exponent less than $2$ would give us a stronger corner singularity than that discussed in the main text for the case of a single-fluid flow with a contact angle of $\pi/2$. Exponents with real part less than or equal to $1$, from the conditions \eqref{eq:conditionf1f2}, are rejected on physical grounds to avoid the radial velocity to diverge or be non-zero as $r \to 0$.

When we impose the condition $f_{a_1}^{\prime}(0,\Theta_1) = 0$, we find that the exponent must obey the condition which is the same as found in Moffatt's problem for a flow near a corner of angle $\Theta_1$ subject to zero velocity boundary conditions at the boundaries (and similarly for $a_2$) \citep{moffatt1964viscous}. This condition is
\begin{equation}\label{eq:ComplexLambda}
    (a_1-1)\sin{(\Theta_1)} = \pm \sin{(\Theta_1(a_1-1))} .
\end{equation}
By inspection we can see that $a_1=0,1,2$ (and similarly for $a_2$) are solutions of \eqref{eq:ComplexLambda}, for any value of $\Theta_1$, and any integer is a solution when $\Theta_1 = \pi$. We show that a solution with $1 < \text{real}(a_1)<2$ cannot exist for $0\leq \Theta_1 \leq \pi$ in figure \ref{fig:Exponents}\textit{(b)} where we have plotted the locations of the real parts of the admissible solutions of \eqref{eq:ComplexLambda} against $\Theta_1$. We also note that none of the exponents in the expansions for $\psi_{(1)}$ or $\psi_{(2)}$ depend on the viscosity ratio. Hence, in this problem the exponent in the dominant term in both stream functions will be $2$ for any contact angle and viscosity ratio, giving the same type of singularities as presented in the main body of the paper for this broader class of problems.

\bibliographystyle{jfm}
% Note the spaces between the initials
\bibliography{Refs}

\end{document}
\end{equation}


\begin{thebibliography}{38}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\def\au#1{#1} \def\ed#1{#1} \def\yr#1{#1}\def\at#1{#1}\def\jt#1{\textit{#1}}
  \def\bt#1{#1}\def\bvol#1{\textbf{#1}} \def\vol#1{#1} \def\pg#1{#1}
  \def\publ#1{#1}\def\arxiv#1{#1}\def\org#1{#1}\def\st#1{\textit{#1}}

\bibitem[Afsar-Siddiqui {\em et~al.\/}(2003)Afsar-Siddiqui, Luckham \&
  Matar]{afsar2003}
{\sc \au{Afsar-Siddiqui, A~B}, \au{Luckham, P~F} \& \au{Matar, O~K}} \yr{2003}
  \at{The spreading of surfactant solutions on thin liquid films}.  \jt{Adv.
  Colloid Interface Sci.}  \bvol{106}~(1-3),  \pg{183--236}.

\bibitem[Baier \& Hardt(2021)]{baier2021}
{\sc \au{Baier, T} \& \au{Hardt, S}} \yr{2021}  \at{Influence of insoluble
  surfactants on shear flow over a surface in cassie state at large p{\'e}clet
  numbers}.  \jt{J. Fluid Mech.}  \bvol{907}.

\bibitem[Borgas \& Grotberg(1988)]{borgas1988monolayer}
{\sc \au{Borgas, M~S} \& \au{Grotberg, J~B}} \yr{1988}  \at{Monolayer flow on a
  thin film}.  \jt{J. Fluid Mech.}  \bvol{193},  \pg{151--170}.

\bibitem[Chang \& Franses(1995)]{CHANG19951}
{\sc \au{Chang, C.-H.} \& \au{Franses, E.~I.}} \yr{1995}  \at{Adsorption
  dynamics of surfactants at the air/water interface: a critical review of
  mathematical models, data, and mechanisms}.  \jt{Colloids Surf. A:
  Physicochem. Eng. Aspects}  \bvol{100},  \pg{1--45}.

\bibitem[Dussaud {\em et~al.\/}(2005)Dussaud, Matar \& Troian]{dussaud2005}
{\sc \au{Dussaud, A~D}, \au{Matar, O~K} \& \au{Troian, S~M}} \yr{2005}
  \at{Spreading characteristics of an insoluble surfactant film on a thin
  liquid layer: comparison between theory and experiment}.  \jt{J. Fluid Mech.}
   \bvol{544},  \pg{23--51}.

\bibitem[Filoche {\em et~al.\/}(2015)Filoche, Tai \& Grotberg]{filoche2015}
{\sc \au{Filoche, M}, \au{Tai, C-F} \& \au{Grotberg, J~B}} \yr{2015}
  \at{Three-dimensional model of surfactant replacement therapy}.  \jt{Proc.
  Nat. Acad. Sci.}  \bvol{112}~(30),  \pg{9287--9292}.

\bibitem[Fornberg(1988)]{fornberg1988generation}
{\sc \au{Fornberg, Bengt}} \yr{1988}  \at{Generation of finite difference
  formulas on arbitrarily spaced grids}.  \jt{Mathematics of computation}
  \bvol{51}~(184),  \pg{699--706}.

\bibitem[Game {\em et~al.\/}(2019)Game, Hodes \& Papageorgiou]{game2019}
{\sc \au{Game, S~E}, \au{Hodes, M} \& \au{Papageorgiou, D~T}} \yr{2019}
  \at{Effects of slowly varying meniscus curvature on internal flows in the
  {C}assie state}.  \jt{J. Fluid Mech.}  \bvol{872},  \pg{272--307}.

\bibitem[Gaver \& Grotberg(1992)]{gaver1992droplet}
{\sc \au{Gaver, D P~III} \& \au{Grotberg, J~B}} \yr{1992}  \at{Droplet
  spreading on a thin viscous film}.  \jt{J. Fluid Mech.}  \bvol{235},
  \pg{399--414}.

\bibitem[Gaver~III \& Grotberg(1990)]{gaver1990dynamics}
{\sc \au{Gaver~III, D~P} \& \au{Grotberg, J~B}} \yr{1990}  \at{The dynamics of
  a localized surfactant on a thin film}.  \jt{J. Fluid Mech.}  \bvol{213},
  \pg{127--148}.

\bibitem[Grotberg {\em et~al.\/}(1995)Grotberg, Halpern \&
  Jensen]{grotberg1995}
{\sc \au{Grotberg, J~B}, \au{Halpern, D} \& \au{Jensen, O~E}} \yr{1995}
  \at{Interaction of exogenous and endogenous surfactant: spreading-rate
  effects}.  \jt{J. Appl. Physiol.}  \bvol{78}~(2),  \pg{750--756}.

\bibitem[Huh \& Scriven(1971)]{huh71}
{\sc \au{Huh, C.} \& \au{Scriven, L.~E.}} \yr{1971}  \at{Hydrodynamic model of
  steady movement of a solid/liquid/fluid contact line}.  \jt{{J. Colloid
  Interface Sci.}}  \bvol{35}~(1),  \pg{85--101}.

\bibitem[Jensen(1998)]{jensen1998stress2}
{\sc \au{Jensen, O~E}} \yr{1998}  \at{The stress singularity in
  surfactant-driven thin-film flows. part 2. inertial effects}.  \jt{J. Fluid
  Mech.}  \bvol{372},  \pg{301--322}.

\bibitem[Jensen \& Grotberg(1992)]{jensen1992insoluble}
{\sc \au{Jensen, O~E} \& \au{Grotberg, J~B}} \yr{1992}  \at{Insoluble
  surfactant spreading on a thin viscous film: shock evolution and film
  rupture}.  \jt{J. Fluid Mech.}  \bvol{240},  \pg{259--288}.

\bibitem[Jensen \& Halpern(1998)]{jensen1998stress1}
{\sc \au{Jensen, O~E} \& \au{Halpern, D}} \yr{1998}  \at{The stress singularity
  in surfactant-driven thin-film flows. {P}art {1}. {V}iscous effects}.  \jt{J.
  Fluid Mech.}  \bvol{372},  \pg{273--300}.

\bibitem[Jensen \& Naire(2006)]{jensen2006}
{\sc \au{Jensen, O~E} \& \au{Naire, S}} \yr{2006}  \at{The spreading and
  stability of a surfactant-laden drop on a prewetted substrate}.  \jt{J. Fluid
  Mech.}  \bvol{554},  \pg{5--24}.

\bibitem[Kovalchuk \& Simmons(2021)]{kovalchuk2020}
{\sc \au{Kovalchuk, N~M} \& \au{Simmons, M J~H}} \yr{2021}
  \at{Surfactant-mediated wetting and spreading: recent advances and
  applications}.  \jt{Curr. Op. Colloid Interface Sci.}  \bvol{51},
  \pg{101375}.

\bibitem[Kuhlmann \& Roman{\`o}(2019)]{kuhlmann2019}
{\sc \au{Kuhlmann, H~C} \& \au{Roman{\`o}, F}} \yr{2019}  \at{The lid-driven
  cavity}.  \jt{Computational Modelling of Bifurcations and Instabilities in
  Fluid Dynamics}  \pg{pp. 233--309}.

\bibitem[Landel {\em et~al.\/}(2020)Landel, Peaudecerf, Temprano-Coleto, Gibou,
  Goldstein \& Luzzatto-Fegiz]{landel2020}
{\sc \au{Landel, J~R}, \au{Peaudecerf, F~J}, \au{Temprano-Coleto, F},
  \au{Gibou, F}, \au{Goldstein, R~E} \& \au{Luzzatto-Fegiz, P}} \yr{2020}
  \at{A theory for the slip and drag of superhydrophobic surfaces with
  surfactant}.  \jt{J. Fluid Mech.}  \bvol{883}.

\bibitem[Landel \& Wilson(2021)]{landel2021}
{\sc \au{Landel, J~R} \& \au{Wilson, D~I}} \yr{2021}  \at{The fluid mechanics
  of cleaning and decontamination of surfaces}.  \jt{Ann. Rev. Fluid Mech.}
  \bvol{53}.

\bibitem[Liu {\em et~al.\/}(2019)Liu, Peco \& Dolbow]{liu2019}
{\sc \au{Liu, Y}, \au{Peco, C} \& \au{Dolbow, J}} \yr{2019}  \at{A fully
  coupled mixed finite element method for surfactants spreading on thin liquid
  films}.  \jt{Comp. Meth. Appl. Mech. Eng.}  \bvol{345},  \pg{429--453}.

\bibitem[Manikantan \& Squires(2020)]{manikantan2020}
{\sc \au{Manikantan, Harishankar} \& \au{Squires, Todd~M}} \yr{2020}
  \at{Surfactant dynamics: hidden variables controlling fluid flows}.  \jt{J.
  Fluid Mech.}  \bvol{892}.

\bibitem[Masoud \& Stone(2019)]{masoud_stone_2019}
{\sc \au{Masoud, H.} \& \au{Stone, H.~A.}} \yr{2019}  \at{The reciprocal
  theorem in fluid dynamics and transport phenomena}.  \jt{J. Fluid Mech.}
  \bvol{879},  \pg{P1}.

\bibitem[Matar \& Craster(2009)]{matar2009dynamics}
{\sc \au{Matar, OK} \& \au{Craster, RV}} \yr{2009}  \at{Dynamics of
  surfactant-assisted spreading}.  \jt{Soft Matter}  \bvol{5}~(20),
  \pg{3801--3809}.

\bibitem[Meleshko(1996)]{meleshko96}
{\sc \au{Meleshko, V.~V.}} \yr{1996}  \at{Steady stokes flow in a rectangular
  cavity}.  \jt{Proc. Roy. Soc. A: Math. Phys. Eng. Sci.}  \bvol{452},
  \pg{1999--2022}.

\bibitem[Meleshko(1997)]{meleshko1997}
{\sc \au{Meleshko, V.~V.}} \yr{1997}  \at{Biharmonic problem in a rectangle}.
  \jt{Appl. Sci. Res.}  \bvol{58},  \pg{217--249}.

\bibitem[Moffatt(1964)]{moffatt1964viscous}
{\sc \au{Moffatt, H.~K.}} \yr{1964}  \at{Viscous and resistive eddies near a
  sharp corner}.  \jt{J. Fluid Mech.}  \bvol{18}~(1),  \pg{1--18}.

\bibitem[Peaudecerf {\em et~al.\/}(2017)Peaudecerf, Landel, Goldstein \&
  Luzzatto-Fegiz]{peaudecerf2017}
{\sc \au{Peaudecerf, F~J}, \au{Landel, J~R}, \au{Goldstein, R~E} \&
  \au{Luzzatto-Fegiz, P}} \yr{2017}  \at{Traces of surfactants can severely
  limit the drag reduction of superhydrophobic surfaces}.  \jt{Proc. Nat. Acad.
  Sci.}  \bvol{114}~(28),  \pg{7254--7259}.

\bibitem[Sauleda {\em et~al.\/}(2021)Sauleda, Chu, Tilton \&
  Garoff]{sauleda2021}
{\sc \au{Sauleda, M~L}, \au{Chu, H C~W}, \au{Tilton, R~D} \& \au{Garoff, S}}
  \yr{2021}  \at{Surfactant driven marangoni spreading in the presence of
  predeposited insoluble surfactant monolayers}.  \jt{Langmuir}
  \bvol{37}~(11),  \pg{3309--3320}.

\bibitem[Scott(1982)]{scott1982}
{\sc \au{Scott, J~C}} \yr{1982}  \at{Flow beneath a stagnant film on water: the
  {R}eynolds ridge}.  \jt{J. Fluid Mech.}  \bvol{116},  \pg{283--296}.

\bibitem[Shankar \& Deshpande(2000)]{shankar00}
{\sc \au{Shankar, P.~N.} \& \au{Deshpande, M.~D.}} \yr{2000}  \at{Fluid
  mechanics in the driven cavity}.  \jt{{Ann. Rev. Fluid Mech.}}
  \bvol{32}~(1),  \pg{93--136}.

\bibitem[Sprittles \& Shikhmurzaev(2011)]{sprittles2011}
{\sc \au{Sprittles, JE} \& \au{Shikhmurzaev, YD}} \yr{2011}  \at{Viscous flow
  in domains with corners: Numerical artifacts, their origin and removal}.
  \jt{Comp. Meth. Appl. Mech. Eng.}  \bvol{200}~(9-12),  \pg{1087--1099}.

\bibitem[Stetten {\em et~al.\/}(2018)Stetten, Iasella, Corcoran, Garoff,
  Przybycien \& Tilton]{stetten2018}
{\sc \au{Stetten, A~Z}, \au{Iasella, S~V}, \au{Corcoran, T~E}, \au{Garoff, S},
  \au{Przybycien, T~M} \& \au{Tilton, R~D}} \yr{2018}  \at{Surfactant-induced
  marangoni transport of lipids and therapeutics within the lung}.  \jt{Curr.
  Op. Colloid Interface Sci.}  \bvol{36},  \pg{58--69}.

\bibitem[Stone \& Leal(1990)]{stone1990effects}
{\sc \au{Stone, H~A} \& \au{Leal, L~G}} \yr{1990}  \at{The effects of
  surfactants on drop deformation and breakup}.  \jt{J. Fluid Mech.}
  \bvol{220},  \pg{161--186}.

\bibitem[Swanson {\em et~al.\/}(2015)Swanson, Strickland, Shearer \&
  Daniels]{swanson2015}
{\sc \au{Swanson, E~R}, \au{Strickland, S~L}, \au{Shearer, M} \& \au{Daniels,
  K~E}} \yr{2015}  \at{Surfactant spreading on a thin liquid film: reconciling
  models and experiments}.  \jt{J. Eng. Math.}  \bvol{94}~(1),  \pg{63--79}.

\bibitem[Temprano-Coleto {\em et~al.\/}(2018)Temprano-Coleto, Peaudecerf,
  Landel, Gibou \& Luzzatto-Fegiz]{temprano2018soap}
{\sc \au{Temprano-Coleto, F}, \au{Peaudecerf, F~J}, \au{Landel, J~R},
  \au{Gibou, F} \& \au{Luzzatto-Fegiz, P}} \yr{2018}  \at{Soap opera in the
  maze: Geometry matters in marangoni flows}.  \jt{Phys. Rev. Fluids}
  \bvol{3}~(10),  \pg{100507}.

\bibitem[Wang \& Guo(2020)]{wang2020comparison}
{\sc \au{Wang, C.} \& \au{Guo, Z.}} \yr{2020}  \at{A comparison between
  superhydrophobic surfaces (shs) and slippery liquid-infused porous surfaces
  (slips) in application}.  \jt{Nanoscale}  \bvol{12}~(44),  \pg{22398--22424}.

\bibitem[Warner {\em et~al.\/}(2004)Warner, Craster \& Matar]{warner2004}
{\sc \au{Warner, M R~E}, \au{Craster, R~V} \& \au{Matar, O~K}} \yr{2004}
  \at{Fingering phenomena associated with insoluble surfactant spreading on
  thin liquid films}.  \jt{J. Fluid Mech.}  \bvol{510},  \pg{169}.

\end{thebibliography}