1 Introduction

Variable refrigerant flow (VRF) multi-heat pump system, as shown in Fig. 1, is one of the representative building heating, ventilation, and air-conditioning (HVAC) systems, which is the main concern of the study. It aims at controlling indoor temperature, humidity, and air quality within a building to keep the thermal comfort and productivity of residents at the cost of electric energy consumption. Consequently, research and development efforts on VRF systems have continually focused on achieving minimal energy consumption and maximal thermal comfort via the innovation in both hardware (HW) and software (SW) of the system.

Fig. 1
figure 1

VRF multi-heat pump system for HVAC of commercial buildings

Recently, model-based design (MBD) is emerging as an efficient way of achieving this goal for ground source heat pumps [1], industrial HVAC systems [2], and heat pump dryer systems [3] showing a perfect match with deep learning-based optimization techniques. MBD is already common in the automobile industry and is well known as the famous ‘V-model’, or design by simulation and validation by experiment [4]. Constructing trustworthy models of the VRF-based HVAC system is the key to a successful MBD, which is the main topic of the study.

As shown in Fig. 2, the complete HVAC system model requires various sub-models, which require interdisciplinary domain knowledge. Besides from the model for building, the complete theoretical description of the VRF system alone requires at least the following academic background: refrigerant-related physics involving phase change and heat transfer, thermodynamics regarding vapor compression cycle, flow dynamics for indoor and outdoor airflow, electro-magnetic theories for motors and inverters of compressors and fans, structural dynamics to describe noise and vibration, chemistry for oil-refrigerant mixture properties, and lubrication theories for bearings and shaft of the compressor. This long list, however, covers only HW, the half of the system. SW, the other half, requires expertise in programming languages under PC, MICOM, and embedded LINUX environment in order to realize ideas based on various control theories from traditional PID to recent AI techniques, communication, and network theories. Therefore, it is obvious that the experts who develop the real product should also develop the virtual product simultaneously, in the sense that no other ones in the company or institutes have a better understanding of the product, nor have more profound domain knowledge and skill sets.

Fig. 2
figure 2

Schematics on building HVAC system model

This speculation is a giant step toward the digital transformation (DX) of an organization since DX literally means transforming all the physical assets into digital assets including individual expertise and knowledge of the engineers. After the completion of DX, the entire engineering legacy will be inherited, accumulated, and re-used by the succeeding members by means of digital models.

However, the realization of DX for someone who wants to go is a long journey for the following reasons: First, many experienced engineers have achieved the current expertise in their own ways using his or her own software, tools, or in-house codes, and, thus, they are resistant to any environmental changes where they cannot use their own means. Second, the model input/output from various physics completely differ in dimension and time scales so the universal interface between models is hard to establish. Third, many engineers especially those involving HW design are not familiar with programming languages, so they feel difficulty in transforming their knowledge and ideas into digital models. The main topic of the present study is also on how to overcome these hurdles.

There are free open platform modeling languages and commercial tools from global solution SW vendors, which are helpful in building models for MBD easily. Among those open platform languages, this study introduces the MBD approach using Modelica™ language. The study summarizes the current milestone in constructing the digital models for VRF-based HVAC systems.

The paper is organized as follows: Sect. 2 explains some key concepts and terminologies in MBD. Section 3 reviews the steady and unsteady cycle simulation models. Section 4 introduces main components modeling by using object-oriented open platform language. The construction of the complete HVAC system model and its validation is dealt with in Sect. 5, followed by the key lessons and conclusions in Sect. 6.

2 Key concepts in MBD

In the section, some key terminologies are briefly explained for readers who are not familiar with the MBD concept.

2.1 V-Model: a procedure for MBD/MBSE

Figure 3 shows an example of V-Model, or the procedure for MBD. Here, the left wing corresponds to the virtual sub-system and system model development, while the right wing denotes verification and validation (V&V) with an increasing portion of real physical assets using a software-in-the-loop (SIL), model-in-the-loop (MIL) and hardware-in-the-loop (HIL) simulations, which will be explained later in this section.

Fig. 3
figure 3

V-cycle process of model-based design

It is remarkable that the entire MBD activities are for the fulfillment of ‘requirements’ which determines the level of model elements, as we will mention later. It should be also noted that the integrated system model, the outcome of MBD, is supposed to be far superior to previous individual simulation tools, and even the real product itself in the sense that, it can run faster than real-time and that it can run even under hard-to-reach extreme conditions. The reason why MBD can save time and cost for product development comes from the power of the integrated model. Finally, it should be mentioned that measured data are still important in MBD for the verification and validation of components and system models.

