28 lines
920 B
C#
28 lines
920 B
C#
|
|
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
|
|
public sealed class Ac3Bus
|
|
{
|
|
private Ac3Bus() {}
|
|
|
|
public required AcPhase L1 { get; init; }
|
|
public required AcPhase L2 { get; init; }
|
|
public required AcPhase L3 { get; init; }
|
|
public required AcPower Power { get; init; }
|
|
public required Frequency Frequency { get; init; }
|
|
|
|
public static Ac3Bus FromPhasesAndFrequency(AcPhase l1,
|
|
AcPhase l2,
|
|
AcPhase l3,
|
|
Frequency frequency) => new()
|
|
{
|
|
L1 = l1,
|
|
L2 = l2,
|
|
L3 = l3,
|
|
Power = AcPower.SumOf(l1.Power, l2.Power, l3.Power),
|
|
Frequency = frequency,
|
|
};
|
|
|
|
public static Ac3Bus Null => FromPhasesAndFrequency(AcPhase.Null, AcPhase.Null, AcPhase.Null, 0);
|
|
} |