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

25 lines
930 B
C#
Raw Normal View History

namespace InnovEnergy.Lib.Units.Composite;
2023-06-13 11:03:49 +00:00
public sealed class Ac1Bus
2023-02-26 18:19:16 +00:00
{
2023-06-13 11:03:49 +00:00
private Ac1Bus()
{}
2023-02-26 18:19:16 +00:00
2023-06-13 11:03:49 +00:00
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)
2023-06-13 11:03:49 +00:00
};
2023-06-13 11:03:49 +00:00
public static Ac1Bus Null { get; } = FromVoltageCurrentFrequencyPhi(0, 0, 0, 0);
}