2.2 Model architecture

Heat pump simulation can be utilized for various purposes from performance prediction to control algorithm validation. Here, it is obvious that the level of description for the model is determined by the purpose of the simulation or the requirements in V-model. In MBD, the professional technique to match the requirements and the level of model description is the ‘system architecture’.

The system architecture is a functionally detailed mapping of the hardware and software components. System architecture is typically done in systems modeling language (SysML), a general-purpose modeling language for system engineering applications that supports the specification, design, verification, and validation of systems. Figure 4 shows an example of a commercial architecture and MBSE tool CATIA Magic [5].

Fig. 4
figure 4

The example of a screenshot of the commercial SysML software

A good definition of the system architecture allows engineers to properly combine systems, subsystems, and components for optimal performance and leads to synergy with other teams during the collaboration, which is the main advantage of MBD. Detailed architecture enables us to actively respond to design change with minimal time and cost.

2.3 Functional mockup interface (FMI)

Despite remarkable progress in simulation techniques during the last decades, there is still a long way to go until the complete replacement of real asset-based development. The main difficulty comes from the lack of interfacing technologies among physical models having different spatial dimensions and time scales written in various computer languages. Thus, a global standard for the model interface is strongly warranted.

In this regard, the functional mockup interface (FMI) is a tool-independent standard for the exchange of dynamic models and for co-simulation [5]. Models that follow the FMI standard are called functional mockup units (FMU). As shown in Fig. 5, there are two types of FMU depending on whether it contains its own solver or not.

Fig. 5
figure 5

Schematics on FMI/FMU for model exchange and co-simulation

The primary goal of introducing FMU is to support the exchange of simulation models between suppliers and OEMs even if a large variety of different tools are used. The FMI was developed in a close collaboration between simulation tool vendors and research institutes. Currently, most open platform modeling languages and solutions support FMI standards.

2.4 Reduced-order model (ROM) and 1D/3D co-simulation

Although the introduction of FMI resolved the most of interfacial issues, there remain fundamental interdimensional connection issues: some models are functional 1D models, while others might be geometry-based 3D models. In the case of the VRF heat pump system, the co-simulation between the 1D refrigerant cycle model and 3D indoor airflow simulation is the case.

Since the real-time co-simulation of 3D models together with 1D models is impractical, Reduced-Order-Model (ROM) for 3D models is often adopted in order to go around this problem of interchanging data with 1D models. At the early stage of MBD, 3D ROMs are created by the regression of separate 3D simulations at some selective conditions. Toward this end, deep neural network (DNN) based techniques are widely used for the regression (see, e.g., [6]). However, the separate simulation is highly time-consuming and the regression model often leads to unphysical solutions violating some vital constraints such as mass conservation.

Recently, technical breakthroughs have continued to overcome the above-mentioned issues. Physics-informed neural networks (PINN) [7] are the representative approach, which is trained to solve supervised learning tasks while respecting any given laws of physics described by general nonlinear partial differential equations. Figure 6 shows an example of creating CFD ROM from indoor CAD data using PINN.

Fig. 6
figure 6

Creation of indoor CFD ROM (reduced order model) from CAD data: (a) 3D CAD image of the indoor, (b) predicted instantaneous temperature field, (c) physics-informed neural network (PINN)

2.5 MIL, SIL and HIL simulations: control model verification

Once all the hardware models are constructed, the next step is to connect them with control SW. In MBD, the connection between HW and SW is done in a step-by-step manner through MIL, SIL, and HIL simulations as explained in this section.

First, the controller model is developed and tested conceptually. This step is called Model-in-Loop simulation (MILS) and the controller logic is tested on the simulated model of the system. If the controller works as designed, the input and output of the controller should be recorded to be used in the later stage of verification.

Once we verify the model using MILS, the next stage is software-in-loop simulation (SILS), where the developer generates the actual code to be installed on MICOM or the embedded controller. This step will give the developer an idea of whether his or her control logic can be converted to code and if it is hardware-implementable.

