  We consider an elliptic boundary value problem with unilateral constraints
and subdifferential boundary conditions. The problem describes the heat
transfer in a domain $D\subset\R^d$ and its weak formulation is in the form of
a hemivariational inequality for the temperature field, denoted by $\cP$. We
associate to Problem $\cP$ an optimal control problem, denoted by $\cQ$. Then,
using appropriate Tykhonov triples, governed by a nonlinear operator $G$ and a
convex $\wK$, we provide results concerning the well-posedness of problems
$\cP$ and $\cQ$. Our main results are Theorems 14 and 18, together with their
corollaries. Their proofs are based on arguments of compactness, lower
semicontinuity and pseudomonotonicity. Moreover, we consider three relevant
perturbations of the heat transfer boundary valued problem which lead to
penalty versions of Problem $\cP$, constructed with particular choices of $G$
and $\wK$. We prove that Theorems 14 and 18 as well as their corollaries can be
applied in the study of these problems, in order to obtain various convergence
results.
