42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
#pragma warning disable CS8618
|
|
|
|
public record AcPhase : Bus
|
|
{
|
|
protected AcPhase(){}
|
|
|
|
public AcPower Power { get; protected init; }
|
|
|
|
public static AcPhase FromVoltageCurrentPhi(Voltage voltageRms,
|
|
Current currentRms,
|
|
Angle phi) => new()
|
|
{
|
|
Current = currentRms,
|
|
Voltage = voltageRms,
|
|
Power = AcPower.FromVoltageCurrentPhi(voltageRms, currentRms, phi)
|
|
};
|
|
|
|
public static AcPhase FromVoltageCurrentActiveReactive(Voltage voltageRms,
|
|
Current currentRms,
|
|
ActivePower activePower,
|
|
ReactivePower reactivePower) => new()
|
|
{
|
|
Current = currentRms,
|
|
Voltage = voltageRms,
|
|
Power = AcPower.FromActiveReactive(activePower, reactivePower)
|
|
};
|
|
|
|
public static AcPhase FromVoltageCurrentActiveReactiveApparent(Voltage voltageRms,
|
|
Current currentRms,
|
|
ActivePower activePower,
|
|
ReactivePower reactivePower,
|
|
ApparentPower apparentPower) => new()
|
|
{
|
|
Current = currentRms,
|
|
Voltage = voltageRms,
|
|
Power = AcPower.FromActiveReactiveApparent(activePower, reactivePower, apparentPower)
|
|
};
|
|
|
|
|
|
} |