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.11 87 10/3/2024
3.4.10 132 8/29/2024
3.4.9 125 7/2/2024
3.4.8 95 6/12/2024
3.4.7 130 3/19/2024
3.4.6 137 2/21/2024
3.4.5 119 1/19/2024
3.4.4 122 1/16/2024
3.4.3 122 12/27/2023
3.4.2 114 12/20/2023
3.4.1 135 12/10/2023
3.4.0 155 11/30/2023
3.3.0 140 11/15/2023
3.2.6 124 11/10/2023
3.2.5 151 10/11/2023
3.2.4 114 9/26/2023
3.2.3 136 9/8/2023
3.2.2 156 8/31/2023
3.2.1 143 8/30/2023
3.2.0 188 8/11/2023
3.1.4 253 3/18/2023
3.1.3 237 3/10/2023
3.1.2 245 3/5/2023
3.1.1 259 2/26/2023
3.1.0 268 2/19/2023
3.0.0 317 12/11/2022
2.2.5 354 11/21/2022
2.2.4 324 11/15/2022
2.2.3 356 11/14/2022
2.2.2 330 11/7/2022
2.2.1 350 11/2/2022
2.2.0 421 9/13/2022
2.1.5 405 9/5/2022
2.1.4 426 8/17/2022
2.1.3 416 8/5/2022
2.1.2 430 7/22/2022
2.1.1 451 7/4/2022
2.1.0 463 6/29/2022
2.0.3 487 6/23/2022
2.0.2 438 6/22/2022
2.0.1 432 6/14/2022
2.0.0 435 6/7/2022
1.1.3 480 4/24/2022
1.1.2 463 4/6/2022
1.0.12 495 3/22/2022
1.0.11 453 3/11/2022
1.0.10 474 3/4/2022
1.0.9 455 3/1/2022
1.0.8 459 2/17/2022
1.0.7 469 2/12/2022
1.0.6 481 1/29/2022
1.0.5 302 1/10/2022
1.0.4 329 12/20/2021
1.0.3 317 12/8/2021
1.0.2 305 12/5/2021
1.0.1 1,413 11/28/2021
1.0.0 1,316 11/28/2021

First release.