VCRC 1.0.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package VCRC --version 1.0.9
NuGet\Install-Package VCRC -Version 1.0.9
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VCRC" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VCRC --version 1.0.9
#r "nuget: VCRC, 1.0.9"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VCRC as a Cake Addin
#addin nuget:?package=VCRC&version=1.0.9

// Install VCRC as a Cake Tool
#tool nuget:?package=VCRC&version=1.0.9

VCRC

Build & Tests CodeQL NuGet Platform License codecov

Cross-platform vapor-compression refrigeration cycles analysis tool using SharpProp.

Overview

Unit safety

All calculations are unit safe (thanks to UnitsNet). This allows you to avoid errors associated with incorrect dimensions of quantities, and will help you save a lot of time on their search and elimination. In addition, you will be able to convert all values to many other dimensions without the slightest difficulty.

VCRC components

To analyze the vapor-compression refrigeration cycle (VCRC), you first need to build it from individual components.

Evaporator

For example:

  • Refrigerant: R407C.
  • Evaporating temperature: 5 °C.
  • Superheat: 8 K.
  • Definition of the evaporating pressure (bubble-point or dew-point): bubble-point (by default dew-point).
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC.Components;
using VCRC.Fluids;
var evaporator =
    new Evaporator(FluidsList.R407C, (5).DegreesCelsius(), TemperatureDelta.FromKelvins(8), TwoPhase.Bubble);

Compressor

Compressor with 80 % isentropic efficiency:

using UnitsNet.NumberExtensions.NumberToRatio;
using VCRC.Components;
var compressor = new Compressor((80).Percent());

Condenser

For example:

  • Refrigerant: R407C.
  • Condensing temperature: 40 °C.
  • Subcooling: 3 K.
  • Definition of the condensing pressure (bubble-point or dew-point): dew-point (by default bubble-point).
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC.Components;
using VCRC.Fluids;
var condenser =
    new Condenser(FluidsList.R407C, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3), TwoPhase.Dew);

Recuperator

Recuperator with 5 K superheat:

using UnitsNet;
using VCRC.Components;
var recuperator = new Recuperator(TemperatureDelta.FromKelvins(5));

Intermediate vessel

You can define an intermediate vessel with a fixed intermediate pressure or with an evaporator and condenser. In the latter case, the intermediate pressure is calculated as the square root of the product of the evaporating pressure and the condensing pressure.

Intermediate vessel with fixed 1 bar absolute pressure:

using UnitsNet.NumberExtensions.NumberToPressure;
using VCRC.Components;
var intermediateVessel = new IntermediateVessel((1).Bars());

Intermediate vessel defined with evaporator and condenser:

using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R407C, (5).DegreesCelsius(), TemperatureDelta.FromKelvins(8));
var condenser =
    new Condenser(FluidsList.R407C, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var intermediateVessel = new IntermediateVessel(evaporator, condenser);

Economizer

For example:

  • Absolute intermediate pressure: 1 bar.
  • Temperature difference at economizer "cold" side: 7 K.
  • Superheat: 5 K.
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToPressure;
using VCRC.Components;
var economizer = 
    new Economizer((1).Bars(), TemperatureDelta.FromKelvins(7), TemperatureDelta.FromKelvins(5));

As with the intermediate vessel, you can determine the intermediate pressure using the evaporator and condenser:

using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R407C, (5).DegreesCelsius(), TemperatureDelta.FromKelvins(8));
var condenser =
    new Condenser(FluidsList.R407C, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var economizer = 
    new Economizer(evaporator, condenser, TemperatureDelta.FromKelvins(7), TemperatureDelta.FromKelvins(5));

EconomizerTPI

This is a complete analog of the Economizer, but without superheat.

Subcritical VCRCs

Simple single-stage VCRC

Schematic diagram:

Simple VCRC scheme

Temperature-entropy chart (T-s chart):

Simple VCRC T-s chart

List of points:

  • Point0 - dew-point on the evaporating isobar.
  • Point1 - evaporator outlet / compression stage suction.
  • Point2s - isentropic compression stage discharge.
  • Point2 - compression stage discharge / condenser inlet.
  • Point3 - dew-point on the condensing isobar.
  • Point4 - bubble-point on the condensing isobar.
  • Point5 - condenser outlet / expansion valve inlet.
  • Point6 - expansion valve outlet / evaporator inlet.

Example:

To calculate the energy efficiency ratio (aka cooling coefficient, aka EER), the coefficient of performance (aka heating coefficient, aka COP) and the compressor discharge temperature:

using System;
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToRatio;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R32, (-25).DegreesCelsius(), TemperatureDelta.FromKelvins(5));
var compressor = new Compressor((80).Percent());
var condenser =
    new Condenser(FluidsList.R32, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var cycle = new SimpleVCRC(evaporator, compressor, condenser);
Console.WriteLine(cycle.EER);                // 2.1851212290292206
Console.WriteLine(cycle.COP);                // 3.1851212290292206
Console.WriteLine(cycle.Point2.Temperature); // 123.71 °C

Single-stage VCRC with recuperator

Schematic diagram:

VCRC with recuperator scheme

Temperature-entropy chart (T-s chart):

VCRC with recuperator T-s chart

List of points:

  • Point0 - dew-point on the evaporating isobar.
  • Point1 - evaporator outlet / recuperator "cold" inlet.
  • Point2 - recuperator "cold" outlet / compression stage suction.
  • Point3s - isentropic compression stage discharge.
  • Point3 - compression stage discharge / condenser inlet.
  • Point4 - dew-point on the condensing isobar.
  • Point5 - bubble-point on the condensing isobar.
  • Point6 - condenser outlet / recuperator "hot" inlet.
  • Point7 - recuperator "hot" outlet / expansion valve inlet.
  • Point8 - expansion valve outlet / evaporator inlet.

Example:

To calculate the energy efficiency ratio (aka cooling coefficient, aka EER), the coefficient of performance (aka heating coefficient, aka COP) and the compressor discharge temperature:

using System;
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToRatio;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R32, (-25).DegreesCelsius(), TemperatureDelta.FromKelvins(5));
var compressor = new Compressor((80).Percent());
var condenser =
    new Condenser(FluidsList.R32, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var recuperator = new Recuperator(TemperatureDelta.FromKelvins(5));
var cycle = new VCRCWithRecuperator(evaporator, recuperator, compressor, condenser);
Console.WriteLine(cycle.EER);                // 2.170667134010685
Console.WriteLine(cycle.COP);                // 3.1706671340106847
Console.WriteLine(cycle.Point3.Temperature); // 130.49 °C

Two-stage VCRC with incomplete intercooling

Schematic diagram:

VCRC with incomplete intercooling scheme

Temperature-entropy chart (T-s chart):

VCRC with incomplete intercooling T-s chart

List of points:

  • Point0 - dew-point on the evaporating isobar.
  • Point1 - evaporator outlet / first compression stage suction.
  • Point2s - first isentropic compression stage discharge.
  • Point2 - first compression stage discharge.
  • Point3 - second compression stage suction.
  • Point4s - second isentropic compression stage discharge.
  • Point4 - second compression stage discharge / condenser inlet.
  • Point5 - dew-point on the condensing isobar.
  • Point6 - bubble-point on the condensing isobar.
  • Point7 - condenser outlet / first expansion valve inlet.
  • Point8 - first expansion valve outlet / intermediate vessel inlet.
  • Point9 - intermediate vessel vapor outlet / injection of cooled vapor into the compressor.
  • Point10 - intermediate vessel liquid outlet / second expansion valve inlet.
  • Point11 - second expansion valve outlet / evaporator inlet.

NB:

Intermediate vessel with fixed pressure is optional. By default, the intermediate pressure is calculated as the square root of the product of the evaporating pressure and the condensing pressure.

Example:

To calculate the energy efficiency ratio (aka cooling coefficient, aka EER), the coefficient of performance (aka heating coefficient, aka COP) and the compressor discharge temperature:

using System;
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToRatio;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R32, (-25).DegreesCelsius(), TemperatureDelta.FromKelvins(5));
var compressor = new Compressor((80).Percent());
var condenser =
    new Condenser(FluidsList.R32, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var cycle = new VCRCWithIncompleteIntercooling(evaporator, compressor, condenser);
Console.WriteLine(cycle.EER);                // 2.4122045253883138
Console.WriteLine(cycle.COP);                // 3.412204525388314
Console.WriteLine(cycle.Point4.Temperature); // 115.35 °C

Two-stage VCRC with complete intercooling

Schematic diagram:

VCRC with complete intercooling scheme

Temperature-entropy chart (T-s chart):

VCRC with complete intercooling T-s chart

List of points:

  • Point0 - dew-point on the evaporating isobar.
  • Point1 - evaporator outlet / first compression stage suction.
  • Point2s - first isentropic compression stage discharge.
  • Point2 - first compression stage discharge.
  • Point3 - intermediate vessel vapor outlet / second compression stage suction.
  • Point4s - second isentropic compression stage discharge.
  • Point4 - second compression stage discharge / condenser inlet.
  • Point5 - dew-point on the condensing isobar.
  • Point6 - bubble-point on the condensing isobar.
  • Point7 - condenser outlet / first expansion valve inlet.
  • Point8 - first expansion valve outlet / intermediate vessel inlet.
  • Point9 - intermediate vessel liquid outlet / second expansion valve inlet.
  • Point10 - second expansion valve outlet / evaporator inlet.

NB:

Intermediate vessel with fixed pressure is optional. By default, the intermediate pressure is calculated as the square root of the product of the evaporating pressure and the condensing pressure.

Example:

To calculate the energy efficiency ratio (aka cooling coefficient, aka EER), the coefficient of performance (aka heating coefficient, aka COP) and the compressor discharge temperature:

using System;
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToRatio;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R32, (-25).DegreesCelsius(), TemperatureDelta.FromKelvins(5));
var compressor = new Compressor((80).Percent());
var condenser =
    new Condenser(FluidsList.R32, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var cycle = new VCRCWithCompleteIntercooling(evaporator, compressor, condenser);
Console.WriteLine(cycle.EER);                // 2.485885473340216
Console.WriteLine(cycle.COP);                // 3.485885473340216
Console.WriteLine(cycle.Point4.Temperature); // 74.77 °C

Two-stage VCRC with economizer

Schematic diagram:

VCRC with economizer scheme

Temperature-entropy chart (T-s chart):

VCRC with economizer T-s chart

List of points:

  • Point0 - dew-point on the evaporating isobar.
  • Point1 - evaporator outlet / first compression stage suction.
  • Point2s - first isentropic compression stage discharge.
  • Point2 - first compression stage discharge.
  • Point3 - second compression stage suction.
  • Point4s - second isentropic compression stage discharge.
  • Point4 - second compression stage discharge / condenser inlet.
  • Point5 - dew-point on the condensing isobar.
  • Point6 - bubble-point on the condensing isobar.
  • Point7 - condenser outlet / inlet to the expansion valve of the injection circuit (first EV) / inlet of the main stream into the economizer ("hot" inlet).
  • Point8 - outlet from the expansion valve of the injection circuit (first EV) / inlet of the injected stream into the economizer ("cold" inlet).
  • Point 9 - outlet of the injected stream from the economizer ("cold" outlet) / injection of cooled vapor into the compressor.
  • Point10 - outlet of the main stream from the economizer ("hot" outlet) / inlet to the expansion valve of the evaporator circuit (second EV).
  • Point11 - outlet from the expansion valve of the evaporator circuit (second EV) / evaporator inlet.

Example:

To calculate the energy efficiency ratio (aka cooling coefficient, aka EER), the coefficient of performance (aka heating coefficient, aka COP) and the compressor discharge temperature:

using System;
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToRatio;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R32, (-25).DegreesCelsius(), TemperatureDelta.FromKelvins(5));
var compressor = new Compressor((80).Percent());
var condenser =
    new Condenser(FluidsList.R32, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var economizer =
    new Economizer(evaporator, condenser, TemperatureDelta.FromKelvins(7), TemperatureDelta.FromKelvins(5));
var cycle = new VCRCWithEconomizer(evaporator, compressor, condenser, economizer);
Console.WriteLine(cycle.EER);                // 2.359978191965046
Console.WriteLine(cycle.COP);                // 3.359978191965046
Console.WriteLine(cycle.Point4.Temperature); // 118.42 °C

Two-stage VCRC with economizer and two-phase injection to the compressor

Schematic diagram:

VCRC with economizer and two-phase injection to the compressor scheme

Temperature-entropy chart (T-s chart):

VCRC with economizer and two-phase injection to the compressor T-s chart

List of points:

  • Point0 - dew-point on the evaporating isobar.
  • Point1 - evaporator outlet / first compression stage suction.
  • Point2s - first isentropic compression stage discharge.
  • Point2 - first compression stage discharge.
  • Point3 - second compression stage suction.
  • Point4s - second isentropic compression stage discharge.
  • Point4 - second compression stage discharge / condenser inlet.
  • Point5 - dew-point on the condensing isobar.
  • Point6 - bubble-point on the condensing isobar.
  • Point7 - condenser outlet / inlet to the expansion valve of the injection circuit (first EV) / inlet of the main stream into the economizer ("hot" inlet).
  • Point8 - outlet from the expansion valve of the injection circuit (first EV) / inlet of the injected stream into the economizer ("cold" inlet).
  • Point 9 - outlet of the injected stream from the economizer ("cold" outlet) / injection of two-phase refrigerant into the compressor.
  • Point10 - outlet of the main stream from the economizer ("hot" outlet) / inlet to the expansion valve of the evaporator circuit (second EV).
  • Point11 - outlet from the expansion valve of the evaporator circuit (second EV) / evaporator inlet.

Example:

To calculate the energy efficiency ratio (aka cooling coefficient, aka EER), the coefficient of performance (aka heating coefficient, aka COP) and the compressor discharge temperature:

using System;
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToRatio;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R32, (-25).DegreesCelsius(), TemperatureDelta.FromKelvins(5));
var compressor = new Compressor((80).Percent());
var condenser =
    new Condenser(FluidsList.R32, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var economizer =
    new EconomizerTPI(evaporator, condenser, TemperatureDelta.FromKelvins(7));
var cycle = new VCRCWithEconomizerTPI(evaporator, compressor, condenser, economizer);
Console.WriteLine(cycle.EER);                // 2.4347473905936
Console.WriteLine(cycle.COP);                // 3.4347473905935995
Console.WriteLine(cycle.Point4.Temperature); // 74.77 °C

Entropy analysis

You can perform an entropy analysis of each VCRC mentioned earlier. This analysis allows us to estimate with high accuracy the distribution of energy loss due to the nonequilibrium (irreversibility) of working processes in the refrigeration machine. Thanks to this, you can easily estimate the energy loss to compensate for the production of entropy in each part of the refrigeration cycle and make decisions that will help increase its efficiency.

For example, simple single-stage VCRC, -18 °C indoor temperature, 30 °C outdoor temperature:

using System;
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToRatio;
using UnitsNet.NumberExtensions.NumberToTemperature;
using VCRC;
using VCRC.Components;
var evaporator =
    new Evaporator(FluidsList.R32, (-25).DegreesCelsius(), TemperatureDelta.FromKelvins(5));
var compressor = new Compressor((80).Percent());
var condenser =
    new Condenser(FluidsList.R32, (40).DegreesCelsius(), TemperatureDelta.FromKelvins(3));
var cycle = new SimpleVCRC(evaporator, compressor, condenser);
var result = cycle.EntropyAnalysis((-18).DegreesCelsius(), (30).DegreesCelsius());
Console.WriteLine(result.ThermodynamicPerfection);        // 41.11 %
Console.WriteLine(result.MinSpecificWorkRatio);           // 41.11 %
Console.WriteLine(result.CompressorEnergyLossRatio);      // 20 %
Console.WriteLine(result.CondenserEnergyLossRatio);       // 16.07 %
Console.WriteLine(result.ExpansionValvesEnergyLossRatio); // 15.55 %
Console.WriteLine(result.EvaporatorEnergyLossRatio);      // 7.27 %
Console.WriteLine(result.RecuperatorEnergyLossRatio);     // 0 %
Console.WriteLine(result.EconomizerEnergyLossRatio);      // 0 %
Console.WriteLine(result.MixingEnergyLossRatio);          // 0 %
Console.WriteLine(result.AnalysisRelativeError);          // 3.18e-14 %
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.4.7 73 3/19/2024
3.4.6 96 2/21/2024
3.4.5 81 1/19/2024
3.4.4 84 1/16/2024
3.4.3 89 12/27/2023
3.4.2 77 12/20/2023
3.4.1 100 12/10/2023
3.4.0 118 11/30/2023
3.3.0 108 11/15/2023
3.2.6 85 11/10/2023
3.2.5 114 10/11/2023
3.2.4 79 9/26/2023
3.2.3 108 9/8/2023
3.2.2 123 8/31/2023
3.2.1 115 8/30/2023
3.2.0 155 8/11/2023
3.1.4 222 3/18/2023
3.1.3 204 3/10/2023
3.1.2 215 3/5/2023
3.1.1 219 2/26/2023
3.1.0 227 2/19/2023
3.0.0 281 12/11/2022
2.2.5 322 11/21/2022
2.2.4 295 11/15/2022
2.2.3 326 11/14/2022
2.2.2 301 11/7/2022
2.2.1 314 11/2/2022
2.2.0 385 9/13/2022
2.1.5 376 9/5/2022
2.1.4 398 8/17/2022
2.1.3 386 8/5/2022
2.1.2 403 7/22/2022
2.1.1 421 7/4/2022
2.1.0 434 6/29/2022
2.0.3 455 6/23/2022
2.0.2 407 6/22/2022
2.0.1 403 6/14/2022
2.0.0 408 6/7/2022
1.1.3 446 4/24/2022
1.1.2 436 4/6/2022
1.0.12 464 3/22/2022
1.0.11 425 3/11/2022
1.0.10 440 3/4/2022
1.0.9 426 3/1/2022
1.0.8 429 2/17/2022
1.0.7 443 2/12/2022
1.0.6 451 1/29/2022
1.0.5 277 1/10/2022
1.0.4 294 12/20/2021
1.0.3 293 12/8/2021
1.0.2 278 12/5/2021
1.0.1 1,386 11/28/2021
1.0.0 1,292 11/28/2021

Bump SharpProp from 3.1.16 to 3.1.17.