After the verification of the controller code, the final test is a hardware-in-loop simulation (HIL) test by installing the code on the MICOM of PCBA. The real-time system performs deterministic simulations and has physical real connections to the embedded processor, and communication interfaces such as 485, CAN, and UDP. This will help us identify issues related to the communication channels and I/O interface, attenuation, and delay introduced by an analog channel and can make the controller unstable.

3 Vapor compression cycle model

In this section, we review the simulation methodologies for the vapor compression cycle and explain how the object-oriented, non-causal modeling language resolved computational issues in the cycle simulation.

3.1 Governing equations

The main purpose of the cycle simulation is to predict the mass flow rate, pressure, and enthalpy of the refrigerant and air at any particular points of interest as shown in Fig. 7. Toward this end, one needs to solve transport equations of mass, momentum, and energy for both refrigerant and the air together with pipe temperature. Assuming one-dimensional models, the resulting equations for the refrigerant take the following form:

$${\text{A}}\frac{\partial \overline{\rho }}{\partial t}+\frac{\dot{\partial }\dot{m}}{\partial z}=0,$$
$$\frac{\partial \dot{m}}{\partial t}+\frac{\partial }{\partial z}\left(\frac{{\dot{m}}^{2}}{\rho {\prime}A}\right)=-A\frac{\partial p}{\partial z}-{F}_{w}A-\overline{\rho }gAsin\theta ,$$
$${\text{A}}\frac{\partial }{\partial t}\left(\overline{\rho }\overline{h }-p\right)+\frac{\partial }{\partial z}\left(\dot{m}h\right)={2U}_{R}\pi {R}_{i}\left({T}_{pipe}-{T}_{ref}\right),$$

where \(\rho , \dot{m},h,p,T\), respectively, are density, mass flow rate, enthalpy, pressure, and temperature, A is the cross-sectional area, z is the coordinate along the refrigerant flow direction, \({F}_{w}\) is the wall skin friction, \({U}_{R}\) is the refrigerant-side heat transfer coefficient, \({R}_{i}\) is the internal pipe radius, \(g\) is the gravitational acceleration, and the overbar denotes phase averaged values. See Fig. 8 for geometrical parameters.

Fig. 7
figure 7

Typical pressure-enthalpy chart for the heat pump cycle

Fig. 8
figure 8

Schematics and geometrical parameters for the refrigerant pipes of the heat pump

In addition to Eqs. (1) ~ (3), the pipe temperature equation and air-side sensible and latent energy equations complete the governing equations.

$${\uprho }_{{\text{p}}}{C}_{p,p}{A}_{p}\frac{\partial {T}_{pipe}}{\partial t}={{\eta }_{fin}U}_{A}\left(2\pi {R}_{o}+{A}_{fin}\right)\left({T}_{air}-{T}_{pipe}\right)+{2U}_{R}\pi {R}_{i}\left({T}_{ref}-{T}_{pipe}\right),$$
$${\uprho }_{{\text{a}}}{C}_{p,a}\left[\frac{\partial {T}_{a}}{\partial t}+\nabla \cdot \left({\text{u}}{T}_{a}\right)\right]={{\text{S}}}_{T}+{k}_{a}{\nabla }^{2}{T}_{a},$$
$$\frac{\partial {\omega }_{a}}{\partial t}+\nabla \cdot \left({\text{u}}{\omega }_{a}\right)={{\text{S}}}_{\omega }+{D}_{a}{\nabla }^{2}{\omega }_{a}$$

Here, \(\omega\) denotes the moisture content, subscripts p and a denote pipe and air, respectively. \({U}_{A}\) is the air-side heat transfer coefficient, \({k}_{a}\) is the thermal conductivity, \({D}_{a}\) is the molecular diffusivity, \({S}_{T}\) and \({S}_{\omega }\) are heat and mass source terms possibly due to heat exchangers. Note that air-side equations remain three-dimensional in the case of the co-simulation with CFD.

Equations (1) ~ (6) apply to the entire components including pipes and heat exchangers, while the compressor and expansion valve need separate models, which we will mention later in this paper. The solution of Eqs. (1) ~ (6) requires models for a void fraction [8], skin friction coefficient [9], and heat transfer coefficients [10, 11]. Since we use the correlation models calibrated against measured data using the Buckingham Pi theorem, they usually take the form of power laws of non-dimensional variables, which are in nature nonlinear to the state variables.

