Innovenergy_trunk/csharp/Lib/Units/Composite/AcPhase.cs

23 lines
528 B
C#

using static System.Math;
namespace InnovEnergy.Lib.Units.Composite;
public record AcPhase
{
public required VoltageRms Voltage { get; init; }
public required CurrentRms Current { get; init; }
public required Angle Phi { get; init; }
public AcPower Power => new()
{
Active = Voltage * Current * Cos(Phi),
Reactive = Voltage * Current * Sin(Phi),
};
public static AcPhase Zero => new AcPhase
{
Current = 0,
Voltage = 0,
Phi = 0,
};
}