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

25 lines
930 B
C#

namespace InnovEnergy.Lib.Units.Composite;
public sealed class Ac1Bus
{
private Ac1Bus()
{}
public Voltage Voltage { get; private init; } = null!;
public Current Current { get; private init; } = null!;
public AcPower Power { get; private init; } = null!;
public Frequency Frequency { get; private init; } = null!;
public static Ac1Bus FromVoltageCurrentFrequencyPhi(Double voltageRms,
Double currentRms,
Double frequency,
Double phi) => new()
{
Frequency = frequency,
Current = currentRms,
Voltage = voltageRms,
Power = AcPower.FromVoltageCurrentPhi(voltageRms, currentRms, phi)
};
public static Ac1Bus Null { get; } = FromVoltageCurrentFrequencyPhi(0, 0, 0, 0);
}