Exemplo n.º 1
0
        private static void EC_T_Presek_PomocuFormule()
        {
            double Msd   = 6100;
            double b_eff = 175;
            double b_w   = 35;
            double h_f   = 15;
            double d     = 143;
            double s;
            double δ   = h_f / d;
            var    μSd = 0.0;
            var    bi  = b_eff;

            BetonModelEC             beton = BetonClasses.GetBetonClassListEC().Single(b => b.name == "C25/30");
            ReinforcementTypeModelEC arm   = ReinforcementType.GetArmatura().Single(a => a.name == "B500B");
            var fcd = beton.fcd / 10;

            KofZaProracunPravougaonogPresekaModelEC kof1         = new KofZaProracunPravougaonogPresekaModelEC();
            KofZaProracunPravougaonogPresekaModelEC kof2         = new KofZaProracunPravougaonogPresekaModelEC();
            KofZaProracunPravougaonogPresekaModelEC kof_zvezdica = new KofZaProracunPravougaonogPresekaModelEC();

            //kof1.
            bool done = false;

            s = δ;
            kof1.SetByξ(s);
            kof2 = kof1;
            int i = 0;

            //var s_add = 0.1;
            do
            {
                var x  = kof2.ξ * d;
                var Eb = ((x - h_f) / x) * kof2.εc;
                kof_zvezdica.SetByEcEs1(Eb, 20);
                if (kof2.εc == 0)///na pocetku ce uvek biti kof2 0;
                {
                    bi = 1 * b_eff;
                }
                else
                {
                    bi = (1 - (kof_zvezdica.αv / kof1.αv) * (1 - (h_f / (kof2.ξ * d))) * (1 - (b_w / b_eff))) * b_eff;
                }


                μSd = Msd * 100 / (bi * Math.Pow(d, 2) * fcd);
                var kof3 = KofZaProracunPravougaonogPresekaEC.Get_Kof_From_μ(μSd);
                if (Math.Round(kof2.ξ, 3) == Math.Round(kof3.ξ, 3))
                {
                    done = true;
                    continue;
                }
                kof2 = kof3;
            } while (!done);
        }
Exemplo n.º 2
0
        private static void ec2_TacnPostupak()
        {
            double Msd = 180;
            double Mu;
            double Du    = 0;
            double b_eff = 20;
            double b_w   = 20;
            double h_f   = 15;
            double d     = 44;
            double s;
            double δ  = h_f / d;
            double Nu = 0;
            double bi = 0;

            BetonModelEC             beton = BetonClasses.GetBetonClassListEC().Single(b => b.name == "C25/30");
            ReinforcementTypeModelEC arm   = ReinforcementType.GetArmatura().Single(a => a.name == "B500B");
            //var fcd = 2.05;
            double As = (Du - Nu) / arm.fyd;

            KofZaProracunPravougaonogPresekaModelEC kof1 = new KofZaProracunPravougaonogPresekaModelEC();
            KofZaProracunPravougaonogPresekaModelEC kof2 = new KofZaProracunPravougaonogPresekaModelEC();

            bool done = false;

            s = δ;
            int i        = 0;
            var x        = 0.0;
            var s_add    = 0.1;
            var μSd      = (Msd * 100) / (b_eff * Math.Pow(d, 2) * beton.fcd / 10);
            var kof_test = KofZaProracunPravougaonogPresekaEC.Get_Kof_From_μ(μSd);

            if (kof_test.ξ <= s)
            {
                var kof = kof_test;
                x  = kof.ξ * d;
                As = (Msd * 100) / (kof.ζ * d * arm.fyd);
            }
            do
            {
                i++;
                kof1.SetByξ(s);
                x = s * d;
                var Du1 = kof1.αv * b_eff * s * d * beton.fcd / 10;
                var zb1 = d * (1 - kof1.ka * s);
                var Ebd = ((s - δ) / s) * kof1.εc;
                kof2.SetByEcEs1(Ebd, 20);

                var Du2 = kof2.αv * (b_eff - b_w) * (x - h_f) * beton.fcd / 10;
                var zb2 = d - h_f - kof2.ka * (x - h_f);

                Mu = Du1 * zb1 / 100 - Du2 * zb2 / 100;

                if (i > 30)
                {
                    break;
                }


                if (Mu * 1.0005 < Msd)
                {
                    s += s_add; continue;
                }
                if (Mu > Msd * 1.001)
                {
                    s_add = s_add / 2; s -= s_add; continue;
                }

                if (Mu * 1.0005 >= Msd && Mu <= Msd * 1.001)
                {
                    Du = Du1 - Du2; As = (Du - Nu) / arm.fyd; done = true;
                }
            } while (!done);
            if (i > 30 && done == false)
            {
                Console.WriteLine("Can't calculate!");
                Console.ReadKey();
                return;
            }
            bi = Mu / (kof1.μRd * Math.Pow(d, 2) * beton.fcd / 10);
            As = (Du - Nu) / arm.fyd;
            x  = kof1.ξ * d;
            Console.WriteLine("n= " + i);
            Console.WriteLine("As= " + As);
            Console.WriteLine("x= " + x);
            Console.WriteLine("Mu= " + Mu);
            Console.ReadKey();

            GC.Collect();
        }
 public MainPage()
 {
     ViewModel = new TransversalReinf_EC2ViewModel(65, 40, 25, 40, 6, ReinforcementType.GetArmatura().Where(n => n.name == "B500B").First(), BetonClasses.GetBetonClassListEC().Find(n => n.name == "C30/37"), new ReinforcementModelEC(ReinforcementType.GetAramturaList().Single(n => n.diameter == 16), 6));
     this.InitializeComponent();
 }