Application of Nonequilibrium Thermodynamics in Second Law Analysis