Theoretical Background of the Continuous Adjoint Method in OpenFOAM