2023-03-01 07:05:57 +00:00
|
|
|
using InnovEnergy.Lib.Utils;
|
|
|
|
|
2023-02-26 09:38:28 +00:00
|
|
|
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
|
2023-03-01 07:05:57 +00:00
|
|
|
public record DcPhase : IPhase
|
2023-02-26 09:38:28 +00:00
|
|
|
{
|
2023-03-01 07:05:57 +00:00
|
|
|
public required Voltage Voltage { get; init;}
|
|
|
|
public required Current Current { get; init;}
|
|
|
|
|
2023-02-26 09:38:28 +00:00
|
|
|
public Power Power => Current * Voltage;
|
2023-02-26 18:19:16 +00:00
|
|
|
|
2023-03-01 07:05:57 +00:00
|
|
|
public static DcPhase operator |(DcPhase left, DcPhase right) => OpParallel(left, right);
|
|
|
|
private static readonly Func<DcPhase, DcPhase, DcPhase> OpParallel = "|".CreateBinaryOpForProps<DcPhase>();
|
|
|
|
|
|
|
|
|
2023-02-26 09:38:28 +00:00
|
|
|
}
|