Thus, the above equations can be numerically stiff resulting in unstable solutions. In addition, it takes considerable computational time due to nonlinear iterations. In order to make the simulation tractable, we need further simplification depending on the ‘requirements’ for the model: if the HVAC system is for a rough estimation of predicting yearly energy cost, we just need the capacity and power consumption at a given outdoor and indoor conditions. To this end, the steady state model [12] is sufficient to provide the required information, which disregards all the time derivatives in Eqs. (1) ~ (6). On the other hand, if we use the heat pump model in order to test and develop a new control algorithm, a fully dynamic model adopting Eqs. (1) ~ (6) should be solved [13, 14].

3.2 Conventional simulation strategy revisited

The conventional solution strategy for cycle simulation is the component-by-component approach starting from the compressor, through heat exchangers described by Eqs. (1) ~ (6), expansion devices, and finally returning to the compressor again. In this approach, one needs the iteration for the suction pressure, discharge pressure, and suction superheat, for example, until convergence at given operation conditions [15,16,17].

Such an iterative method, however, is highly time-consuming, especially for unsteady simulation in the sense that multiple iteration loops are required for single physical time step marching. As a simple alternative, we tested the feasibility of a ‘quasi-dynamic’ approach whose flowchart is given in Fig. 9.

Fig. 9
figure 9

Procedure of hardware-in-the-loop simulation (HILs) with quasi-dynamic heat pump simulation model

In this approach, we assume the refrigerant cycle is ‘frozen’ during a given time step so that we can apply the steady Domansky model [12] to predict state variables in equilibrium as explained in Fig. 8. On the other hand, the air and pipe equations given in Eqs. (4) ~ (6) are solved in a fully unsteady way. By isolating the refrigerant equations from air-side equations, we could reduce the total number of iterations dramatically. It is noteworthy that the real PCBAs including MICOM are communicating with the cycle model to provide the control algorithm for actuators making the entire system HILS. Thus, the main constraint is that the cycle simulation should run at the same real-time speed as the control algorithm running on MICOM, which is why we had to adopt a quasi-dynamic model at the sacrifice of accuracy in the transient behavior of the refrigerant.

Based on years of experience with the HILS system shown in Fig. 9, the quasi-dynamic approach showed reasonable agreements with measured data when the ambient air condition and control actuators change more slowly than the refrigerant. However, as shown in Fig. 10, it fails to predict initial transient behavior characterized by a steep decrease in low pressure followed by the recovery, which commonly happens to heat pump start-up with unevenly distributed refrigerant. In addition, there are many events that require fully unsteady refrigerant simulation including mode change from cooling to heating, abrupt changes in outdoor and indoor temperature, the frosting of heat exchangers, and so on.

Fig. 10
figure 10

Computational results of cooling mode start-up with quasi-dynamic HILs model compared with measured data from 11 kW-heat pump at standard cooling condition

Thus, we need an efficient, fast, and stable solution strategy for Eqs. (1) ~ (6), or unsteady conservation equations, which will be explored in the next section. Before we move to a fully unsteady model in the next section, the phase-averaged unsteady model [18,19,20], another intermediate approach, should be addressed. Instead of considering distributed mass, the phase-averaged model applies Leibnitz integration to Eqs. (1) ~ (3) for each phase to derive limited numbers of equations, which guarantee fast computation. Although such an approach is accurate enough for some applications, we do not pursue it due to some important applications that need precise descriptions of heat exchangers.

3.3 Fully dynamic model in non-causal modeling language

Let us recall the iterative, dynamic cycle simulation in a component-by-component manner as we mentioned in the previous section. By doing so, we are following the casual flow of the refrigerant. However, from the numerical point of view, this approach corresponds to the least efficient point Gauss–Seidel iteration solvers for linear equations [21], in the sense that new information propagates sequentially only in one direction.

As an alternative, let us consider the state-of-the-art differential algebraic equation (DAE) solvers dedicated to solving multiple equations involving time derivatives, which take the form:


where y is the solution vector. Among such DAE solvers, DASSL [22] is the most famous one. As we will mention later with examples, DASSL has a strong potential to resolve the most of computational time issues mentioned earlier in solving Eqs. (1) ~ (6) for each control volumes.

Modelica language [23], a non-causal modeling language, adopts DASSL as the default solver. In Modelica, physical components are described by relationships rather than procedural code. Thus, one just needs to write down governing equations and initial conditions for each basic modeling unit. Then, DASSL or another internal DAE solver will solve all the equations simultaneously. This makes the models extremely versatile and allows extensive model reuse for many applications. OpenModelica [24] and Dymola™ [25] are well-known open-source and commercial Modelica language compilers, respectively.

