Geodynamical simulations underpin our understanding of upper-mantle processes, but their predictions require validation against observational data. Widely used geophysical datasets provide limited constraints on dynamical processes into the geological past, whereas under-exploited geochemical observations from volcanic lavas at Earth's surface constitute a valuable record of mantle processes back in time. Here, we describe a new peridotite-melting parameterization, BDD21, that can predict the incompatible-element concentrations of melts within geodynamical simulations, thereby providing a means to validate these simulations against geochemical datasets. Here, BDD21's functionality is illustrated using the Fluidity computational modelling framework, although it is designed so that it can be integrated with other geodynamical software. To validate our melting parameterization and coupled geochemical-geodynamical approach, we develop 2-D single-phase flow simulations of melting associated with passive upwelling beneath mid-oceanic ridges and edge-driven convection adjacent to lithospheric steps. We find that melt volumes and compositions calculated for mid-oceanic ridges at a range of mantle temperatures and plate-spreading rates closely match those observed at present-day ridges. Our lithospheric-step simulations predict spatial and temporal melting trends that are consistent with those recorded at intra-plate volcanic provinces in similar geologic settings. Taken together, these results suggest that our coupled geochemical-geodynamical approach can accurately predict a suite of present-day geochemical observations. Since our results are sensitive to small changes in upper-mantle thermal and compositional structure, this novel approach provides a means to improve our understanding of the mantle's thermo-chemical structure and flow regime into the geological past.