.ModelicaTest.Fluid.TestComponents.Vessels.TestInitialization

Information

Original intention

Ticket #63: Medium SimpleAir was missing stateSelect.prefer on pressure p. This led to the bad state m without start value and resulted in a division by zero. Work-around: Use Medium MoistAir.

New intention

Ticket #1222 (TestInitialization does not initialize): The model uses StaticPipe models connected to a ClosedVolume with port models. This results in algebraic loops for the pressures between the pipes and the volume. The use of homotopy in its current form results in additional nonlinear equation systems.

Ticket #736 (Use of m_flow_small, m_flow_turbulent and dp_small): The model is motivated by air conditioning that is characterized by relatively small mass flow rates and very small pressure drops. The overall pressure drop is 10 Pa from source to sink. This pressure drop is almost completely taken by the tank outlet towards pipe2 under steady conditions. The pipes have a pressure drop between about 5 Pa and 1e-2 Pa each during the transient simulation. The mass flow rate starts at about 0.2 kg/s and reaches a steady value at about 6e-3 kg/s.

The classic setting in the Advanced tab of the system model introduce m_flow_small=1e-2 kg/s and dp_small=1 Pa per default. In particular dp_small is too large for the pipe models and can hardly be used for regularization of zero flow -- note that it may be appropriate for other component models, like the tank outlet. dp_small largely depends on the flow characteristics of individual component models.

With the new setting system.use_eps_Re=true only a nominal mass flow rate is configured. The nominal and small pressure drops as well as the transition between laminar and turbulent flow are calculated inside each component model individually. Using the default system.m_flow_nominall=1 kg/s, the pipes adjust their nominal pressure drop dp_fric_nominal to 100 Pa and dp_small to 1e-2 Pa. The volume adjusts the transition between laminar and turbulent flow through its ports at about m_flow_turbulent=4e-4 kg/s.

The variable pipe1.port_a.m_flow shows best the difference between different settings, e.g. for system.use_eps_Re=true vs. false.

Contents

NameDescription
 Medium

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