28 lines
850 B
C#
28 lines
850 B
C#
|
|
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
|
|
#pragma warning disable CS8618
|
|
|
|
public record Ac3Bus
|
|
{
|
|
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; }
|
|
|
|
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,
|
|
};
|
|
} |