Innovenergy_trunk/csharp/lib/StatusApi/Phases/AcPhase.cs

17 lines
465 B
C#

using static DecimalMath.DecimalEx;
namespace InnovEnergy.Lib.StatusApi.Phases;
public class AcPhase : Phase
{
public Decimal Phi { get; init; }
public Decimal ApparentPower => Voltage * Current;
public Decimal ReactivePower => ApparentPower * Sin(Phi);
public Decimal ActivePower => ApparentPower * PowerFactor;
public Decimal PowerFactor => Cos(Phi);
internal AcPhase() {}
public static AcPhase Null = new AcPhase();
}