How does flow work arises in enegy balance using Reynolds Transport theorem? I will use the below mentioned form of Reynolds Transport theorem(usually derived in Fluid Mechanics context) to give a relation between a Control mass system(no mass in or out) and Control Volume(randomly chosen time varying region of interest). It gives the relation between a chosen region of interest called control volume with continously changing control mass systems under consideration that they pass through the chosen control volume at any time $t$ (respectively). I will also use $\delta$ to represent differential elements in space as contrasting from $d$ for differntials in time. 

$$\dfrac{d}{dt}\int_{sys(t)} \rho \;\eta \;\ \delta V=\dfrac{d}{dt}\int_{CV(t)} \rho \;\eta \;\ \delta V+\int_{\partial CV(t)}\rho \;\eta\; (\vec{V}_{sys}-\vec{V}_{CV}).\delta\vec{A}_{out}$$


First, I let $\eta=1$ and I get the conservation of mass. 
$$\dfrac{d}{dt}(M_{sys})=\dfrac{d}{dt}(M_{CV})+\int_{\partial CV(t)}\delta(\dot{m}_{rel})$$
Using $\dfrac{d}{dt}(M_{sys})=0$, I get simply
$$\dfrac{d}{dt}(M_{CV})=(\dot{M}_{rel})_{in}-(\dot{M}_{rel})_{out}$$
And I believe this expression is correct and make intuitive sense with the notion of mass conservation. 

Now I let $\eta = e = u + V^{2}/2 + gz$ , it's the energy content defined locally with respect to an inertial frame of reference(and so is everything else to follow). Where each component is obviously both a function of space and time.
$$\dfrac{d}{dt}\int_{sys(t)} \rho \;e \;\ \delta V=\dfrac{d}{dt}\int_{CV(t)} \rho \;e \;\ \delta V+\int_{\partial CV(t)}\rho \;e (\vec{V}_{sys}-\vec{V}_{CV}).\delta\vec{A}_{out}$$ 
Which can be written as, 
$$\dfrac{d}{dt}(E_{sys})=\dfrac{d}{dt}(E_{CV})+\int_{\partial CV(t)}\rho \;e (\vec{V}_{sys}-\vec{V}_{CV}).\delta\vec{A}_{out}$$ 
Now using the first law of thermodynamics, I can write for the system that. 
$$\dfrac{d}{dt}(E_{sys})=(\dot{Q}_{sys})_{net-in}-(\dot{W}_{sys})_{net-out}$$
Using this, I get.
$$\dfrac{d}{dt}(E_{CV})=(\dot{Q}_{sys})_{net-in}-(\dot{W}_{sys})_{net-out}-\int_{\partial CV(t)}\;e \;\delta(\dot{m}_{rel})$$
I now attempt the following reasoning work to recover the flow work term from the general work term. We can think that the system in our case is continuously being applied upon a pressure $P$ on its boundary $\partial sys(t)$ by the surrounding fluid. Therefore, a boundary work is being done on the system by the surrounding fluid by virtue of pressure. Assuming finite time and space. We can approximate with finite $\Delta$ for a small time and say for the time being some small area $\delta A$. Then the work done on the system by this pressure $P$ is. (Note that we are assuming that all deviatoric stresses are zero, not true in general).
$$\delta(\Delta W_{flow}) = P \;\delta A . \Delta x_{n}= -P \;\delta \vec{A}_{out} . \Delta \vec{x}=-P \;\delta \vec{A}_{out} . \vec{V}_{sys} \Delta t$$
Under the limit of $\Delta t \to 0$, I will get $\delta(\dot{W}_{flow})=-P \;\delta \vec{A}_{out} . \vec{V}_{sys}$
Integrating over the system boundary, I get. $(\dot{W}_{flow})_{in}=- \int_{\partial sys(t)=\partial CV(t)}P \;\delta \vec{A}_{out} . \vec{V}_{sys}=-\int_{\partial CV(t)}(Pv)\; \rho \;\delta \vec{A}_{out} . \vec{V}_{sys}$
$=-\int_{\partial CV(t)}(Pv)\; \rho \;\delta \vec{A}_{out} . (\vec{V}_{sys}-\vec{V}_{CV})-\int_{\partial CV(t)}(Pv)\; \rho \;\delta \vec{A}_{out} . (\vec{V}_{CV})$
$=-\int_{\partial CV(t)}(Pv)\; \delta(\dot{m}_{rel})-\int_{\partial CV(t)}(Pv)\; \rho \;\delta \vec{A}_{out} . (\vec{V}_{CV})$
Is there any error in my reasoning, if not, what is the meaning of the additional term given next in the energy equation after enthalpy term?
$$\dfrac{d}{dt}(E_{CV})=(\dot{Q}_{sys})_{net-in}-(\dot{W}_{nf-sys})_{net-out}-\int_{\partial CV(t)}\;\theta \;\delta(\dot{m}_{rel})-\int_{\partial CV(t)}(Pv)\; \rho \;\delta \vec{A}_{out} . (\vec{V}_{CV})$$
$$=(\dot{Q}_{sys})_{net-in}-(\dot{W}_{nf-sys})_{net-out}-\int_{\partial CV(t)}\;e \;\delta(\dot{m}_{rel})-\int_{\partial CV(t)}(Pv)\; \rho \;\delta \vec{A}_{out} . (\vec{V}_{sys})$$
$$=(\dot{Q}_{sys})_{net-in}-(\dot{W}_{nf-sys})_{net-out}-\int_{\partial CV(t)}\;e \;\delta(\dot{m}_{rel})-\int_{\partial CV(t)}(Pv)\; \delta(\dot{m}_{sys})$$
Or is it the case that the term carries no physical meaning and it's better to write it in just terms of $e$ and some flow work?

