Abstract: Representation of scientific knowledge in ontologies suffers so often from the lack of computational knowledge required for inference. This article aims to perform quantitative analysis on physical systems, that is, to answer questions about values of quantitative state variables of a physical system with known structure. For this objective, we incorporate procedural knowledge on two distinct levels. At the domain-specific level, we propose a representation model for scientific knowledge, i.e. variables, theories, and laws of nature. At the domain-independent level, we provide an algorithm which, given a system S with known structure and a relevant scientific theory T, extracts a constraint network, whose variables are state variables of S defined by T, and whose constraints raise from relevant laws in T. The constraint network is then solved, to build a system of equations whose unknowns are the output variables of S. The proposed representation model and reasoning algorithm are evaluated by applying them to classic analysis examples.