Inverse modeling for casting simulations