Blog
Accelerating Two-Phase System Simulation with Machine Learning Metamodels
Overview
In both automotive and HVAC-R industries, accurately simulating two-phase refrigerant systems is essential, but often computationally heavy. Whether it is xEV cabin and battery cooling/heating or residential air conditioning, engineers frequently rely on 1D physical models (like those built in GT SUITE) to predict performance. However, when real-time execution and portability to embedded ECUs are required, traditional models fall short.
This blog explores an innovative two-phase system metamodeling approach using machine learning. A metamodel is a compact, mathematical model of a detailed physical model, trained on its simulation results to reproduce its behavior at a fraction of the computational cost. The method accelerates simulations while maintaining high fidelity, enabling real-time applications and cross-platform deployment.
To show how this works in practice, let’s look at a representative use case: the two-phase refrigerant loop of an EV’s cabin and battery cooling system.
Case Study: EV Refrigerant System
The reference system is a fully featured 1D GT SUITE model representing an electric vehicle’s cabin and battery cooling loop with R 1234yf refrigerant. The model includes:
• Two-phase refrigerant loop
• Cabin and ventilation circuit
• Battery pack with cooling channels
• Powertrain components
• Vehicle and driveline
• Control system

Key components like electronic expansion valves (EXV), thermal expansion valves (TXV), shut off valves (SOV), and flexible thermal control strategies create a balanced, dynamic system that responds in real time to battery and cabin temperature needs.
Although the baseline 1D model achieves roughly 6x faster-than-real-time performance on a desktop CPU (0.16x real-time factor), this still falls short for ECU deployment. The two-phase refrigerant loop remains the most computationally demanding part of the system, making it the ideal candidate for machine learning acceleration. Beyond speed, ECUs require models compiled into C code, and physical 1D models cannot be directly converted for that purpose. However, C-based metamodels derived from the original 1D model overcome this limitation, enabling deployment on ECU hardware while preserving the essential system dynamics.
Data Generation Strategy
A robust dataset is fundamental for effective ML model training. The physical 1D model was used to generate simulated “virtual” DOE data, capturing:
• Condenser, cabin, and battery cooler heat rates
• Compressor power consumption
• Evaporator outlet pressure and enthalpy
Because two-phase refrigerant behavior is inherently nonlinear and time-variant, a NARX (Nonlinear AutoRegressive eXogenous) dynamic neural network model was applied. The DOE included 36 transient driving-cycle runs across:
• Vehicle speed profiles
• Battery and cabin temperature setpoints
• Ambient temperature variations

Metamodel Training Workflow
Using GT POST’s Machine Learning Assistant, a dynamic regression via NARX neural networks was conducted:
1. Data sampling – Reduced data to 1 second intervals for efficiency
2. Signal selection – 8 inputs, including air flow rates, inlet temperatures, battery temperature, compressor speed, and valve positions
3. Target outputs – 6 signals: condenser, cabin, and battery heat rates, compressor power, evaporator outlet pressure and enthalpy
NARX configurations that included individual networks for pressure and enthalpy (15 hidden layer neurons) and combined networks for heat rates and power (20 neurons) provided the best trade-off between complexity and accuracy.

Regression and transient response plots for training, validation, and test datasets showed excellent correlation between neural outputs and GT‑SUITE reference data:
- Heat rate and power regression aligned tightly
- Pressure and enthalpy similarly consistent
- Transient tests across multiple drive-cycle profiles revealed low absolute errors


Exporting the metamodel into .mmp, or other formats like FMU or C, allows seamless integration into simulation platforms or embedded ECUs.
Integration into the 1D System
Validation in the isolated Machine Learning Assistant environment isn’t enough, integration into the existing closed-loop system is essential for a robust assessment of the metamodels behavior. Two scenarios were evaluated:
1. Observer neural model: Neural networks run in parallel with the physical two-phase circuit, without affecting other subsystems

2. Surrogate neural model: Physical refrigerant components are replaced by neural networks, feeding signals directly into system controllers

Using GT SUITE’s MetamodelHarness template, inputs/outputs were connected and a 1 second timestep was enforced to align with NARX training conditions.
Different maneuvers including DOE samples, unseen drive cycles, and altered boundary conditions were tested across:
Figure 8: Neural networks correlation over unseen drive cycles• Physical baseline 1D model
• Observer neural model
• Surrogate neural model


Results showed that the surrogate model accurately tracked reference behavior across all scenarios. Replacing the two-phase circuit with neural networks reduced CPU load by ~75%.
What Faster Two-Phase Models Enable
This two-phase system metamodeling solution offers a powerful framework to accelerate refrigerant cycle simulations without sacrificing accuracy. It enables:
• Real-time simulation in X-in-the-Loop environments
• Embedded deployment on ECUs
• Flexible adaptation across automotive, industrial HVAC, and appliance markets
By combining virtual data generation, dynamic machine learning, and rigorous integration testing, this approach sets a new standard, empowering engineers to optimize complex multi-domain systems under real-world conditions.
Browse our blog page for additional insights on ML/AI and digital twins. Follow our LinkedIn channel to stay updated on the latest advancements in our solutions and subscribe to the GT blog to receive updates on new AI capabilities, engineering solutions, and industry trends.
Frequently Asked Questions
Q1: What is a machine learning metamodel for two-phase system simulation?
A metamodel is a compact, data-driven approximation of a detailed physical model, trained on its simulation results to reproduce its behavior at a fraction of the computational cost. In this case, a NARX (Nonlinear AutoRegressive eXogenous) neural network was trained on data from a 1D GT-SUITE model of an EV’s two-phase refrigerant loop, so it can stand in for the physical refrigerant components in real-time simulation.
Q2: Why use metamodels instead of 1D physical models for ECU deployment?
ECUs require models compiled into C code, and detailed 1D physical models cannot be directly converted for that purpose. Metamodels derived from the 1D model can be exported to C (or formats like FMU), which allows deployment on embedded hardware while preserving the essential system dynamics.
Q3: How much faster is the neural network model than the physical 1D model?
In the EV refrigerant system case study, the baseline 1D model achieves roughly 6x faster-than-real-time performance on a desktop CPU (0.16x real-time factor). Replacing the physical two-phase circuit with neural networks reduced CPU load by about 75%, while the surrogate model still tracked the reference behavior across the tested scenarios, including unseen drive cycles.