We present the first quantitative model of heat, mass and both major and trace element transport in a mush undergoing compaction that accounts for component transport and chemical reaction during melt migration and which is applicable to crustal systems. The model describes the phase behavior of binary systems (both eutectic and solid solution), with melt and solid compositions determined from phase diagrams using the local temperature and bulk composition. Trace element concentration is also determined. The results demonstrate that component transport and chemical reaction generate compositional variation in both major and trace elements that is not captured by existing geochemical models. In particular, we find that, even for the simplest case of a homogenous, insulated column that is instantaneously melted then allowed to compact, component transport and reaction leads to spatial variations in major element composition that, in this case, produces melt that is more enriched in incompatible elements than predicted by batch melting. In deep crustal hot zones (DCHZ), created by the repeated intrusion of hot, mantlederived magmas, buoyant melt migrating upwards accumulates in high porosity layers, but has a composition corresponding to only a small fraction of batch melting, because it has locally equilibrated with mush at low temperature; moreover, melt migration and chemical reaction in a layered protolith may lead to the rapid formation of high porosity melt layers at the interface between different rock compositions. In both of these cases, the melt in the high porosity layer(s) is less enriched in incompatible trace elements than predicted if it is assumed that melt with the same major element composition was produced by batch melting. This distinctive decoupling of major and trace element fractionation may be characteristic of magmas that originate in DCHZ. Application of the model to a number of crustal systems, including the Ivrea-Verbano zone, the Rum layered intrusion, and the Holyoke flood basalt, suggests that compositional heterogeneity can be explained by buoyancy-driven melt migration and component transport through a reactive crystalline mush.