A comprehensive methodology to analyse the Global Energy Balance in Reciprocating Internal Combustion Engines