I have also done the same thing for entropy balance and I think I have derived the correct result. Can someone verify?
Now I let $\eta = s$ , it's the entropy defined locally.
$$\dfrac{d}{dt}\int_{sys(t)} \rho \;s \;\ \delta V=\dfrac{d}{dt}\int_{CV(t)} \rho \;s \;\ \delta V+\int_{\partial CV(t)}\rho \;s (\vec{V}_{sys}-\vec{V}_{CV}).\delta\vec{A}_{out}$$ 
Which can be written as, 
$$\dfrac{d}{dt}(S_{sys})=\dfrac{d}{dt}(S_{CV})+\int_{\partial CV(t)}\rho \;s (\vec{V}_{sys}-\vec{V}_{CV}).\delta\vec{A}_{out}$$ 
Now using the second law of thermodynamics and Clausius inequality(augmented with $\dot{S}_{gen}$ term), I can write for the system that. 
$$\dfrac{d}{dt}(S_{sys})=\int_{\partial sys(t)=\partial CV(t)}\dfrac{\delta(\dot{Q}_{sys})_{in}}{T}+ \dot{S}_{gen-sys}$$
Using this, I get.
$$\dfrac{d}{dt}(S_{CV})=\int_{\partial CV(t)}\dfrac{\delta(\dot{Q}_{sys})_{in}}{T}+ \dot{S}_{gen-sys}-\int_{\partial CV(t)}\;s \;\delta(\dot{m}_{rel})$$
 A: In the open system (control volume) version of the first law of thermodynamics, the rate of doing work is split into two separate parts:  1.  Work associated with pushing fluid into and out of the control volume by fluid behind at the inlet and fluid ahead at the outlet acting like pistons and 2. All other work, called “shaft work” because it oftn involves a rotating shaft like a turbine.  The work in category 1. Is lumped together with the internal energy of the inlet and outlet streams mathematically to obtain the enthalpy of these streams.
