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

28 lines
920 B
C#
Raw Normal View History

2023-02-26 14:39:55 +00:00
namespace InnovEnergy.Lib.Units.Composite;
2023-04-04 08:23:29 +00:00
2023-06-13 11:03:49 +00:00
public sealed class Ac3Bus
{
2023-06-13 11:03:49 +00:00
private Ac3Bus() {}
2023-05-24 10:04:01 +00:00
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; }
2023-05-04 07:36:30 +00:00
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,
};
2023-06-13 11:03:49 +00:00
public static Ac3Bus Null => FromPhasesAndFrequency(AcPhase.Null, AcPhase.Null, AcPhase.Null, 0);
2023-05-24 10:04:01 +00:00
}