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

15 lines
345 B
C#
Raw Normal View History

2023-03-01 09:52:21 +00:00
namespace InnovEnergy.Lib.Units.Composite;
2023-05-24 10:04:01 +00:00
public record DcBus : Bus
2023-03-01 09:52:21 +00:00
{
2023-05-24 10:04:01 +00:00
protected DcBus() {}
2023-05-24 10:04:01 +00:00
public ActivePower Power { get; protected init; }
2023-05-04 07:36:30 +00:00
public static DcBus FromVoltageCurrent(Voltage voltage, Current current) => new()
{
Voltage = voltage,
Current = current,
2023-05-24 10:04:01 +00:00
Power = current.Value * voltage.Value,
};
2023-03-01 09:52:21 +00:00
}