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

28 lines
968 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
2023-06-13 11:03:49 +00:00
public AcPhase L1 { get; private init; } = null!;
public AcPhase L2 { get; private init; } = null!;
public AcPhase L3 { get; private init; } = null!;
public AcPower Power { get; private init; } = null!;
public Frequency Frequency { get; private init; } = null!;
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 { get; } = FromPhasesAndFrequency(AcPhase.Null, AcPhase.Null, AcPhase.Null, 0);
2023-05-24 10:04:01 +00:00
}