2023-06-13 11:03:49 +00:00
|
|
|
using InnovEnergy.Lib.Units.Power;
|
|
|
|
|
2023-03-01 09:52:21 +00:00
|
|
|
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
|
2023-06-13 11:03:49 +00:00
|
|
|
public sealed class DcBus
|
2023-03-01 09:52:21 +00:00
|
|
|
{
|
2023-06-13 11:03:49 +00:00
|
|
|
private DcBus() {}
|
2023-04-25 09:27:57 +00:00
|
|
|
|
2023-06-27 11:14:17 +00:00
|
|
|
public required Voltage Voltage { get; init; }
|
|
|
|
public required Current Current { get; init; }
|
|
|
|
public required ActivePower Power { get; init; }
|
2023-05-04 07:36:30 +00:00
|
|
|
|
|
|
|
public static DcBus FromVoltageCurrent(Voltage voltage, Current current) => new()
|
2023-04-25 09:27:57 +00:00
|
|
|
{
|
|
|
|
Voltage = voltage,
|
|
|
|
Current = current,
|
2023-05-24 10:04:01 +00:00
|
|
|
Power = current.Value * voltage.Value,
|
2023-04-25 09:27:57 +00:00
|
|
|
};
|
2023-06-13 11:03:49 +00:00
|
|
|
|
2023-06-22 08:13:21 +00:00
|
|
|
public static DcBus Null => FromVoltageCurrent(0, 0);
|
2023-03-01 09:52:21 +00:00
|
|
|
}
|