An extended variational formulation of the non-linear heat and mass transfer in a porous medium