araxis / Industrial-Electricity-Calculators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Industrial-Electricity-Calculators

.NET NuGet NuGet

this library contains Industrial Electricity related calculators.

it is implemented based on CalculatorEngine.

Installing IEC

You should install IEC with NuGet:

Install-Package Arax.Calculators.IEC

Or via the .NET Core command line interface:

dotnet add package Arax.Calculators.IEC

Add to ServiceCollection

   //add CalcEngine
   builder.Services.AddCalculator();

   //add calculators 
   builder.Services.AddIndustrialElectricityCalculators();

Use: inject ICalcEngine & use

 private readonly ICalcEngine _calcEngine;
 ...
   private async Task<Result<Current>> CalcCurrent()
   {
       var power = 12.W();
       var voltage = 415;
       var cosPhi = .9;
       var efficiency = 90;
       var powerSystem = PowerSystem.ThreePhase;
       return await _calcEngine.CalcCurrent(power, voltage, cosPhi, efficiency, powerSystem);
   }

Calculators

  • Active Power ( x4 )
  • Apparent Power ( x3 )
  • Reactive Power ( x2 )
  • Current ( x2 )
  • Voltage ( x3)

About


Languages

Language:C# 100.0%