-
Notifications
You must be signed in to change notification settings - Fork 194
I don't understand the relationship between enthalpy and energy in modelica_fluid #4226
There are two equations below:
0 = port_a.m_flow * actualStream(port_a.h_outflow) + port_b.m_flow *
actualStream(port_b.h_outflow) + Q_flow * 1000;
port_a.h_outflow = port_b.h_outflow;
Why is there energy input, but the specific enthalpy remains constant?Are the above two equations contradictory?
All reactions
Replies: 1 comment
I suggest reading the Modelica specification chapter on stream connectors. Additionally, there is an appendix with additional detail. Also, this is probably a better question for stack overflow, but I'll quickly answer here:
First, to address your concern: no, the two equations are not contradictory. The first one is a steady state energy conservation equation (probably what you know and understand already, i.e. from thermodynamics--1st law for open systems).
Regarding the 2nd equation, it does not imply that the specific enthalpy is constant, but instead just states that the h_outflow values (enthalpy values if flows were negative) are equal to each other. To understand this, we need to remember that h_outflow is specifically the enthalpy at that location if the m_flow were negative. It might be helpful to think about another conceptual variable: h, the specific enthalpy within the control volume for your component. Instead of the single equation you have, you could have the following two equations.
port_a.h_outflow = h;
port_b.h_outflow = h;
These equations should individually feel natural, since if the flow were negative the port, the respective enthalpy would be equal to in enthalpy state within the control volume. And of course, you can combine these two equations, eliminate h, and get back to where you started.