Esempio n. 1
0
        protected override void measureInOpenedFem(FEMM femm)
        {
            // Begin to measure
            FEMM.LineIntegralResult lir = new FEMM.LineIntegralResult();

            VPMMotor          Motor         = this.Motor as VPMMotor;
            VPMRotor          Rotor         = Motor.Rotor;
            Stator3Phase      Stator        = Motor.Stator;
            GeneralParameters GeneralParams = Motor.GeneralParams;
            AirgapNormal      Airgap        = Motor.Airgap;
            PMStaticResults   Results       = this.Results as PMStaticResults;

            double xS = Rotor.Rrotor * Math.Cos(Rotor.alpha * 0.9999);
            double yS = Rotor.Rrotor * Math.Sin(Rotor.alpha * 0.9999);

            // get phiD
            femm.mo_addcontour(xS, yS);
            //femm.mo_selectpoint(Rotor.xR, Rotor.yR);
            femm.mo_addcontour(xS, -yS);
            femm.mo_bendcontour(-360 / (2 * Rotor.p), 1);
            lir          = femm.mo_lineintegral_full();
            Results.phiD = Math.Abs(lir.totalBn);

            // get phiM
            femm.mo_clearcontour();
            femm.mo_selectpoint(Rotor.xD, Rotor.yD);
            femm.mo_selectpoint(Rotor.xG, Rotor.yG);
            FEMM.LineIntegralResult rr = femm.mo_lineintegral(FEMM.LineIntegralType.Bn);
            Results.phiM = Math.Abs(rr.totalBn * 2);

            // get phib
            femm.mo_clearcontour();
            femm.mo_selectpoint(Rotor.xH, Rotor.yH);
            femm.mo_selectpoint(Rotor.xH, -Rotor.yH);
            rr           = femm.mo_lineintegral(FEMM.LineIntegralType.Bn);
            Results.phib = Math.Abs(rr.totalBn);

            femm.mo_clearcontour();
            femm.mo_selectpoint(Rotor.xE, Rotor.yE);
            femm.mo_selectpoint(Rotor.xA, Rotor.yA);
            rr            = femm.mo_lineintegral(FEMM.LineIntegralType.Bn);
            Results.phib += Math.Abs(rr.totalBn * 2);

            // get phisigmaFe
            femm.mo_clearcontour();
            femm.mo_addcontour(Rotor.xA, Rotor.yA);
            femm.mo_addcontour(xS, yS);
            rr            = femm.mo_lineintegral(FEMM.LineIntegralType.Bn);
            Results.phiFe = Math.Abs(rr.totalBn * 2);

            // get phisigmaS
            double xZ = (Stator.Rinstator + 5) * Math.Cos(2 * Math.PI / (4 * Rotor.p) - 2 * Math.PI / 180);
            double yZ = (Stator.Rinstator + 5) * Math.Sin(2 * Math.PI / (4 * Rotor.p) - 2 * Math.PI / 180);

            femm.mo_clearcontour();
            femm.mo_selectpoint(Rotor.xS, Rotor.yS);
            femm.mo_selectpoint(xZ, yZ);
            rr = femm.mo_lineintegral(FEMM.LineIntegralType.Bn);
            Results.phisigmaS = Math.Abs(rr.totalBn * 2);

            // get FM
            femm.mo_clearcontour();
            femm.mo_addcontour((Rotor.xI + Rotor.xF) / 2, (Rotor.yI + Rotor.yF) / 2);
            femm.mo_addcontour((Rotor.xD + Rotor.xG) / 2, (Rotor.yD + Rotor.yG) / 2);
            rr         = femm.mo_lineintegral(FEMM.LineIntegralType.Ht);
            Results.FM = Math.Abs(rr.totalHt);

            // get B_airgap
            int n = 128;

            Results.Bairgap = new PointD[n * 2];
            double RR = (Rotor.Rrotor + Stator.Rinstator) / 2;

            for (int i = 0; i < n; i++)
            {
                double a  = -(i - n / 2.0) / n * 2 * Rotor.alpha;
                double px = RR * Math.Cos(a);
                double py = RR * Math.Sin(a);

                FEMM.PointValues pv = femm.mo_getpointvalues(px, py);
                Results.Bairgap[i].X = 2 * Rotor.alpha * RR * i / n;
                Results.Bairgap[i].Y = pv.B1 * Math.Cos(a) + pv.B2 * Math.Sin(a);
                if (double.IsNaN(Results.Bairgap[i].Y))
                {
                    Results.Bairgap[i].Y = 0;
                }

                if (Results.Bdelta_max < Math.Abs(Results.Bairgap[i].Y))
                {
                    Results.Bdelta_max = Math.Abs(Results.Bairgap[i].Y);
                }
            }

            // make a mirror (odd function)
            double dd = 2 * Rotor.alpha * RR;

            for (int i = 0; i < n; i++)
            {
                Results.Bairgap[i + n].X = Results.Bairgap[i].X + dd;
                Results.Bairgap[i + n].Y = -Results.Bairgap[i].Y;
            }
            double wd = Rotor.gammaMedeg / 180 * (Rotor.Rrotor + Airgap.delta / 2) * 2 * Math.PI / (2 * Rotor.p);

            Results.Bdelta = Results.phiD / (GeneralParams.MotorLength * wd * 1e-6);

            // psiM
            Dictionary <String, FEMM.CircuitProperties> cps = Stator.getCircuitsPropertiesInAns(femm);

            if (cps.ContainsKey("A") && cps.ContainsKey("B") && cps.ContainsKey("C"))
            {
                Fdq fdq = ParkTransform.abc_dq(cps["A"].fluxlinkage, cps["B"].fluxlinkage, cps["C"].fluxlinkage, 0);
                Results.psiM = fdq.Magnitude;
            }
            else
            {
                Results.psiM = double.NaN;
            }

            femm.mo_close();
        }
