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

28 lines
850 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
#pragma warning disable CS8618
2023-05-24 10:04:01 +00:00
public record Ac3Bus
{
2023-05-24 10:04:01 +00:00
protected Ac3Bus() {}
public AcPhase L1 { get; protected init; }
public AcPhase L2 { get; protected init; }
public AcPhase L3 { get; protected init; }
public AcPower Power { get; protected init; }
public Frequency Frequency { get; protected 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-05-24 10:04:01 +00:00
}