I am confused about defining systems and calcuating work in a thermodynamic cycle, say a typical power cycle. Such a cycle might have a pump, boiler, turbine, and condenser.
Now the typical assumption is if we define a system as a boiler or as a condenser, we say that no work is done on those systems and the only relevant terms in an energy balance would be heat transfer and the enthalpies of the masses coming in and out. In this kind of scenario, would the efficiency of the cycle be defined as Wnet / Qin where Qin is the heat added to the boiler and work net is the difference between the work done by the turbine and the work added to the pump?
But if I look at the gas as a system rather than each individual component, I would want to assert that the gas in the boiler and condenser does work because of the change in its volume (dW = P dV). Am I correct to assume this? And if so, would the gas as a system on its own in the turbine do a different amount of work than the amount of work the turbine (if the turbine is the system) might produce in the same cycle?
And if so, would asking what the efficiency of the cycle yield a different answer when defining the system as the gas in the cycle versus each block of the cycle as a system?
EDIT: In the last part, would the net work we use for defining efficiency if the system is the gas alone the net work performed by the gas in all 4 blocks of the cycle (its two expansions and compressions)? Contrast this with my previous assumption where work net is the difference in work the turbine outputs minus the work input into the compressor/pump if the systems are each block.