In this paper, we adopt the optimize-then-discretize approach to solve
parabolic optimal Dirichlet boundary control problem. First, we derive
the first-order necessary optimality system, which includes the state,
co-state equations and the optimality condition. Then, we propose
Crank-Nicolson finite difference schemes to discretize the optimality
system in 1D and 2D cases, respectively. In order to build the second
order spatial approximation, we use the ghost points on the boundary in
the schemes. We prove that the proposed schemes are unconditionally
stable, compatible and second-order convergent in both time and space.
To avoid solving the large coupled schemes directly, we use the
iterative method. Finally, we present a numerical example to validate
our theoretical analysis.