Approximation model (IH)#
Appearance of the approximation model launching block#
Approximation model (IH) block is intended for use within the library Isothermal hydraulics of the set approximation models:
Neural networks, which are part of the algorithms of machine learning;
Gaussian processes;
Linear and nonlinear regression models.
Approximation Models can contain any nonlinear relations between the input parameters of the Model and calculation results that are difficult to describe by a software algorithm and require modern approaches such as neural networks and other machine learning methods.
The block is designed to call (Inference) approximation model and enabl communication with other blocks of library Isothermal hydraulics.
Approximation model (TL) block loads the model from the neutral format ONNX.
Note
The External models library contains the Approximation model block, which is used to call ML models during modeling and exchange data with the Automation library blocks and other blocks containing the port type Automation.
1. Requirements for an approximation model interacting with Isothermal hydraulics library blocks#
Important
The basic requirements for the approximation model are presented in the description of a similar block of the library External models.
1.1. Requirements for formulating an approximation problem#
The approximation model must describe the physical process of fluid motion in the simulated system, expressing the dependence of the mass flow rate \( \dot{\mathbf m_i}\) on the pressures \(\mathbf P_{i}\) (1).
Node must be a component of the approximation model. Each node \(i\) must include a pressure parameter \(\mathbf P_{i}\) and a mass flow rate calculation result \(\dot{\mathbf m_i}\).
in dependence (1) index \(i\) denotes the serial number of the model node.
The approximation model must contain at least one node with a pressure parameter \(\mathbf P_{1}\) and a calculated mass flow rate \( \dot{\mathbf m_1}\).
Sign convention for flow rate calculations#
Positive direction of mass flow is accepted in the approximation model node.
Flow directed from a model node is considered negative.
The diagram below shows two nodes of the approximation model with positive direction of the calculated values of mass flow rates.
Sign rule for calculating mass flow rates for an approximation model with two nodes.#
The diagram above uses the following notations.
Designations |
Description |
|---|---|
Blue circles |
Model nodes with pressure parameters \(\mathbf P_{i}\) |
Blue vectors |
Positive directions of mass expenditures of the \(\dot{\mathbf m_i}\) model |
Option for calculating mass flow from one node to another#
The approximation model can contain two nodes, calculating one value of the mass flow rate \(\dot{\mathbf m}\), directed from node 1 to node 2 according to the diagram given below.
Calculation of mass flow from node 1 to node 2 of an approximation model with two nodes.#
In the case given above, the mass flow rate directed to node 2 is \(\dot{\mathbf m}\), and the mass flow rate of node 1 is taken to be \( - \dot{\mathbf m}\).
Option for calculating mass flow rates in three nodes#
The approximation model can contain three or more nodes, calculating the values of mass flow rates \(\dot{\mathbf m_i} = f(\mathbf P_{i})\), in each of the model nodes.
Calculation of mass flow rates in three nodes of the approximation model.#
1.2. Requirements for the parameters of the approximation model#
An approximation model that interacts with the blocks of the Isothermal hydraulics library must:
The input parameters are the pressure values (P₁,P₂,Pₙ in the figure below) at the nodes of the modeled system element;
As a result of the calculation, the model should provide the values of the mass flow rates of the liquid (m₁, m₂, mₙ in the figure below) at each node of the modeled system.
Исходные данные и результаты расчёта Аппроксимационной модели (ИГ)#
The following notations are used in the figure above.
Designation |
Dimension |
Description |
|---|---|---|
P₁, … , Pₙ |
Pa |
Initial values of pressures in the nodes of the approximation model |
m₁, … , mₙ |
\(kg/s\) |
Results of calculation of liquid mass flow rates |
The physical quantities of the initial data and the results of the approximation model calculations must be presented in the SI system of units.
2. Properties#
No
3. Inputs and outputs#
Parameters |
Input/Output |
Description |
Units of measurement |
Port type |
|---|---|---|---|---|
Pressure |
Input |
The list of input ports is generated based on information about the set of input parameters of the model from the ONNX file |
Pa |
Isothermal hydraulics |
Expenses |
Output |
The list of output ports is generated based on information about the set of output parameters (calculation results) of the model from the ONNX file |
\(kg/s\) |
Automation |
The block output ports are required to obtain the results of mass flow calculations in the model nodes, as well as to transfer the calculation results to the Outport block.
Important
The Meter block does not support displaying the calculation results of the Approximation model (IH) block.
In order to see the connection capabilities of the block, you need to go to page Description of block ports