packagePipeHeatTransferExample
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Information
Heat Transfer Example
This package demonstrates how to replace traditional heat transfer coefficient calculations with Feed-Forward Neural Networks (FFNNs) in a Modelica simulation.
Two types of neural networks are integrated as surrogates for the physical Nusselt number model:
- A simple FFNN
- A deeper, more complex FFNN
Both models are exported in TensorFlow Lite and ONNX formats and are incorporated into Modelica via SMArtInt interface blocks.
The pipe model is spatially discretized into 100 segments. Each segment requires one inference, which is performed efficiently in batch mode using a single neural network instance.
Key Variables to Observe
Model Evaluation
This model compares neural network outputs directly to a physical reference for a set of test inputs. Important variables to monitor:
- Nusselt number (predicted) (
heatTransfer.Nus): Neural network output for heat transfer estimation. - Heat transfer coefficient (
heatTransfer.alphas): Derived from the predicted Nusselt number.
Pipe Model
In this model, the neural network replaces the heat transfer calculation inside the pipe simulation. Key variables include:
- Inlet enthalpy [J/kg] (
pipe.port_a.h_outflow): Enthalpy at the pipe entry. - Outlet enthalpy [J/kg] (
pipe.port_b.h_outflow): Enthalpy at the pipe exit. - Temperature in heat ports [K] (
pipe.heatPorts.T): Port/wall temperature in different pipe segments.
Contents
| Name | Description |
|---|---|
| Tensor Flow Lite Tester | |
| ONNX Tester |