type
The type
attribute of the MachineData
class represents the type of the machine. In the GUI, this is displayed as a checkpoint.
It is an instance of the MachineTypeData
class accessible through the eMotorSolution.CheckPoints.Machine.Type
module.
Parameters
- machine_type_init:
str
, The type data of the machine. defaults to"IPMSM"
. - pole_number_expression:
str
, The number of poles for the machine. defaults to"8"
. - topology_init:
str
, The topology of the machine. defaults to"Internal Rotor"
. - machine_name:
str
, The name of the machine. defaults to"My Machine"
.
Methods
Method | Description |
---|---|
set_machine_type(machine_type: str) | Sets the machine type to "IPMSM" , "SPMSM" , or "SynRM" . |
set_pole_number(expression: int | str) | Sets the number of poles for the machine. |
set_topology(topology: str) | Sets the machine topology to "Internal Rotor" or "External Rotor" . |
validate() | Returns the validation status in dictionary format. |
Attributes
Attribute | Description |
---|---|
machine_type | str The type of the machine ("IPMSM" , "SPMSM" or "SynRM" ). ⚠️ read-only |
pole_number | int The number of poles in the machine. ⚠️ read-only |
topology | str The topology of the machine ("Internal Rotor" or "External Rotor" ). ⚠️ read-only |
machine_name | str The name of the machine. |
Example Usage
Here is an example of how to access and modify some of the attributes and methods of the MachineTypeData
class:
import eMotorSolution as ems
# Load an existing project
project = ems.load_project("path/to/your/project.json")
# Access the machine type
print(project.machine.type.machine_type)
>> "IPMSM"
# Modify the machine type
project.machine.type.set_machine_type("SPMSM")
# Access the machine name
print(project.machine.type.machine_name)
>> "My Machine"
# Modify the machine name
project.machine.type.machine_name = "New Machine Name"
# Access the modified machine name
print(project.machine.type.machine_name)
>> "New Machine Name"