Table of Contents

Class PowerComponent

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] A component that can be attached to the power system and is able to have a created power model.


public class PowerComponent : PhysicalObject, IPowerInterface
Inheritance
PowerComponent
Implements
Derived

Constructors

PowerComponent()

Default constructor

protected PowerComponent()

Fields

ResistorCurrentDataExport

A Real Property Export for the Resistor Current Data

protected RealPropertyExport? ResistorCurrentDataExport

Field Value

RealPropertyExport

Properties

Current

The Input Current of the node.

[Unit(UnitType.AMPERE)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "PowerModel", ContainedName = "CurrentIn")]
public double Current { get; set; }

Property Value

double

Power

The Power consumed by this component

[Unit(UnitType.WATT)]
[ReadOnly]
public double Power { get; }

Property Value

double

PowerModel

The power model of this power component that is created by this component.

public PowerNodeModel? PowerModel { get; }

Property Value

PowerNodeModel

Resistance

The Resistance of the node.

[Unit(UnitType.OHM)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "PowerModel")]
public double Resistance { get; set; }

Property Value

double

Voltage

The Node Voltage being used.

[Unit(UnitType.VOLT)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "PowerModel", ContainedName = "VoltageNode")]
public double Voltage { get; set; }

Property Value

double

Methods

BuildPower(string, string)

Builds the power components based on the power bus reference. Here, the interfaced component will be able to assign its SPICE components to the power bus. This will return an array of IEntity objects that represent the SPICE components.

[Hidden]
public virtual IEntity[] BuildPower(string negative, string positive)

Parameters

negative string

The input node for the entity

positive string

The output node for the entity

Returns

IEntity[]

ConfigurePower(double)

Configures the power interface to its default state, which will include updating the variables of any SPICE power components to the correct state.

public virtual bool ConfigurePower(double step)

Parameters

step double

[s] The step time for the circuit run

Returns

bool

A success flag

ExportPower(OP)

Exports the power from the SPICE (OP) simulation to the power interface, updating any relevant data.

[Hidden]
public virtual void ExportPower(OP simulation)

Parameters

simulation OP

The SPICE OP simulation

OnCreate()

Called when the 'Component' is created from the controller.

protected override void OnCreate()

OnLoad(double)

Called after all of the data has been loaded from a save state on this object. This enables any post-load operations to be performed and extra data to be loaded from the metadata.

protected override void OnLoad(double time)

Parameters

time double

[s] The current clock time of the simulation

ResetPower()

Resets the power interface to its default state, which will include removing any SPICE power references associated to the current interface.

public virtual void ResetPower()