25 lines
894 B
C#
25 lines
894 B
C#
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
public sealed class Ac1Bus
|
|
{
|
|
private Ac1Bus()
|
|
{}
|
|
|
|
public required Voltage Voltage { get; init; }
|
|
public required Current Current { get; init; }
|
|
public required AcPower Power { get; init; }
|
|
public required Frequency Frequency { get; init; }
|
|
|
|
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 => FromVoltageCurrentFrequencyPhi(0, 0, 0, 0);
|
|
} |