# Writing an equation for the INTERNAL energy for a BRAYTON cycle

I am trying to understand the equation for the change in internal energy in the Brayton Cycle.

Both the websites below gave me this formula :Change in U=q1+q2−w=0 Is the w in this picture equal to the Wnet - Wcomp displayed in this picture?

I understand that the internal energy change (Change in U) is ZERO assuming energy is conserved

q1 = energy being transferred from the system to the environment as heat q2 = energy being transferred from the environment to the system as heat

And that both these processes are isobaric!

With w (work), there are two instances where work is done: first, at the compressor and second, at the turbine.

So if there is work done by gas ON the turbine and work being done by the gas ON the gas ...the net work being done on the gas (looking at the whole), is the work done ON the gas (w2) MINUS the work done BY the gas (w1) ON the turbine? I chose w2-w1 because w2 is a positive value (at least in terms of increasing the energy of the gas)

I would have written this : change in U = 0 = q1 + q2 + w2 - w1

I just don't know how to negotiate this with the intial formula I have written.

In any practical gas turbine engine, you do not supply energy to the compressor. Instead, a shaft connects the axial flow turbine to the axial flow compressor. So, in simple terms, you take a fraction of the energy developed by the turbine and supply it to the compressor. Hence, you define your net work output or $W_{\rm net}$ as: $$W_{\rm net} = W_t - W_c$$ where $W_t$ is the energy developed by the turbine and $W_c$ is the energy consumed by the compressor
Hence in the formula given the previously mentioned sites, "w" is $W_{\rm net}$ and is written as I have mentioned above.