.FreeFluids.Interfaces.TwoFluidPorts

Information

This partial model contains a FluidPortA PortA, and a FluidPortB PortB connectors, and some equations linking the values of both connectors variables. The more fundamental equation is:
0=PortA.G+PortB.G. This grants that all massic flow entering one port goes out by the other. G is considered positive if the flow enters the port.
Some parameters will configure more possible links between the ports variables:
Finally two variables, with the equations to solve them are added: Hdiff = PortB.H-PortA.H, and Pdiff=PortB.P-PortA.P.
With this implementation, the model is imbalanced in two ways: For the two pairs of potential/flow variables, there are three equations(PortA.G=0, PortB.G=0, PortA.G=-PortB.G), so an equation linking these variables is missing. Normally it will be the calculation of the pressure drop as function of flow. The second point of imbalance is that there is no equation for the calculation of the output PortB.H. The extending models must provide the missing equations.
Although not correct according to the Modelica standard, the model is prepared for the connection of more than one PortB to a PortA, with the idea of making simpler and faster some connections. When doing so we must take into account that, in a connection, point elevation, enthalpy, and composition, must be supplied only by one connector. If not, we will have an over specification for the value. The situation is different for elevation than for enthalpy and composition. In a connection point all the ports must have the same elevation, so the only thing that we have to do is to inhibit the duplicate propagation of the elevation, making useHeightDifference=true only in one of the elements that can supply the elevation value to the connection. For enthalpy and composition, it must be possible to connect elements with different enthalpy or composition output, and this can be done using mixers, that for simplification are coded as no reverse flow. But, if the enthalpy variation inside the elements is only due to elevation changes, we can grant that all connectors have the same enthalpy at the connection point, and solve the problem in the same way that we did with elevation, allowing reverse flow. The same is applicable for composition, if composition is constant.
A second point must be considered: In a connection of more than two connectors, regardless the physical size of the connections could be the same, there is normally a change in velocity, so in kinetic energy and enthalpy. This means that the equal enthalpy solution is only an approximate solution valid when the velocity is low (liquids and gases at not high velocity).

As a resume, we will develop elements allowing for reverse flow, based in a fixed enthalpy and composition at each connection point, and elements without reverse flow capability, valid for situations with different enthalpy, or composition, of the connectors.

Contents

NameDescription
 MediumMedium model

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos