Greater use of modeling techniques across a wider range of tasks and users will require domain theories that are orders of magnitude larger than today's theories, describe phenomena at several levels of granularity, and incorporate multiple perspectives. To build and use such theories effectively requires methods for augmenting traditional equational models with all the underlying information used in their derivation. This paper describes compositional modeling, a technique that addresses these issues. It uses explicit modeling assumptions to decompose domain knowledge into semi-independent model fragments, each describing various aspects of objects and physical processes. We describe an implemented algorithm for model composition which, given a query about an artifact's behavior will compose a model that suffices to answer the query while minimizing extraneous detail. We illustrate the utility of compositional modeling by outlining the organization of a large-scale, multi-grain, multi-perspective model we have built for engineering thermodynamics, and showing how the model composition algorithm can be used to automatically select the appropriate knowledge to answer questions in a tutorial setting.