modelTestSuddenExpansion

Test of sudden expansion models, with correct and wrong usage

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This example shows the use of a sudden expansion / contraction model, which is connected to two boundary conditions prescribing static pressure. Notice that the prescribed static pressure on the right boundary is higher than on the left one. Still, the fluid flows from left to right.

The reason for this is that the boundary conditions model infinite reservoirs with an infinite diameter and thus zero flow velocity. The sudden expansion model does however have two ends with finite diameters, and, as explained in the Overview of the Users' Guide, the momentum balance is not fulfilled exactly for this type of connections. Using a simple connect()-statement, the difference of the kinetic terms is neglected, which is not reasonable in the present model: At the left boundary condition it is zero, and on the left side of the sudden expansion it has a non-zero value. It is not reasonable to neglect it in the shown model, because there is little friction and therefore these kinetic effects dominate. Consequently, only modelling these effects explicitly leads to the correct results.

To do so, two additional sudden expansions / contractions are included in the model. The diameter is set to a large value (1e60) close to the boundaries and the proper values close to the original model. These additional components now introduce exact momentum balances and the results are as expected.

Components

TypeNameDefaultDescription
Modelica.Fluid.Sources.Boundary_pTleftBoundary1
Modelica.Fluid.Sources.Boundary_pTrightBoundary1
Modelica.Fluid.Fittings.AbruptAdaptorsuddenExpansion1
Modelica.Fluid.Sources.Boundary_pTleftBoundary2
Modelica.Fluid.Sources.Boundary_pTrightBoundary2
Modelica.Fluid.Fittings.AbruptAdaptorsuddenExpansion2
Modelica.Fluid.Fittings.AbruptAdaptorleftAdapter
Modelica.Fluid.Fittings.AbruptAdaptorrightAdapter
Modelica.Fluid.Systemsystem