This article can be interesting for design and simulation engineers working with cooling applications and thermal managements systems, from automotive or buildings industries (air-conditioning systems, batteries cooling, evaporators for multi-zone areas).


Advances of zero flow simulation of air conditioning systems using Modelica Increased simulation robustness with systematic heat transfer coefficients analysis

Simulating refrigerant loops at (near) zero flow for large vapor compression cycles is challenging due to the fast dynamics in the model under those conditions, which drastically reduce the step size of the solver.

This motivated a team from Modelon together with two European automotive partners in finding solutions to address the problem. In addition to the existing best practices on solver selection, pressure drop correlations, the common project led to recommendations on adjusting heat transfer correlations, which can improve the simulation robustness under such conditions.

We had the opportunity to present the results in May 2016 in Tokyo, at the first Japanese Modelica Conference.:

Pieter Dermont 1, Dirk Limperich 2, Johan Windahl 1, Katrin Prölss 1, Carsten Kübler 3 - Advances of Zero Flow Simulation of Air Conditioning Systems using Modelica, Proceedings of the first Japanese Modelica Conference, May 2016, Tokyo, Japan, pp 139-144.

  1. Modelon AB, Sweden
  2. Daimler AG, Germany
  3. TWT GmbH, Germany 

Modelon’s Air Conditioning Library is used by automotive OEM’s and suppliers for simulations of air conditioning applications for vehicles. 

Case study: 
two evaporator branches, and two types of compressor shut-downs

The work highlighted here used data and cases provided by an automotive OEM, which included a large system model based on R134a refrigerant. The model comprised two evaporator branches.

In the beginning of the study, the scenarios   for which the compressor was shut down (via reduction of possible displacement volume, and alternatively via reduction of shaft speed) showed significant increase in CPU time right after compressor shut-down.

This prevented the simulation to complete within a reasonable time frame (3600 sec). Why?

What’s the problem with zero-flow simulations?

Figure 1. Oscillations in mass flow are a typical symptom of the zero flow problem.

What happens is that close to zero-flow conditions fast dynamics in the model are generated due to model time constants that get very low (see the mass flow oscillations in Figure 1), resulting in drastically reduced solver step size, and thus dramatically increased CPU times.



What can be done to improve robustness?

To get in better control with CPU time and robustness of zero-flow calculations, our study tried different measures and resulted in several recommendations in simulation setup.

A short overview is presented below. For more details, please read the full article and do not hesitate to contact us.

1.      Pressure-drop correlation regularization and operation point based pressure drop correlations

Figure 2. A regularized pressure drop by increasing the derivative within a user-specified region (dotted line).

The pressure-drop correlation prescribes a relationship between the pressure drop and the mass flow approximately of quadratic nature. For a mass flow approaching zero, the derivative of this relationship approaches zero causing the solver to jump between different solutions that are beyond solver tolerance. To mitigate this symptom, one needs to ensure that the derivative of the relationship does not fall below a threshold value through regularization of the relationship.

All pressure drop correlations in the Air Conditioning Library can be regularized with a parameter.

Operation point based pressure drop correlations, as opposed to geometry based pressure drop correlations, allow you to specify the nominal mass flow and pressure drop to define the pipe’s behavior. Since they are to a lesser extent dependent on the complex fluid properties, they are preferred for zero-flow simulation.

2.      Solver selection

One-step algorithms are more efficient at handling stiff problem formulations, which is the case for a (near) zero flow simulation, therefore RadauII is the preferred solver.

3.      Heat transfer handling

Furthermore, the work resulted in conclusions on how heat transfer coefficients influence the zero-flow robustness.  I give below a short overview.

a.      Reduce the Difference in Heat Transfer Coefficient Between One-Phase and Two-Phase at Zero-Flow. For close to zero flow conditions the heat transfer coefficient is smoothly interpolated between different phases. The threshold for this interpolation is either a minimum mass flow or a minimum Reynolds number.

b.       Filtering the Heat Transfer Coefficient. Applying the filter has a recognizable effect on the simulation robustness. The value of the time constant has been tried within a given interval; the concept proved beneficial in all cases, meanwhile no universally optimal value could be determined.

The approaches above have been tested with large system models and demonstrated to increase simulation robustness under (near) zero flow conditions. Systems simulations during which the compressor was repeatedly shut-down previously got stuck, but now run to the end.

Note that the above methods affect the heat transfer coefficients at (near) zero flow. How can one verify that the above methods mimic the physics correctly? One can’t. Two-phase correlations inherently are not valid outside the turbulent regime.

Concerning discretization schemes

The library uses an upwind discretization scheme, intended for (strong) convective flows with no diffusion effect.

Other consideration connected to tackling the zero-flow problematics concerns adding a diffusion-like discretization scheme in the energy conservation equation for the control volumes, and create a thermal link between adjacent control volumes. This has been tried before with no satisfactory results, and led to the conclusion that the relatively weak diffusion driving forces could not necessarily offset the large difference in energy accumulation through the heat transfer coefficients.  

What now?

All in all, the steps we took towards improved tackling of zero-flow behavior in simulations proved to lead in the right direction.

We gained significant understanding of the modeling problem, and we were capable to formulate possible remedies. Aware that the remedies are not complete, we already think of further improvements.

If zero flow simulation with Modelica happens to keep you awake during night, do not hesitate to use our experience and ask us for advice!


Pieter Dermont holds a MSc in Mechanical Engineering from the École Polytechnique Fédérale de Lausanne, focused on the energy industry. Pieter is a modeling and simulation consultant, active in a variety of thermodynamic products and projects, as well as in teaching.

Adina Tunér is a Marketing Communications Manager at Modelon. With a keen interest in writing, a PhD in Mechanical Engineering from Romania, another one from Sweden, and with 17 years of engine research in her rucksack, Adina settled lately for the challenges of melting together innovative technologies with business and communication.

by Peter Dermont and Adina Tunér