The basic element of Modelica language is the ‘model’ class, which consists of equations and ‘connectors’, which can be either constructed by graphical icons or coded by text as illustrated in Fig. 11 for the four-way valve model. Once created, models can be stored as a library and can be re-used at any time. Some examples of HVAC component libraries are shown in Fig. 12.

Fig. 11
figure 11

Two possible ways of Modelica coding for a 4-way valve: text-based (left) and graphical icon-based (right)

Fig. 12
figure 12

Some examples of Modelica HVAC component library

The strength of Modelica, a non-causal object-oriented modeling language, is that it ignores the order of appearance of equations and the solution remains the same regardless of the order, which reflects the mathematical laws for algebraic equations. In this regard, Modelica is often compared with other widely used modeling language MATLAB™/Simulink™ [26]. Matlab is a versatile modeling language with useful mathematical libraries, and Simulink is characterized by functional block diagrams in signal processing style. Here, the causality, the sequential connection of the model elements usually coded by Matlab, is the key feature of this graphical modeling language. Table 1 compares Modelica and Simulink/Matlab in terms of interface, classification, and icons.

Table 1 Comparison between Modelica vs. Simulink/Matlab for a simple thermal capacitance with time-dependent temperature (Tc), releasing a heat flux (Qflow) to the ambient air (TL)

As far as the heat pump model is concerned, non-causal language has a great advantage in maintaining model simplicity: the change of the refrigerant flow direction is naturally realized without modifying the model according to the flow direction, simply by introducing four-way valve models as shown in Fig. 11, and some solenoidal valves just like the real physical system.

It is especially true for heat-recovery type heat pump systems (see, e.g., Fig. 13), where each indoor unit as well as outdoor unit can be either condenser or evaporator resulting in thousands of possible operation scenes. If casual language is used for the modeling of this system, thousands of models are required according to the operation scenario. Thus, it is practically impossible to use Simulink for this system especially when we connect the model with controllers. On the other hand, as shown in Fig. 13, we were able to simulate all possible changes in operation modes with a single Modelica system model.

Fig. 13
figure 13

Heat recovery heat pump model from concept to Modelica code

Table 1 Comparison between Modelica vs. Simulink/MATLAB for a simple thermal capacitance with time-dependent temperature (Tc), releasing a heat flux (Qflow) to the ambient air (TL).

4 Sub-system modeling and validation

In this section, we review a detailed modeling approach for heat pump components including compressor, heat exchanger, electronic expansion valve (EEV), and control SW. Then, developed models are validated against measured data.

4.1 Types of model

Before dealing with component models, we need to mention their types. There are two extreme edges in modeling, which are physics-based and data-driven approaches. The former is often referred to as ‘white-box’ modeling, while the latter is ‘black-box’ modeling. Thanks to recent advances in data mining techniques, models based on deep neural networks (DNN) are increasingly replacing physics-based ones. For some applications where physical modeling is unavailable or inaccurate, pure data-driven ‘black-box’ models can be good alternatives.

Nevertheless, the first option should always be physics-based models only for one reason the model should be able to predict feasible values under situations where there is no available data. Measured data, if available, can be used for the validation and calibration of the model in terms of model coefficients. The physics-based models having tunable model coefficients to be calibrated are often called ‘hybrid’ or ‘grey-box’ models, which are the main concerns in in this section.

4.2 Modeling of electronic expansion valve

The most simple and common EEV model is derived from the Bernoulli equation with a model coefficient \({C}_{D}\), which predicts the mass flow rate through EEV by

$${\dot{m}}_{EEV}={C}_{D}{A}_{th}\sqrt{{\rho }_{sc}\left({P}_{SC}-{P}_{evap,in}\right)},$$

where \({A}_{th}\) is the throttling area, \({\rho }_{sc}\) is the inlet sub-cooled density, \({P}_{SC}\) and \({P}_{{\text{evap}},{\text{in}}}\) are, respectively, the pressure of the refrigerant at the inlet and exit. This ‘grey-box’ model is closed by the model coefficient \({C}_{D}\) calibrated by measured data, which is far from universal but a complex empirical function of nondimensional variables involving the geometry of EEV or flow conditions [27].

