Entropy Generation Rate
The rate of entropy generation can be derived from:
\dot{S}_{gen}=\dfrac{dS_{cv}}{dt}+\dfrac{dS_{surr}}{dt}
By definition, for a steady state process \dfrac{dS_{cv}}{dt}=0. All that remains is to define entropy generation from the surroundings, \dfrac{dS_{surr}}{dt}=0.
\dfrac{dS_{surr}}{dt}=\sum\dot{m}_es_e-\sum\dot{m}_is_i-\dfrac{\dot{Q}_{cv}}{T_{surr}}
Transient Processes
By integrating all the terms for entropy generation as a rate we can calculate the entropy generation for a transient process.
\displaystyle\int_{t_1}^{t_2}\dfrac{dS_{cv}}{dt}dt=(m_2s_2-m_1s_1)_{cv}
\displaystyle\int_{t_1}^{t_2}\left(\sum\dot{m}_es_e-\sum\dot{m}_is_i\right)dt=\sum m_es_e-\sum m_is_i
\displaystyle\int_{t_1}^{t_2}\dfrac{\dot{Q}_{cv}}{T_{surr}}dt=\dfrac{Q_{1\to2}}{T_{surr}}
Overall the entropy generation for a transient process will be:
\boxed{S_{1\to 2}=(m_2s_2-m_1s_1)_{cv}+\sum m_es_e-\sum m_is_i-\dfrac{Q_{1\to2}}{T_{surr}}}
Ideal Work
Using the relation between heat and entropy we can determine the work for an irreversible cycle.
\displaystyle s_e-s_i=\int_i^e\dfrac{\delta q}{T}+s_{gen}
\displaystyle ds=\dfrac{\delta q}{T}+\delta s_{gen}
Solving for heat as follows:
\delta q=Tds-T\delta s_{gen}
\displaystyle q=\int_i^e Tds-\int_i^eT\delta s_{gen}
Using the Gibbs equation for the first term:
\displaystyle q=\int_i^e dh-\int_i^e\nu dP-\int_i^eT\delta s_{gen}
Finally, application of the first law will result in:
q-w=h_e-h_i+\dfrac{1}{2}(v_e^2-v_i^2)+g(z_e-z_i)
\displaystyle h_e-h_i-\int_i^e\nu dP-\int_i^eT\delta s_{gen}-w=h_e-h_i+\dfrac{1}{2}(v_e^2-v_i^2)+g(z_e-z_i)
\displaystyle w=\dfrac{1}{2}(v_i^2-v_e^2)+g(z_i-z_e)-\int_i^e\nu dP-\int_i^eT\delta s_{gen}
Entropy generation, \int_i^eT\delta s_{gen}, is unique to irreversible processes. Therefore, the resultant work for an ideal, reversible process is:
\boxed{\displaystyle w=\dfrac{1}{2}(v_i^2-v_e^2)+g(z_i-z_e)-\int_i^e\nu dP}
Device Efficiency
The efficiency of a single device can be defined by comparing it to a theoretical isentropic (s_i=s_e) device of the same type. The isentropic turbine, compressor, pump, and nozzle will have the same inlet and outlet pressure, as well as the same inlet temperature as the real device. In other words, the theoretical isentropic device, denoted with subscript s, will have T_i=T_{i,s}, P_i=P_{i,s}, and P_e=P_{e,s}.
Turbine
Pump/Compressor
Nozzle