VirtualFCS.Fluid.CompressorMap

Compressor whose pressure ratio and efficiency come from a CSV performance map

This compressor derives from CompressorInterface, like Compressor, but instead of a constant isentropic efficiency it reads a performance map from a CSV file relating shaft speed, mass flow, pressure ratio and isentropic efficiency.

The file is a plain comma-separated table with a single header row and four columns, in this order:

  1. Shaft speed in rounds per minute;
  2. Mass flow in kg/s;
  3. Total-to-total pressure ratio;
  4. Isentropic efficiency (0..1).

Rows must be grouped by RPM value, identifying the speed lines; there must be speedLines lines of pointsPerLine points each, with speeds listed in strictly increasing order and, within a line, mass flow in strictly increasing order. A default synthetic map lives in Resources/CompressorMaps/compressor_map.csv; set the mapFileName parameter (a file selector is offered in the parameter dialog) to use a different one, adjusting speedLines and pointsPerLine to match.

The map is read once at initialisation. At every operating point the model interpolates each speed line's points along the speed axis to the actual ω, then interpolates pressure ratio and efficiency along the mass-flow axis to the actual flow (linear, with linear extrapolation beyond the mapped range).

The first and last point of the speed-interpolated line define the surge line (m_flow_surge) and the choke line (m_flow_choke) at the current speed. surgeMargin gives the relative distance to surge, and the Boolean flags surging / choking together with warning-level assertions fire when the operating point leaves the mapped flow range.

As in Compressor, mechanical work is delivered through the shaft, there is no fluid holdup, outlet conditions use the medium's isentropicEnthalpy, and heatPort is enabled by default (adiabatic when nothing is connected).