Inverse modelling of core flood experiments for predictive models of sandstone and carbonate rocks