A coworker and I were discussing this issue related to fluids dynamics, Venturi and Bernoulli. We are both a bit rusty with our knowledge, so we know something is wrong in our reasoning, but I need your help in pointing it out.
So we are assuming a fluid moving in a pipe frictionless pipe at a certain speed $v_1$ and pressure $p_1$, this fluid enters a diverging section with area $A_2$ ($A_2 > A_1$).
By Bernoulli and conservation of energy, if we are not mistaken, this will mean that $v_2 < v_1$, $p_2 >p_1$ which means that the temperature $T_2 > T_1$. Is our reasoning right until this point?
If yes, we assume now that we add a non-adiabatic part in the pipe at radius $R_2$ where the fluid loses some of its energy $-Q_2$ (hence temperature) to the surrounding environment, and then it continues its flow in the adiabatic part of the pipe.
Now into a converging section back to radius $R_1$. And in this section, there is another non adiabatic part where the fluid gains back the same amount of energy lost $+Q_1$.
The question we are asking ourselves is the following: Is there a way to have these exchanges in a way that allows the fluid to go back to velocity $v_1$ in the second converging part if $Q_1 = -Q_2$?
I know that there are probably a lot of errors in our reasoning and I would really appreciate some explanation on the topic.