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

21 lines
550 B
C#

using InnovEnergy.Lib.Units.Power;
namespace InnovEnergy.Lib.Units.Composite;
public sealed class DcBus
{
private DcBus() {}
public required Voltage Voltage { get; init; }
public required Current Current { get; init; }
public required ActivePower Power { get; init; }
public static DcBus FromVoltageCurrent(Voltage voltage, Current current) => new()
{
Voltage = voltage,
Current = current,
Power = current.Value * voltage.Value,
};
public static DcBus Null => FromVoltageCurrent(0, 0);
}