Table of Contents

Class PowerStorage

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

A power storage unit can be attached to a power circuit on an entity and is able to store power that can be both charged and discharged out of the system.

public class PowerStorage : PhysicalComponent, IPowerAttachment
Inheritance
PowerStorage
Implements
Inherited Members

Constructors

PowerStorage()

Default constructor

public PowerStorage()

Fields

Out_PowerStorageMsg

The power storage message containing the current information of the storage unit

public PowerStorageMessage Out_PowerStorageMsg

Field Value

PowerStorageMessage

Properties

Capacity

[Ah] Capacity of the storage unit

[EditableVariable("Ah", 0, false, "", "")]
public double Capacity { get; set; }

Property Value

double

Charge

[Ah] The current charge of the battery in Amp hours

[EditableVariable("Ah", true, "", "")]
public double Charge { get; }

Property Value

double

ChargeFraction

[-] A value between 0 and 1 for the fraction of charge stored

[EditableVariable("-", 0, 1, false, "", "")]
public double ChargeFraction { get; set; }

Property Value

double

MaxChargeRate

[A] The maximum current flow that can charge the storage unit

[EditableVariable("A", 0, false, "", "")]
public double MaxChargeRate { get; set; }

Property Value

double

MaxDischargeRate

[A] The maximum current flow that leave the storage unit

[EditableVariable("A", 0, false, "", "")]
public double MaxDischargeRate { get; set; }

Property Value

double

NominalVoltage

[V] The desired voltage that is produced from this storage unit

[EditableVariable("V", 0, false, "", "")]
public double NominalVoltage { get; set; }

Property Value

double

Out_PowerNodeMsg

The power node message that contains the information about the power node

public PowerNodeMessage? Out_PowerNodeMsg { get; }

Property Value

PowerNodeMessage

Methods

OnBegin(double)

Called when the 'Component' is beginning

protected override void OnBegin(double time)

Parameters

time double

current time (seconds)

OnDecodeMetadata(JObject)

Called after the "Component" was loaded to handle additional metadata.

protected override void OnDecodeMetadata(JObject metadata)

Parameters

metadata JObject

OnEncodeMetadata(JObject)

Called while the "Component" is being saved to save additional metadata.

protected override JObject OnEncodeMetadata(JObject metadata)

Parameters

metadata JObject

Returns

JObject

OnReset(double)

Called when the 'Component' is reset from a simulation

protected override void OnReset(double time)

Parameters

time double

reset time (seconds)

OnUpdate(double, double)

Called when the 'Component' should update

protected override void OnUpdate(double time, double step)

Parameters

time double

current time (seconds)

step double

the time step (seconds)