  When fluid flow in a pipeline is suddenly halted, a pressure surge or wave is
created within the pipeline. This phenomenon, called water hammer, can cause
major damage to pipelines, including pipeline ruptures. In this paper, we model
the problem of mitigating water hammer during valve closure by an optimal
boundary control problem involving a nonlinear hyperbolic PDE system that
describes the fluid flow along the pipeline. The control variable in this
system represents the valve boundary actuation implemented at the pipeline
terminus. To solve the boundary control problem, we first use {the method of
lines} to obtain a finite-dimensional ODE model based on the original PDE
system. Then, for the boundary control design, we apply the control
parameterization method to obtain an approximate optimal parameter selection
problem that can be solved using nonlinear optimization techniques such as
Sequential Quadratic Programming (SQP). We conclude the paper with simulation
results demonstrating the capability of optimal boundary control to
significantly reduce flow fluctuation.
