20 lines
896 B
C#
20 lines
896 B
C#
using InnovEnergy.Lib.Utils;
|
|
using static DecimalMath.DecimalEx;
|
|
|
|
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
public record Ac3Bus
|
|
{
|
|
public AcPhase L1 { get; init; }
|
|
public AcPhase L2 { get; init; }
|
|
public AcPhase L3 { get; init; }
|
|
public Frequency Frequency { get; init; }
|
|
|
|
public ApparentPower ApparentPower => L1.ApparentPower + L2.ApparentPower + L3.ApparentPower;
|
|
public ReactivePower ReactivePower => L1.ReactivePower + L2.ReactivePower + L3.ReactivePower;
|
|
public Power ActivePower => L1.ActivePower + L2.ActivePower + L3.ActivePower;
|
|
public Angle Phi => ATan2(ReactivePower, ActivePower);
|
|
|
|
public static Ac3Bus operator |(Ac3Bus left, Ac3Bus right) => OpParallel(left, right);
|
|
private static readonly Func<Ac3Bus, Ac3Bus, Ac3Bus> OpParallel = "|".CreateBinaryOpForProps<Ac3Bus>();
|
|
} |