Thermochemical energy storage can play an important role in the establishment of a reliable renewable energy supply and can increase the efficiency of industrial processes. The application of directly permeated reactive beds leads to strongly coupled mass and heat transport processes that also determine reaction kinetics. To advance this technology beyond the laboratory stage requires a thorough theoretical understanding of the multiphysics phenomena and their quantification on a scale relevant to engineering analyses. Here, the theoretical derivation of a macroscopic model for multicomponent compressible gas flow through a porous solid is presented along with its finite element implementation where solid-gas reactions occur and both phases have individual temperature fields. The model is embedded in the Theory of Porous Media and the derivation is based on the evaluation of the Clausius-Duhem inequality. Special emphasis is placed on the interphase coupling via mass, momentum and energy interaction terms and their effects are partially illustrated using numerical examples. Novel features of the implementation of the described model are verified via comparisons to analytical solutions. The specification, validation and application of the full model to a calcium hydroxide/calcium oxide based thermochemical storage system are the subject of part 2 of this study.