Esempio n. 2
0
        public static VPMMotor GetSampleMotor()
        {
            ////// all length is in mm
            //////
            VPMMotor m = new VPMMotor();

            // general information
            GeneralParameters gp = new GeneralParameters();

            gp.MotorLength       = 125;
            gp.FullBuildFEMModel = false;

            m.GeneralParams = gp;

            // materials
            //steel
            PointBH[] BH = JSON.ToObject <List <PointBH> >(Properties.Resources.bhsample).ToArray();

            //stator
            Stator3Phase sp = new Stator3Phase();

            sp.Q       = 36;
            sp.DiaYoke = 191;
            sp.DiaGap  = 126;

            sp.HS0 = 0.5;
            sp.HS1 = 1;
            sp.HS2 = 13.3;
            sp.BS0 = 3;
            sp.BS1 = 5;
            sp.BS2 = 8.2;
            sp.RS  = 0.5;

            sp.Kfill          = 0.8;
            sp.WindingsConfig = "A:1-7,12-18,13-19,24-30,25-31,36-6;B:8-14,9-15,20-26,21-27,32-2,33-3;C:4-10,5-11,16-22,17-23,28-34,29-35";
            sp.NStrands       = 10;
            //wire
            sp.WireConduct  = 58;
            sp.WireType     = FEMM.WireType.MagnetWire;
            sp.WireDiameter = 1.2;
            sp.Copper_ro    = 8930;
            //steel
            sp.Lam_fill           = 0.98;
            sp.Lam_d              = 0.635;
            sp.BH                 = BH;
            sp.Steel_ro           = 7650;
            sp.P_eddy_10_50       = 2.5;
            sp.P_hysteresis_10_50 = 0;

            m.Stator = sp;

            //airgap
            AirgapNormal airgap = new AirgapNormal();

            airgap.Kc = 1.1;
            m.Airgap  = airgap;

            //rotor
            VPMRotor rotor = new VPMRotor();

            // steel
            rotor.BH       = BH;
            rotor.Lam_fill = 0.98;
            rotor.Lam_d    = 0.635;
            rotor.Bsat     = 1.9;
            rotor.Steel_ro = 7650;

            //magnet
            rotor.Hc        = 883310;
            rotor.mu_M      = 1.045;
            rotor.Magnet_ro = 7500;

            rotor.ThickMag = 6;             // magnet length
            rotor.B1       = 5;
            rotor.p        = 3;             // pair poles
            rotor.DiaGap   = 126 - 2 * 0.6; // airgap
            rotor.D1       = 124;
            rotor.O1       = 2;
            rotor.O2       = 30;
            rotor.Dminmag  = 5;
            rotor.WidthMag = 42;
            rotor.DiaYoke  = 32;
            rotor.Rib      = 10;
            rotor.HRib     = 2;
            rotor.Poletype = VPMRotor.PoleType.MiddleSteelBridgeRectangle;

            m.Rotor = rotor;

            return(m);
        }