  Buildings contain electro-mechanical systems that ensure the occupants'
comfort, health, and safety. The functioning of these systems is automated
through control programs, which are often available as reusable artifacts in a
software library. However, matching these reusable control programs to the
installed technical systems requires manual effort and adds engineering cost.
In this article, we show that such matching can be accomplished fully
automatically through logical rules and based on the creation of semantic
relationships between descriptions of \emph{physical processes} and
descriptions of technical systems and control programs. For this purpose, we
propose a high-level bridging ontology that enables the desired rule-based
matching and equips digital twins of the technical systems with the required
knowledge about the underlying physical processes in a self-contained manner.
We evaluated our approach in a real-life building automation project with a
total of 34 deployed air handling units. Our data show that rules based on our
bridging ontology enabled the system to infer the suitable choice of control
programs automatically in more than 90\% of the cases while avoiding almost an
hour of manual work for each such match.