The main criticism of this grey-box model, however, comes from this fact: Eq. (8), the Bernoulli equation-type model, is no longer physically valid as far as \({C}_{D}\) is a nonlinear function. Being compressible, viscous two-phase flow, flow through EEV cannot obey the Bernoulli equation which strictly holds for incompressible, inviscid, single-phase flow. See Fig. 14 on the flow inside EEV undergoing converging, shock-wave, and choking.

Fig. 14
figure 14

Illustration on a new EEV model considering shock and choking [28]: (a) flow path inside EEV, (b) model schematics based on the visualization of refrigerant flow, (c) The variation of pressure pattern along the flow passage

Recently, Jin et al. [28] proposed a complete ‘white-box’ EEV model without model coefficients taking all important physics into consideration such as 1D compressible momentum equation, evaporation wave, and shock wave induced choking. The proposed model is validated against experimental data for Sanhua DPF6.4 EEV attached to the heating indoor unit as shown in Fig. 15. See Jin et al. [28] for more details on the model and experimental conditions. As shown in Fig. 15, the proposed white-box model shows good agreement with measure data in that 90% of predicted mass flow rate out of 8553 cases are within 10% error.

Fig. 15
figure 15

EEV sub-model validation against measured data

Since the proposed EEV model is rather complex and the computation takes much longer time than the Bernoulli equation type model, it is necessary to introduce a reduced-order model (ROM) in the form of model exchange FMU.

4.3 Modeling of heat exchnger

Heat exchangers are the main part that requires transient modeling. As explained in the previous section, we consider Eqs. (1) ~ (6), fully dynamic governing equations for refrigerant, air, and pipe in each cell or block. Each cell contains the equations of mass, energy, momentum balance, and input parameters. Then, these blocks are copied to be multiple blocks, and freely connected to replicate the actual circuitry of the heat exchanger as shown in Fig. 16. This flexibility comes from the object-oriented nature of Modelica language, which maximizes the re-usability of the model. Figure 17 shows the validation of the developed heat exchanger model against measured data for a 2-row fin-tube heat exchanger with wide-louver and corrugated fins. The developed model shows good agreement with measured data for both condensing and evaporating capacity within 2% of RMS error.

Fig. 16
figure 16

Fin-tube heat exchanger modeling procedure using object-oriented property of Modelica: (a) base fin-tube model, (b) single pass model, (c) complete multi-pass model

Fig. 17
figure 17

Validation of fin-tube heat exchanger sub-model: (a) circuitry and fin-types, (b) comparison of condensing and evaporating capacity

4.4 Modeling of compressor

Among all the components of a heat pump, the compressor is undoubtedly the most important and complicated one. In view of the architecture, various levels of the compressor model might be used depending on the requirements of the model. Map-based regression models and efficiency-based thermodynamic models are simple but widely used ones, which respectively belong to black-box and grey-box models.

For virtual design purposes, however, more complicated models are required combining multi-physics, multi-dimensional models. Here again, object-oriented characteristics of open platform language play an important role in such a co-simulation.

Figure 18 shows the model construction process of the twin-rotary compressor with 1D/3D co-simulation. The main compression part, consisting of vanes and rollers, adopts 1D functional modeling [29]. On the other hand, motor iron/copper losses, accumulators pressure loss, heat transfer regarding oil supply, and discharge valve movement are modeled by geometry-dependent 3D models. Toward this end, various simulations are needed for mass, momentum, and energy equations for refrigerant, Maxwell electromagnetic equations of coils, and structure equations for valves. In order to save computational cost and time, all the geometry-based 3D models are transformed to be ROM and finally connected to 1D models in the form of model exchange FMU.

Fig. 18
figure 18

Multi-physics, 1D-3D co-simulation-based model for a twin rotary compressor

Figure 19 shows the validation of the developed rotary compressor model against measured data at various condensing and evaporation pressures within the compressor envelope. As shown in Fig. 19, the model predicts cooling capacity accurately within 5% error with measured data. However, model prediction for power consumption has a higher error of 8% RMS error with measured data implying that we need to calibrate efficiency models regarding motor loss and mechanical losses.

Fig. 19
figure 19

Validation of the rotary compressor model at various operation conditions

