Example #1
0
    def __init__(self,
                 template=None,
                 x_denorm=None,
                 counter=None,
                 counter_loop=None):
        if x_denorm is None:
            raise

        # 初始化父类
        super(bearingless_spmsm_design_variant,
              self).__init__(template, x_denorm, counter, counter_loop)

        # Give it a name
        self.name = f'ind{counter}'
        self.name += f'-redo{counter_loop}' if counter_loop > 1 else ''

        # Get geometric parameters and spec input
        GP = self.template.d['GP']
        SI = self.template.SI

        # 检查几何变量之间是否有冲突
        self.check_invalid_design(GP, SI)

        # Parts
        self.rotorCore = CrossSectInnerNotchedRotor.CrossSectInnerNotchedRotor(
            name='NotchedRotor',
            mm_d_pm=GP['mm_d_pm'].value,
            deg_alpha_rm=GP['deg_alpha_rm'].
            value,  # angular span of the pole: class type DimAngular
            deg_alpha_rs=GP['deg_alpha_rs'].
            value,  # segment span: class type DimAngular
            mm_d_ri=GP['mm_d_ri'].
            value,  # rotor iron thickness: class type DimLinear
            mm_r_ri=GP['mm_r_ri'].
            value,  # inner radius of rotor: class type DimLinear
            mm_d_rp=GP['mm_d_rp'].
            value,  # interpolar iron thickness: class type DimLinear
            mm_d_rs=GP['mm_d_rs'].
            value,  # inter segment iron thickness: class type DimLinear
            p=template.SI['p'],  # Set pole-pairs to 2
            s=template.
            SI['no_segmented_magnets'],  # Set magnet segments/pole to 4
            location=Location2D.Location2D(anchor_xy=[0, 0], deg_theta=0))

        self.shaft = CrossSectInnerNotchedRotor.CrossSectShaft(
            name='Shaft', notched_rotor=self.rotorCore)

        self.rotorMagnet = CrossSectInnerNotchedRotor.CrossSectInnerNotchedMagnet(
            name='RotorMagnet', notched_rotor=self.rotorCore)

        self.stator_core = CrossSectStator.CrossSectInnerRotorStator(
            name='StatorCore',
            deg_alpha_st=GP['deg_alpha_st'].value,  #40,
            deg_alpha_so=GP['deg_alpha_so'].value,  #20,
            mm_r_si=GP['mm_r_si'].value,
            mm_d_so=GP['mm_d_so'].value,
            mm_d_sp=GP['mm_d_sp'].value,
            mm_d_st=GP['mm_d_st'].value,
            mm_d_sy=GP['mm_d_sy'].value,
            mm_w_st=GP['mm_w_st'].value,
            mm_r_st=0.0,  # =0
            mm_r_sf=0.0,  # =0
            mm_r_sb=0.0,  # =0
            Q=template.SI['Qs'],
            location=Location2D.Location2D(anchor_xy=[0, 0], deg_theta=0))

        self.coils = CrossSectStator.CrossSectInnerRotorStatorWinding(
            name='Coils', stator_core=self.stator_core)

        self.sleeve = CrossSectInnerNotchedRotor.CrossSectSleeve(
            name='Sleeve',
            notched_magnet=self.rotorMagnet,
            d_sleeve=GP['mm_d_sleeve'].value)

        #03 Mechanical Parameters
        self.update_mechanical_parameters()
Example #2
0
        toolJd.open(expected_project_file_path)

    if True:
        # %% Define cross sections
        notched_rotor = CrossSectInnerNotchedRotor(
            name='NotchedRotor',
            color='#FE840E',
            deg_alpha_rm=60,
            deg_alpha_rs=10,
            mm_d_ri=8,
            mm_r_ri=40,
            mm_d_rp=5,
            mm_d_rs=3,
            p=2,  # Set pole-pairs to 2
            s=4,  # Set magnet segments/pole to 4
            location=Location2D.Location2D(anchor_xy=[0, 0], deg_theta=0))

    list_regions = notched_rotor.draw(toolJd)
    toolJd.bMirror = False
    toolJd.iRotateCopy = notched_rotor.p * 2
    region1 = toolJd.prepareSection(list_regions)

    if True:
        notched_magnet = CrossSectInnerNotchedMagnet(
            name='RotorMagnet', color='#0E001E', notched_rotor=notched_rotor)

    list_regions = notched_magnet.draw(toolJd)
    toolJd.bMirror = False
    toolJd.iRotateCopy = notched_rotor.p * 2
    region2 = toolJd.prepareSection(list_regions)
Example #3
0
    def __init__(self,
                 template=None,
                 x_denorm=None,
                 counter=None,
                 counter_loop=None):
        # 初始化父类
        super(vernier_motor_VShapePM_design_variant,
              self).__init__(template, x_denorm, counter, counter_loop)

        # 检查几何变量之间是否有冲突
        GP = self.template.d['GP']
        SD = self.template.SD
        self.check_invalid_design(GP, SD)

        # Parts
        self.rotorCore = CrossSectVShapeConsequentPoleRotor.CrossSectVShapeConsequentPoleRotor(
            name='NotchedRotor',
            mm_d_pm=GP['mm_d_pm'].value,
            deg_alpha_rm=GP['deg_alpha_rm'].
            value,  # angular span of the pole: class type DimAngular
            deg_alpha_rs=GP['deg_alpha_rs'].
            value,  # segment span: class type DimAngular
            mm_d_ri=GP['mm_d_ri'].
            value,  # rotor iron thickness: class type DimLinear
            mm_r_ri=GP['mm_r_ri'].
            value,  # inner radius of rotor: class type DimLinear
            mm_d_rp=GP['mm_d_rp'].
            value,  # interpolar iron thickness: class type DimLinear
            mm_d_rs=GP['mm_d_rs'].
            value,  # inter segment iron thickness: class type DimLinear
            p=template.SD['p'],  # Set pole-pairs to 2
            s=template.
            SD['no_segmented_magnets'],  # Set magnet segments/pole to 4
            location=Location2D.Location2D(anchor_xy=[0, 0], deg_theta=0))
        quit()
        self.shaft = CrossSectVShapeConsequentPoleRotor.CrossSectShaft(
            name='Shaft', notched_rotor=self.rotorCore)

        self.rotorMagnet = CrossSectVShapeConsequentPoleRotor.CrossSectInnerNotchedMagnet(
            name='RotorMagnet', notched_rotor=self.rotorCore)

        self.stator_core = CrossSectStator.CrossSectInnerRotorStator(
            name='StatorCore',
            deg_alpha_st=GP['deg_alpha_st'].value,  #40,
            deg_alpha_so=GP['deg_alpha_so'].value,  #20,
            mm_r_si=GP['mm_r_si'].value,
            mm_d_so=GP['mm_d_so'].value,
            mm_d_sp=GP['mm_d_sp'].value,
            mm_d_st=GP['mm_d_st'].value,
            mm_d_sy=GP['mm_d_sy'].value,
            mm_w_st=GP['mm_w_st'].value,
            mm_r_st=0.0,  # =0
            mm_r_sf=0.0,  # =0
            mm_r_sb=0.0,  # =0
            Q=template.SD['Qs'],
            location=Location2D.Location2D(anchor_xy=[0, 0], deg_theta=0))

        self.coils = CrossSectStator.CrossSectInnerRotorStatorWinding(
            name='Coils', stator_core=self.stator_core)

        #03 Mechanical Parameters
        self.update_mechanical_parameters()