VCRC 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package VCRC --version 1.0.0
NuGet\Install-Package VCRC -Version 1.0.0
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.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VCRC --version 1.0.0
#r "nuget: VCRC, 1.0.0"
#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.0

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

VCRC

Build & Tests CodeQL NuGet Platform License codecov

Cross-platform vapor-compression refrigeration cycles analysis tool.

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

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

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

Single-stage VCRC with recuperator

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

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

Two-stage VCRC with incomplete intercooling

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.

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

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

Two-stage VCRC with complete intercooling

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.

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

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

Two-stage VCRC with economizer

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

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

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

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

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

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 was computed.  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 88 3/19/2024
3.4.6 104 2/21/2024
3.4.5 84 1/19/2024
3.4.4 88 1/16/2024
3.4.3 91 12/27/2023
3.4.2 79 12/20/2023
3.4.1 102 12/10/2023
3.4.0 121 11/30/2023
3.3.0 110 11/15/2023
3.2.6 87 11/10/2023
3.2.5 116 10/11/2023
3.2.4 81 9/26/2023
3.2.3 110 9/8/2023
3.2.2 125 8/31/2023
3.2.1 117 8/30/2023
3.2.0 157 8/11/2023
3.1.4 223 3/18/2023
3.1.3 205 3/10/2023
3.1.2 219 3/5/2023
3.1.1 224 2/26/2023
3.1.0 230 2/19/2023
3.0.0 284 12/11/2022
2.2.5 322 11/21/2022
2.2.4 297 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 386 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 456 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 465 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,387 11/28/2021
1.0.0 1,292 11/28/2021

First release.