Although not mentioned here, VRF with higher capacity adopts scroll compressors. The scroll compressor model has basically the same 1D/3D co-simulation structure as the rotary compressor model as shown Fig. 18. The main difference is 1D functional model adopts theories dedicated to the scroll compressor [30].

4.5 Modeling of control SW

Once HW models are constructed, control SW needs to be attached to virtual sensors and actuators of HW models. VRF system considered in this study has several MICOMs on which their control SWs are installed.

In the previous section, we introduced our previous HILS approach with real PCBAs (see Fig. 9). Despite many virtues, years of experience using HILS revealed some serious drawbacks: First, it is hard to construct the system as shown in Fig. 9, especially for those who are unfamiliar to PCBA hardware connections and MICOM SW onboarding. Second, the simulation takes exactly the same time as the real-world experiment due to the physical MICOM, which limits the application area of the system.

In order to overcome those limitations, we devised control SW FMUs, PC-converted MICOM SWs, whose ports and interfaces are shown in Fig. 20 for IDU cases. Since MICOM SWs are written in C and C +  + , they can be directly built on a PC. However, they cannot run on PC due to MICOM-specific, HW-related functions involving a timer, seven-segment display, EEPROM, dip-switch, and so on. Thus, code elements referring to those HWs should be replaced by PC SWs. In addition, communications between PCBAs through UART and 485 should be also replaced by data transfer.

Fig. 20
figure 20

Port and interfaces of functional mockup unit (FMU) for indoor control SW

Figure 21 shows the validation of the SILs model for VRF with seven IDUs using developed control SW FMU against HILS with real MICOM at standard cooling conditions. As shown in Fig. 21, control SW FMU produces almost the same results as real MICOM. The slight discrepancies seem to be inevitable due to inherent differences in timers between MICOM and PC, and the communication delay and loss in real PCBAs which cannot be reproduced in PC.

Fig. 21
figure 21

Validation of control SW FMU (SILS) against real MICOM algorithm (HILS) for VRF model with 7 IDUs at standard cooling conditions at different outdoor air temperatures

5 System model validation and verification

In this section, the entire system model is explained followed by its validation and verification. Some simulation results are shown including both quantitative and qualitative validation given against measured data.

5.1 VRF system model as a digital mockup

Figure 22 shows the integrated system model consisting of a dynamic heat pump HW model, control SW FMU, inverter and motor model, outdoor weather data, building thermal load model, and indoor flow field model in the form of ROM. Dymola™ is used for the Modelica compiler and HVAC libraries. As addressed in Sect. 2, the inclusion or exclusion of specific elements, whether DB for example, will be determined by the system requirement, or what we are going to do with the model.

Fig. 22
figure 22

An integrated heat pump system model adopting models from HVAC libraries, building/indoor model, weather data, control SW, inverter/motor model, and indoor CFD ROM

As shown in Fig. 22, four indoor units installed in corresponding rooms are operating in response to room temperature and humidity determined by thermo (1D)-fluid (3D) co-simulation in terms of ROMs. Cooling, heating, and ventilation loads associated with weather data are supposed to change indoor temperature and humidity, which become the input parameters of the VRF heat pump model. During the heat pump operation, compressor speed, EEV pulse, and fan RPM are changing to meet the control target until the indoor temperatures satisfy setting values. In this way, the virtual system mimics the real interaction between the VRF heat pump and the environment, which is why it is often referred to as a ‘digital mockup’.

5.2 Validation of system model

Figure 23a shows the simulation results of a residential heat pump of 4-Hp nominal capacity with 5 indoor units at 48 °C outdoor temperature and 32 °C indoor temperature. It is shown that the simulation result closely reproduces measured data including an abrupt decrease of the refrigerant pressure at around 0.4 h from the start due to the change of operating indoor unit number from five to one. Quantitative agreement is also acceptable showing the difference in condensing and evaporating temperatures less than 3 °C with measured data.

Fig. 23
figure 23

Validation of developed heat pump system model against measured data

Figure 23b reproduces cooling operation during 4 days of July at the office building, in Incheon, Korea. The outdoor unit has a 20-Hp nominal capacity and twelve ceiling cassette-type indoor units are installed in the office. As shown in the figure, the simulation reproduces measured data reasonably well in terms of condensing temperature, evaporating temperature, and discharge temperature in accordance with changes in outdoor temperature and compressor speed.

