  This paper investigates the flow of a solidifying liquid film on a solid
surface subject to a complex kinematics, a process relevant to pancake making
and surface coating. The flow is modeled using the lubrication approximation,
with a gravity force whose magnitude and direction depend on the time-dependent
orientation of the surface. Solidification is modeled with a
temperature-dependent viscosity. Because the flow eventually ceases as the
liquid film becomes very viscous, the key question this study aims to address
is: what is the optimal surface kinematics for spreading the liquid layer
uniformly? Two methods are proposed to tackle this problem. In the first one,
the surface kinematics is assumed a priori to be harmonic and parameterized.
The optimal parameters are inferred using the Monte-Carlo method. This
``brute-force'' approach leads to a moderate improvement of the film uniformity
compared to the reference case when no motion is imposed to the surface. The
second method is formulated as an optimal control problem, constrained by the
governing partial differential equation, and solved with an adjoint equation.
Key benefits of this method are that no assumption is made on the form of the
control, and that significant improvement in thickness uniformity are achieved
with a comparatively smaller number of evaluations of the objective function.
