When developing cyber-physical systems (CPS), the context is of vital importance.CPS interact with the world not only through sensing the environment and acting upon it (like embedded systems) but also by communicating with other CPS (like systems in the Internet of Things [IoT]). This means that the context interactions CPS must deal with are much greater than regular embedded or IoT systems: On the one hand, external systems and human users constrain the specific interaction among them. On the other hand, properties of these external systems, human users, and laws, regulations, or standards constrain the way the CPS must be developed. In this paper, we propose a comprehensive, ontologically grounded context modeling framework to systematically explore the problem space in which a CPS under development will operate. This allows for the systematic elicitation of requirements for the CPS, early validation and verification of its properties, and safety assessment of its context interactions at runtime.