Circuit class is used to obtain the information on the entire circuit and operating the component.
This class can be called from Study class.
.
More...
Public Member Functions | |
| void | AddToLibrary (String ¯oName, String &saveName, String &folderName, String &description) |
| Adds the macro component of the specified name to the specified folder in the library. More... | |
| void | Clear () |
| Deletes all components and wires. | |
| void | ClearBrushGraph () |
| Deletes the contact angle for the brush and commutator that were added to the result table. | |
| void | ClearTerminalDifferenceLabel () |
| Deletes all electric potential difference or temperature difference between two terminals from the result table. | |
| void | ClearTerminalLabel () |
| Deletes all electric potentials or temperatures of the terminal from the result table. | |
| void | ClearVoltageDifferenceLabel () |
| Equivalent of Circuit::ClearTerminalDifferenceLabel . More... | |
| void | CreateBrushGraph (int x1, int y1, int x2, int y2) |
| Adds the contact angle of the brush and commutator in the result table. More... | |
| CircuitComponent * | CreateComponent (String &typeName, String &name="") |
| Creates a component. More... | |
| CircuitComponentInstance * | CreateComponentInstance (CircuitComponent *component, int x, int y) |
| Creates an instance from a circuit component. More... | |
| DynamicCircuit * | CreateDynamicCircuit (String &typeName) |
| Returns an object of the specified macro component. More... | |
| CircuitComponentInstance * | CreateInstance (Variant &component, int x, int y) |
| Creates an instance from a component. More... | |
| MacroCircuit * | CreateMacro (String ¯oName) |
| Returns the specified macro component object. More... | |
| CircuitComponentInstance * | CreateNewComponentInstance (String &typeName, int x, int y) |
| Creates a new component by specifying the component type and coordinates, and returns a CircuitComponentInstance object. More... | |
| CircuitComponentInstance * | CreateNewSubCircuitInstance (String &filename, int x, int y) |
| Creates a macro component, and then returns a CircuitComponentInstance object. More... | |
| void | CreateResponseTable (CircuitComponent *component) |
| CircuitComponentInstance * | CreateSubCircuit (String &filename, String &name, int x, int y) |
| Creates a macro component. More... | |
| void | CreateTerminalDifferenceLabel (String &name, int x1, int y1, int x2, int y2) |
| Adds the difference in electric potentials or temperatures between two terminals to the result table. More... | |
| void | CreateTerminalLabel (String &name, int x, int y) |
| Adds the electric potential or temperature of the terminal to the result table. More... | |
| void | CreateVoltageDifferenceLabel (String &name, int x1, int y1, int x2, int y2) |
| Equivalent of Circuit::CreateTerminalDifferenceLabel . More... | |
| CircuitWire * | CreateWire (int x1, int y1, int x2, int y2) |
| Connects two terminals with a wire. More... | |
| void | DeleteComponent (Variant &val) |
| Specifies a name, and deletes a component. More... | |
| void | DeleteComponentInstance (Variant &val) |
| Deletes the component from the specified name or index. More... | |
| void | DeleteComponentInstanceByType (String &typeName, int index) |
| Deletes the component from the specified component type and index. More... | |
| void | DeleteInstance (Variant &val, int index) |
| Specifies a name or index, and deletes an instance. More... | |
| void | DeleteTerminalDifferenceLabel (int x1, int y1, int x2, int y2) |
| Deletes the electric potential difference or temperature difference between two terminals from the result table. More... | |
| void | DeleteTerminalLabel (int x, int y) |
| Deletes the electric potential or temperature of the terminal from the result table. More... | |
| void | DeleteVoltageDifferenceLabel (int x1, int y1, int x2, int y2) |
| Equivalent of Circuit::DeleteTerminalDifferenceLabel . More... | |
| void | DeleteWire (CircuitWire *wire) |
| Specifies the CircuitWire object, and deletes a wire. More... | |
| void | DeleteWireByIndex (int index) |
| Specifies the index, and deletes a wire. More... | |
| CircuitComponentInstance * | DuplicateCircuit (String &name, String &newName) |
| Duplicates a circuit. More... | |
| void | ExportImage (String &filename) |
| Exports an image file (*.png, *.jpg, *.bmp). More... | |
| void | ExportImageWithSize (String &filename, int width, int height) |
| Exports an image file (*.png, *.jpg, *.bmp) by specifying the size. More... | |
| void | ExportXML (String &filename) |
| Exports thermal circuit from magnetic analysis study to xml file. More... | |
| CircuitComponent * | GetComponent (Variant &val) |
| Returns the CircuitComponent object of the specified component name or index. More... | |
| CircuitComponent * | GetComponentByType (String &typeName, int index) |
| Returns the CircuitComponent object from the specified component type and index. . More... | |
| CircuitComponentInstance * | GetComponentInstance (Variant &val) |
| Returns the CircuitComponentInstance object of the specified component name or index. . More... | |
| CircuitComponentInstance * | GetComponentInstanceByType (String &typeName, int index) |
| Returns the CircuitComponentInstance object from the specified component type and index. . More... | |
| CircuitComponentInstance * | GetInstance (Variant &val, int index) |
| Returns an instance. More... | |
| Circuit * | GetSubCircuit (Variant &val) |
| Returns the Circuit object for the specified macro component name or index. More... | |
| CircuitWire * | GetWire (int index) |
| Returns the CircuitWire object of the specified index. More... | |
| bool | IsValid () |
| Returns True if an object is valid. More... | |
| void | MakeSubCircuitEditable (Variant &val) |
| Makes the subcircuit editable for the macro component of the specified name or index. More... | |
| int | NumComponents () |
| Returns the total number of components in the circuit as an integer. More... | |
| int | NumComponentsByType (String &typeName) |
| Returns the total number of components in the circuit as an integer. More... | |
| int | NumInstances () |
| Returns the total number of instances of the component as an integer. More... | |
| int | NumSubCircuit () |
| Returns the total number of macro components as an integer. More... | |
| int | NumWires () |
| Returns the number of wires as an integer. More... | |
| void | Save (String &filename, int version=kProjectFileVersion) |
| Saves a file. More... | |
| void | SaveToolbox (String &title, String &description, String &folder, int version=kProjectFileVersion) |
| Saves circuit file and registers it to the tool box. More... | |
Circuit class is used to obtain the information on the entire circuit and operating the component.
This class can be called from Study class.
.
Example of obtaining the class object:
For more information on component type names specified by the argument typeName in the circuit settings, see Properties and Flags for the Circuit Settings .
| void Circuit::AddToLibrary | ( | String & | macroName, |
| String & | saveName, | ||
| String & | folderName, | ||
| String & | description | ||
| ) |
Adds the macro component of the specified name to the specified folder in the library.
| macroName | Macro component name |
| saveName | Save name in library |
| folderName | Save folder name |
| description | Description |
| void Circuit::ClearVoltageDifferenceLabel | ( | ) |
Equivalent of Circuit::ClearTerminalDifferenceLabel .
| void Circuit::CreateBrushGraph | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Adds the contact angle of the brush and commutator in the result table.
| x1 | X-coordinate of the terminal 1 |
| y1 | Y-coordinate of the terminal 1 |
| x2 | X-coordinate of the terminal 2 |
| y2 | Y-coordinate of the terminal 2 |
| CircuitComponent * Circuit::CreateComponent | ( | String & | typeName, |
| String & | name = "" |
||
| ) |
Creates a component.
| typeName | Component type
Resistor
Capacitor
Inductor
Diode
Coil
FEMConductor
Switch
Ground
VoltageSource
TwoTerminalVoltageSource
CurrentSource
TwoTerminalCurrentSource
CurrentProbe
VoltageProbe
3PhaseVoltageSource
3PhaseCurrentSource
MultiPhaseVoltageSource
MultiPhaseCurrentSource
BrushCommutator
MacroComponent
ReferenceCoil
ReferenceConductor
PowerSource
ThreeTerminalResistor
ThreeTerminalCoil
FEAElectricInput
FEAElectricOutput
CouplingControl
UserSubroutine
ThermalResistor
HeatCapacity
HeatGeneration
HeatTransfer
FixedTemperature
ThermalProbe
HeatControl
CoilEndCooling
ConvectionCooling
|
| name | Component name |
For more information on component type, see Properties and Flags for the Circuit Settings .
| CircuitComponentInstance * Circuit::CreateComponentInstance | ( | CircuitComponent * | component, |
| int | x, | ||
| int | y | ||
| ) |
Creates an instance from a circuit component.
| component | CircuitComponent object |
| x | X-coordinate |
| y | Y-coordinate |
| DynamicCircuit * Circuit::CreateDynamicCircuit | ( | String & | typeName | ) |
Returns an object of the specified macro component.
| typeName | Type of macro component to be created
cage
lap-winding (for brush motors)
wave-winding (for brush motors)
Serial-Conductors
|
For more information on component types, see Properties and Flags for the Circuit Settings .
| CircuitComponentInstance * Circuit::CreateInstance | ( | Variant & | component, |
| int | x, | ||
| int | y | ||
| ) |
Creates an instance from a component.
| component | Component name or index |
| x | X-coordinate |
| y | Y-coordinate |
Specify Ground in the component to create an instance of a Ground component.
| MacroCircuit * Circuit::CreateMacro | ( | String & | macroName | ) |
Returns the specified macro component object.
| macroName | Macro component name |
| CircuitComponentInstance * Circuit::CreateNewComponentInstance | ( | String & | typeName, |
| int | x, | ||
| int | y | ||
| ) |
Creates a new component by specifying the component type and coordinates, and returns a CircuitComponentInstance object.
| typeName | Component type
Resistor
Capacitor
Inductor
Diode
Coil
FEMConductor
Switch
Ground
VoltageSource
TwoTerminalVoltageSource
CurrentSource
TwoTerminalCurrentSource
CurrentProbe
VoltageProbe
3PhaseVoltageSource
3PhaseCurrentSource
MultiPhaseVoltageSource
MultiPhaseCurrentSource
BrushCommutator
MacroComponent
ReferenceCoil
ReferenceConductor
PowerSource
ThreeTerminalResistor
ThreeTerminalCoil
FEAElectricInput
FEAElectricOutput
CouplingControl
UserSubroutine
ThermalResistor
HeatCapacity
HeatGeneration
HeatTransfer
FixedTemperature
ThermalProbe
HeatControl
CoilEndCooling
ConvectionCooling
|
| x | X-coordinate |
| y | Y-coordinate |
For more information on component type, see Properties and Flags for the Circuit Settings .
| CircuitComponentInstance * Circuit::CreateNewSubCircuitInstance | ( | String & | filename, |
| int | x, | ||
| int | y | ||
| ) |
Creates a macro component, and then returns a CircuitComponentInstance object.
| typeName | Macro component type
PAM Inverter(Diode)
PAM Inverter
PWM_Inverter
Delta Connection
Star Connection
Three Phase Power Supply(Current)
Three Phase Power Supply(Voltage)
Three Phase Rectifier
PWM_Generator
PWM_Signal_Generator_6phase
RTPMSM_6phase_Mask
Vin_Gain_6phase
dq_PI_controller
phase_current_PI_controller_6phases
Inverter_(Control_Switch)
Rt_Fea_Switch
RT_FEA_Switch_Grand_3phase
JMAG-RT_FEA_Switch_6phase
PWM_Current_Vector_Control
PWM_Current_Vector_Control_with_RT
PWM_Current_Vector_Control_6phases
PWM_Current_Vector_Control_6phases_with_RT
IM_PWM_Current_Vector_Control
IM_PWM_Current_Vector_Control_6phases
|
| x | X-coordinate |
| y | Y-coordinate |
| void Circuit::CreateResponseTable | ( | CircuitComponent * | component | ) |
| component | CircuitComponent object |
| CircuitComponentInstance * Circuit::CreateSubCircuit | ( | String & | filename, |
| String & | name, | ||
| int | x, | ||
| int | y | ||
| ) |
Creates a macro component.
| typeName | Macro component type
PAM Inverter(Diode)
PAM Inverter
PWM_Inverter
Delta Connection
Star Connection
Three Phase Power Supply(Current)
Three Phase Power Supply(Voltage)
Three Phase Rectifier
PWM_Generator
PWM_Signal_Generator_6phase
RTPMSM_6phase_Mask
Vin_Gain_6phase
dq_PI_controller
phase_current_PI_controller_6phases
Inverter_(Control_Switch)
Rt_Fea_Switch
RT_FEA_Switch_Grand_3phase
JMAG-RT_FEA_Switch_6phase
PWM_Current_Vector_Control
PWM_Current_Vector_Control_with_RT
PWM_Current_Vector_Control_6phases
PWM_Current_Vector_Control_6phases_with_RT
IM_PWM_Current_Vector_Control
IM_PWM_Current_Vector_Control_6phases
|
| name | Component name |
| x | X-coordinate |
| y | Y-coordinate |
For more information on component type, see Properties and Flags for the Circuit Settings .
| void Circuit::CreateTerminalDifferenceLabel | ( | String & | name, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Adds the difference in electric potentials or temperatures between two terminals to the result table.
| name | Label given to a pair of terminals for finding the electric potential difference or temperature difference. |
| x1 | X-coordinate of terminal 1 |
| y1 | Y-coordinate of terminal 1 |
| x2 | X-coordinate of terminal 2 |
| y2 | Y-coordinate of terminal 2 |
| void Circuit::CreateTerminalLabel | ( | String & | name, |
| int | x, | ||
| int | y | ||
| ) |
Adds the electric potential or temperature of the terminal to the result table.
| name | Title of the voltage or temperature |
| x | X-coordinate of the terminal |
| y | Y-coordinate of the terminal |
| void Circuit::CreateVoltageDifferenceLabel | ( | String & | name, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Equivalent of Circuit::CreateTerminalDifferenceLabel .
| CircuitWire * Circuit::CreateWire | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Connects two terminals with a wire.
| x1 | X-coordinate of terminal 1 |
| y1 | Y-coordinate of terminal 1 |
| x2 | X-coordinate of terminal 2 |
| y2 | Y-coordinate of terminal 2 |
| void Circuit::DeleteComponent | ( | Variant & | val | ) |
Specifies a name, and deletes a component.
| val | Component name |
| void Circuit::DeleteComponentInstance | ( | Variant & | val | ) |
Deletes the component from the specified name or index.
| val | Name or index of the circuit component |
| void Circuit::DeleteComponentInstanceByType | ( | String & | typeName, |
| int | index | ||
| ) |
Deletes the component from the specified component type and index.
| typeName | Component type |
| index | Index of circuit component |
For more information on component types, see Properties and Flags for the Circuit Settings .
| void Circuit::DeleteInstance | ( | Variant & | val, |
| int | index | ||
| ) |
Specifies a name or index, and deletes an instance.
| val | Name or index of the circuit component |
| index | Index of an instance |
| void Circuit::DeleteTerminalDifferenceLabel | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Deletes the electric potential difference or temperature difference between two terminals from the result table.
| x1 | X-coordinate of the terminal 1 |
| y1 | Y-coordinate of the terminal 1 |
| x2 | X-coordinate of the terminal 2 |
| y2 | Y-coordinate of the terminal 2 |
| void Circuit::DeleteTerminalLabel | ( | int | x, |
| int | y | ||
| ) |
Deletes the electric potential or temperature of the terminal from the result table.
| x | X-coordinate of the terminal |
| y | Y-coordinate of the terminal |
| void Circuit::DeleteVoltageDifferenceLabel | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Equivalent of Circuit::DeleteTerminalDifferenceLabel .
| void Circuit::DeleteWire | ( | CircuitWire * | wire | ) |
Specifies the CircuitWire object, and deletes a wire.
| wire | CircuitWire object |
| void Circuit::DeleteWireByIndex | ( | int | index | ) |
Specifies the index, and deletes a wire.
| index | Wire index |
| CircuitComponentInstance * Circuit::DuplicateCircuit | ( | String & | name, |
| String & | newName | ||
| ) |
Duplicates a circuit.
| name | Circuit component name |
| newName | New circuit component name |
| void Circuit::ExportImage | ( | String & | filename | ) |
Exports an image file (*.png, *.jpg, *.bmp).
| filename | File path |
| void Circuit::ExportImageWithSize | ( | String & | filename, |
| int | width, | ||
| int | height | ||
| ) |
Exports an image file (*.png, *.jpg, *.bmp) by specifying the size.
| filename | File path |
| width | width |
| height | height |
| void Circuit::ExportXML | ( | String & | filename | ) |
Exports thermal circuit from magnetic analysis study to xml file.
| filename | File path |
| CircuitComponent * Circuit::GetComponent | ( | Variant & | val | ) |
Returns the CircuitComponent object of the specified component name or index.
This command is used to operate the properties of a component.
| val | Component name or index |
| CircuitComponent * Circuit::GetComponentByType | ( | String & | typeName, |
| int | index | ||
| ) |
Returns the CircuitComponent object from the specified component type and index.
.
This command is used to operate the properties of a component.
| typeName | Component type |
| index | Index of circuit component |
| CircuitComponentInstance * Circuit::GetComponentInstance | ( | Variant & | val | ) |
Returns the CircuitComponentInstance object of the specified component name or index.
.
This command is used to specify the position and angle of a component.
| val | Name or index of the circuit component |
| CircuitComponentInstance * Circuit::GetComponentInstanceByType | ( | String & | typeName, |
| int | index | ||
| ) |
Returns the CircuitComponentInstance object from the specified component type and index.
.
This command is used to operate the position and angle of a component.
| typeName | Component type |
| index | Component index |
| CircuitComponentInstance * Circuit::GetInstance | ( | Variant & | val, |
| int | index | ||
| ) |
Returns an instance.
| val | Component name/Component index |
| index | Instance index |
| Circuit * Circuit::GetSubCircuit | ( | Variant & | val | ) |
| CircuitWire * Circuit::GetWire | ( | int | index | ) |
Returns the CircuitWire object of the specified index.
| index | Wire index |
| bool Circuit::IsValid | ( | ) |
Returns True if an object is valid.
| void Circuit::MakeSubCircuitEditable | ( | Variant & | val | ) |
Makes the subcircuit editable for the macro component of the specified name or index.
| val | Component name / component index |
| int Circuit::NumComponents | ( | ) |
Returns the total number of components in the circuit as an integer.
| int Circuit::NumComponentsByType | ( | String & | typeName | ) |
Returns the total number of components in the circuit as an integer.
| typeName | Component type |
| int Circuit::NumInstances | ( | ) |
Returns the total number of instances of the component as an integer.
| int Circuit::NumSubCircuit | ( | ) |
Returns the total number of macro components as an integer.
| int Circuit::NumWires | ( | ) |
Returns the number of wires as an integer.
| void Circuit::Save | ( | String & | filename, |
| int | version = kProjectFileVersion |
||
| ) |
Saves a file.
| filename | File path |
| version | Save version |
| void Circuit::SaveToolbox | ( | String & | title, |
| String & | description, | ||
| String & | folder, | ||
| int | version = kProjectFileVersion |
||
| ) |
Saves circuit file and registers it to the tool box.
| title | Title |
| description | Description |
| folder | Folder of tool box |
| version | Save version |