A new algorithm for internal heat generation in nanofluid flow due to a stretching sheet in a porous medium