  A variety of shooting methods for computing fully discrete time-periodic
solutions of partial differential equations, including Newton-Krylov and
optimization-based methods, are discussed and used to determine the periodic,
compressible, viscous flow around a 2D flapping airfoil. The Newton-Krylov
method uses matrix-free GMRES to solve the linear systems of equations that
arise in the nonlinear iterations, with matrix-vector products computed via the
linearized sensitivity evolution equations. The adjoint method is used to
compute gradients for the gradient-based optimization shooting methods. The
Newton-Krylov method is shown to exhibit superior convergence to the optimal
solution for these fluid problems, and fully leverages quality starting data.
  The central contribution of this work is the derivation of the adjoint
equations and the corresponding adjoint method for fully discrete,
time-periodically constrained partial differential equations. These adjoint
equations constitute a linear, two-point boundary value problem that is
provably solvable. The periodic adjoint method is used to compute gradients of
quantities of interest along the manifold of time-periodic solutions of the
discrete partial differential equation, which is verified against a
second-order finite difference approximation. These gradients are then used in
a gradient-based optimization framework to determine the energetically optimal
flapping motion of a 2D airfoil in compressible, viscous flow over a single
cycle, such that the time-averaged thrust is identically zero. In less than 20
optimization iterations, the flapping energy was reduced nearly an order of
magnitude and the thrust constraint satisfied to 5 digits of accuracy.
