Esempio n. 1
0
        private void tabPage5_Paint(object sender, PaintEventArgs e)
        {
            if (status5 == 1)
            {
                Graphics g = e.Graphics;
                //z轴挠度
                for (int i = 0; i <= 100; i++)
                {
                    double x = a * i / 100.0;
                    myAverage[i] = -x;
                }
                for (int i = 101; i <= 400; i++)
                {
                    double x = a * i / 100.0;
                    myAverage[i] = 1 / 3.0 * (x - 4 * a);
                }
                for (int i = 401; i <= 500; i++)
                {
                    myAverage[i] = 0;
                }
                for (int i = 0; i <= 500; i++)
                {
                    myMyAverage[i] = my[i] * myAverage[i];
                }
                double I        = (pi * diameter1 * diameter1 * diameter1 * diameter1) / 64;
                double bendingZ = (MyCalculate.DefiniteIntegral(myMyAverage, 0, 500) * a / 100) / (E * I);
                g.DrawString("Δz= " + Math.Round(bendingZ * 1000, 3) + " mm", font1, brush1, 100, 100);

                //y轴挠度
                for (int i = 0; i <= 500; i++)
                {
                    mzAverage[i]   = myAverage[i];
                    mzMzAverage[i] = mz[i] * mzAverage[i];
                }
                double bendingY = (MyCalculate.DefiniteIntegral(mzMzAverage, 0, 500) * a / 100) / (E * I);
                g.DrawString("Δy= " + Math.Round(bendingY * 1000, 3) + " mm", font1, brush1, 100, 140);

                //总挠度
                double bendingXY = Math.Sqrt(bendingZ * 1000 * bendingZ * 1000 + bendingY * 1000 * bendingY * 1000);
                g.DrawString("Δ= " + Math.Round(bendingXY, 3) + " mm", font1, brush1, 100, 180);
            }
        }