2023-09-01 06:54:46 +00:00
|
|
|
using static System.Math;
|
2023-06-13 11:03:49 +00:00
|
|
|
|
2023-02-26 09:38:28 +00:00
|
|
|
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
|
2023-09-01 06:54:46 +00:00
|
|
|
public record AcPhase
|
2023-02-26 09:38:28 +00:00
|
|
|
{
|
2023-06-27 11:14:17 +00:00
|
|
|
public required Voltage Voltage { get; init; }
|
2023-09-01 06:54:46 +00:00
|
|
|
public required Current Current { get; init; }
|
|
|
|
public required Angle Phi { get; init; }
|
|
|
|
|
|
|
|
public AcPower Power => new()
|
2023-05-04 07:36:30 +00:00
|
|
|
{
|
2023-09-01 06:54:46 +00:00
|
|
|
Active = Voltage * Current * Cos(Phi),
|
|
|
|
Reactive = Voltage * Current * Sin(Phi),
|
2023-05-04 07:36:30 +00:00
|
|
|
};
|
2023-09-01 06:54:46 +00:00
|
|
|
|
|
|
|
public static AcPhase Zero => new AcPhase
|
2023-05-04 07:36:30 +00:00
|
|
|
{
|
2023-09-01 06:54:46 +00:00
|
|
|
Current = 0,
|
|
|
|
Voltage = 0,
|
|
|
|
Phi = 0,
|
2023-05-04 07:36:30 +00:00
|
|
|
};
|
2023-02-26 09:38:28 +00:00
|
|
|
}
|