A: Your original transport equation is based on a closed system. In this system the velocity of the system boundary and the velocity of the material at the system are always identical.  
When you transition to the Eulerian/open system perspective via the RTT, you need to worry about the fact that there are (in general) two velocities at the system boundary: the velocity at which the boundary is moving, and the velocity at which the local material is moving. One can also construct a third velocity by subtracting - this gives the velocity of the local material relative to the boundary. The key thing to remember is that the velocity (or displacement) that appears in the closed-system work equation now corresponds to the velocity of the local material, which is no longer the same as the velocity of the boundary because the definition of the system boundary has changed (closed to open). One could just leave the work term expressed in terms of the material velocity $\vec{v}_\text{material}$, but it is often more convenient to say
$$
\vec{v}_\text{material} = \underbrace{(\vec{v}_\text{material}-v_\text{boundary})}_{\displaystyle\vec{v}_\text{rel}} + v_\text{boundary}.
$$
The expansion/compression work term $\vec{F}\cdot\vec{v}_\text{boundary}$ then gets split into a "flow work" term (associated with the motion of the fluid relative to the boundary at $\vec{v}_\text{rel}$) and a "boundary work" term (associated with the motion of the boundary at $\vec{v}_\text{boundary}$), which are often easy to evaluate individually in simple thermo systems. Neither "work" provides a complete picture of the energy transfer by work, but their sum represents the total work associated with expanding/contracting the material. 
Note that for a closed system $\vec{v}_\text{rel} = 0$ and the total expansion work done/accepted by the material reduces to the "boundary" work. The real physical work is still associated with the expansion/contraction of the material, but in the closed case this motion happens to coincide with the motion of the system boundary. While textbooks sometimes encourage us to think of boundary work as a the "root" quantity (the thing that first principles say must appear the first law), first principles instead say that it is the work associated with expanding/contracting the material that must appear in the first law.
A: The flow work you are talking about is "reversible flow work", $\dot{V}\frac{\Delta P}{L}$, and it is not a standalone energy that would arise in the RTT. We can, however, do some analysis to see what an energy equation with flow work would look like. 
Consider flow through a pipe of perimeter $P$ in the axial direction $x$, with bulk (averaged over the cross section) enthalpy $h(x)$, bulk kinetic energy $\frac{\dot{m}}{2}\bar{u^2}(x)$, input heat flux $q$, and input shaft work $\dot{W}$.

An infinitesimal energy balance (i.e., RTT for energy) on a differential control volume of length $dx$ in a pipe yields the bulk flow energy equation:
$$ \dot{m}\frac{dh}{dx} + \frac{\dot{m}}{2}\frac{d\bar{u^2}}{dx} = qP + \dot{W}$$
Notice that flow work is not a quantity that arose in this energy balance. We can do some thermodynamic analysis, however, to see where the flow work is and how it goes into this energy balance.
From thermodynamics,
$$ dh = Tds + vdP$$
Solving for entropy and applying the bulk flow model,
$$ \dot{m}T\frac{ds}{dx} = \dot{m}\frac{dh}{dx}-\dot{V}\frac{dP}{dx}$$
Substituting our expression for bulk enthalpy,
$$ \dot{m}\frac{dh}{dx} = qP + \dot{W} - \frac{\dot{m}}{2}\frac{d\bar{u^2}}{dx} -\dot{V}\frac{dP}{dx}$$
$$ \dot{m}\frac{dh}{dx} = qP + q_d$$
where $q_d = \dot{W} - \frac{\dot{m}}{2}\frac{d\bar{u^2}}{dx} -\dot{V}\frac{dP}{dx}$ is the heat dissipation per unit pipe length. This is the mechanical energy dissipation that increases the entropy, whereas $qP$ is the thermal energy input that raises the entropy. We can use this definition of heat dissipation with the first equation to obtain
$$ \dot{m}\frac{dh}{dx} = qP + q_d + \dot{V}\frac{dP}{dx}$$
So you can see that we can easily modify an energy balance to include flow work, but it's not a standalone quantity that would appear in an energy balance without manipulating the final result. 
