21 lines
579 B
C#
21 lines
579 B
C#
using InnovEnergy.Lib.Units.Power;
|
|
|
|
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
public sealed class DcBus
|
|
{
|
|
private DcBus() {}
|
|
|
|
public Voltage Voltage { get; private init; } = null!;
|
|
public Current Current { get; private init; } = null!;
|
|
public ActivePower Power { get; private init; } = null!;
|
|
|
|
public static DcBus FromVoltageCurrent(Voltage voltage, Current current) => new()
|
|
{
|
|
Voltage = voltage,
|
|
Current = current,
|
|
Power = current.Value * voltage.Value,
|
|
};
|
|
|
|
public static DcBus Null { get; } = FromVoltageCurrent(0, 0);
|
|
} |