  In this work, we propose a fully discrete energy stable scheme for the
phase-field moving contact line model with variable densities and viscosities.
The mathematical model consists of a Cahn-Hilliard equation, a Navier-Stokes
equation and the generalized Navier boundary condition for the moving contact
line. A scalar auxiliary variable is adopted to transform the governing system
into an equivalent form, allowing the double well potential to be treated
semi-explicitly. A stabilization term is added to balance the explicit
nonlinear term originating from the surface energy at fluid-solid interface. A
pressure stabilization method is used to decouple the computation of velocity
and pressure. Some subtle implicit-explicit treatments are adopted to deal with
convention and stress terms. We establish a rigorous proof of energy stability
for the proposed time-marching scheme. Then a finite difference method on
staggered grids is used to spatially discretize the constructed time-marching
scheme. We further prove that the fully discrete scheme also satisfies the
discrete energy dissipation law. Numerical results demonstrate accuracy and
energy stability of the proposed scheme. Using our numerical scheme, we analyze
the contact line dynamics through a shear flow driven droplet sliding case.
Three-dimensional droplet spreading is also investigated on a chemically
patterned surface. Our numerical simulation accurately predicts the expected
energy evolutions and it successfully reproduces expected phenomena that an oil
droplet contracts inwards on a hydrophobic zone and spreads outwards quickly on
a hydrophilic zone.