It should be noted that the total CPU hour for running a 4-day operation is 6.4 h, which means approximately 15 times faster than real-time operation. The computational speed could be even faster if the number of indoor units is reduced. For example, simulation with a single indoor unit usually runs around thirty times faster than real-time. However, it should be also noted that the computational speed of differential–algebraic equations is highly sensitive to the number of equations, initial and boundary conditions as well as the numerical stiffness of the equations themselves.

5.3 System verification using the digital mockup

Together with weather data, the HVAC load model, and the indoor temperature model as shown in Fig. 22, the developed system model can be used for the yearly simulation to predict energy consumption and compressor operation. Figure 24 shows results from a yearly simulation at a virtual office room in Seoul, Korea.

Fig. 24
figure 24

Yearly simulation results for the residential heat pump installed at the office in Seoul, Korea

Figure 24a shows the operation hours at a specific compressor speed after 1 year of operation revealing the most dominant compressor speed at the site considered, which is derived from detailed daily simulation as shown in Fig. 24b. The main purpose of this simulation is to draw compressor operation map as shown in Fig. 24c from which we can specify the most representative operating point of heat pump and use this information to design accelerated life-cycle test to guarantee 10-year operation without serious damage including bearing wear or discharge valve fracture.

6 Concluding remarks

6.1 Summary and lessons learned

In this paper, the authors reviewed their MBD approach to build a dynamic VRF heat pump model combining multi-physics-based model components and control SW using Modelica, an acausal modeling language. The developed system model adopts fully dynamic governing equations for both refrigerant and air and FMUs for sub-models including geometry-based models for compressor, EEV, and heat exchangers, and PC ported version of MICOM control SW.

The computational speed and accuracy of the developed VRF model are validated against experimental data at the psychrometric chamber and field measurement data. It is shown that the developed VRF system digital mockup runs approximately 15 times faster than the real physical time, and that showed good agreement against measured data.

The main lesson that the authors learned from this project is that using an object-oriented open platform modeling language is highly desirable to raise synergetic cooperation among various teams and to secure model connectivity, traceability, and re-usability. Currently, the authors are highly optimistic prospective on the development of a more robust virtual model that can be used through all value chains including design, control development, and quality enhancement.

6.2 Remarks on MBD in the foreseeable future

In terms of model development, we are currently working on long-lasting problems in heat pump simulation including frosting/defrosting of the heat exchanger, liquid accumulation of off-duty indoor unit, oil discharge, and hold-up. In addition, we are also working on the extension of the simulation model toward series models with multiple outdoor units, water-source heat pumps, and air-source water-heating heat pump.

When the MBD technique is mature enough to cover the product line-up, we expect that it will reduce time and cost for new product development by 20% ~ 30% in comparison with conventional ways with tests and experiments using real prototypes.

After the achievement of this milestone, as the next step, we are planning to use MBD for all the value chains including product concept design, marketing and solution proposal, field engineering, and field service. For the service application, the optimization of the on-site control algorithm via embedded digital mockup is under development. This concept is also called an embedded digital twin [31]. As the first step of the digital twin, as shown in Fig. 25, model coefficient optimization for the digital mockup based on field measurement is under development [32].

Fig. 25
figure 25

Model coefficient optimization procedure based on field data

7 Nomenclature

Cross-sectional area, m2

CElectronic expansion model flow coefficient

CIsobaric thermal capacity, J kg−1 K−1

DaMolecular diffusivity, m2 s−1

FWall friction force, N

gravitational acceleration, m s−2

H, Enthalpy per mass, J kg−1

Thermal conductivity, W m−1 K−1

Refrigerant mass charge, kg

\(\dot{m}\) Mass flow rate, kg s−1

Pressure, Pa

heat transfer rate, W

Ri, RInner and outer radius of pipe, m

SSource term for temperature equation, W m−3

Sω Source term for humidity equation, s−1

Temperature, K

Velocity vector, m s−1

Heat transfer coefficient, W m−2 K−1

Wcomp Compressor work, W

z Coordinate along the pipe, m

7.1 Greek symbols

\(\upeta\) Efficiency

\(\uptheta\) Inclination angle of the pipe, degree

\(\uprho\) Density, kg m−3

\(\upomega\) Humidity ratio, kg kg−1

7.2 Subscripts

A, air Air-side

c, cond Condenser

e, evap Evaporator

EEV Electronic expansion valve

fin Fin

p, pipe Pipe

sc Subcooled

suc Suction


th Throttling