Determination of the heat transfer coefficient for variable geometries and thermal flows