Exemple #1
0
 public void CalculateArmature(int m, double s, ReinforcementModelEC Asw_Model)
 {
     if (s == 0)
     {
         this.s = s_max;
     }
     else
     {
         this.s = s;
     }
     if (this.s > s_max || this.s < s_min)
     {
         throw new Exception("The distance between the stirring is too little or too large!");
     }
     this.m = m;
     if (!List_m.Any(n => n == m))
     {
         throw new Exception("Type of stirrup m=" + m + " is not allowed");
     }
     if (Ved <= Vrd_c)
     {
         minArmatura();
         CalAdditionalTransverseReinforcement();
         return;
     }
     if (Ved > Vrd_c)
     {
         Armatura(m, s, Asw_Model);
         CalAdditionalTransverseReinforcement();
         return;
     }
 }
Exemple #2
0
        public TransverzalneSileEC2(
            double b,
            double h,
            BetonModelEC beton,
            ReinforcementTypeModelEC armatura,
            ReinforcementModelEC As1_model,
            double Vg,
            double Vq,
            double d1,
            double Ng = 0,
            double Nq = 0
            )
        {
            InitValidations(b, h, beton, armatura, As1_model, d1);
            this.b        = b;
            this.h        = h;
            this.beton    = beton;
            this.armatura = armatura;
            as1_Model     = As1_model;
            As1           = as1_Model.cm2_total;
            this.Vg       = Vg;
            this.Vq       = Vq;
            this.d1       = d1;
            this.Ng       = Ng;
            this.Nq       = Nq;

            Validations();
            Calc_Vrd_c();

            //if (Errors.Count() != 0)
            //return;
            GetS();
            GetSp();
            GetListOfM();

            if (Ved <= Vrd_c && Errors.Count() == 0)
            {
                minArmatura();
                CalAdditionalTransverseReinforcement();
            }
        }
Exemple #3
0
        public void Armatura(int m, double s, ReinforcementModelEC Asw_Model)
        {
            this.Asw_Model = Asw_Model;
            this.m         = m;
            this.s         = s;
            var cot   = (1 / Math.Tan(Θ));
            var z     = 0.9 * d;
            var Vrd_s = (Asw / s) * z * armatura.fyd * m * (1 / Math.Tan(Θ));

            var ν        = 0.6 * (1.0 - (beton.fck / 250.0));///fck u MPa
            var v1       = ν;
            var αcw      = 1;
            var Vrd_max2 = (αcw * b * 10 * z * 10 * v1 * beton.fcd) / (Math.Tan(Θ) + (1 / Math.Tan(Θ))) / 1000;

            Vrd = (new List <double>()
            {
                Vrd_s, Vrd_max2
            }).Min();
            IskoriscenostArmature = Round(Ved / Vrd_s);
            IskoriscenostBetona   = Round(Ved / Vrd_max2);
        }
Exemple #4
0
 private void InitValidations(double b, double h, BetonModelEC beton, ReinforcementTypeModelEC armatura, ReinforcementModelEC as1_model, double d1)
 {
     if (b <= 0)
     {
         throw new Exception("b must be greater 0");
     }
     if (h <= 0)
     {
         throw new Exception("h must be greater 0");
     }
     if (d1 <= 0)
     {
         throw new Exception("d1 must be greater 0");
     }
     if (2 * d1 >= h)
     {
         throw new Exception("2 x d1 must be smoller then h");
     }
     if (beton == null)
     {
         throw new Exception("Beton not defined!");
     }
     if (armatura == null)
     {
         throw new Exception("Armatura not defined!");
     }
     if (as1_model == null)
     {
         throw new Exception("Longitudinal reinforcement not defined!");
     }
 }
Exemple #5
0
        public TransverzalneSileEc2ResultModel CalculateInit(TransverzalneSileEc2Model trans)
        {
            TransverzalneSileEc2ResultModel Result;
            var beton = new BetonModelEC(trans.betonClass, 1);
            var arm   = ReinforcementType.GetArmatura().Where(n => n.name == trans.armtype).SingleOrDefault();

            if (trans.settings != null)
            {
                beton = new BetonModelEC(trans.betonClass, trans.settings.alfa_cc, trans.settings.alfa_ct, trans.settings.y_c);
                arm   = ReinforcementType.GetArmatura(trans.settings.y_s).Where(n => n.name == trans.armtype).SingleOrDefault();
            }


            beton.ni = 0.85;

            var  armLong = new ReinforcementModelEC(trans.armLongitudinal.diametar, trans.armLongitudinal.kom);
            bool armCalc = false;

            if (trans.u_diametar != 0 && trans.m != 0 && trans.s != 0)
            {
                armCalc = true;
            }


            var g = new ElementGeometryTransversal()
            {
                b    = trans.b,
                h    = trans.h,
                d1   = trans.d1,
                d2   = trans.d1,
                As1  = new ReinforcementModelEC(trans.armLongitudinal.diametar, trans.armLongitudinal.kom),
                unit = UnitDimesionType.cm
            };
            var f = new ForcesTransversal()
            {
                Ved = trans.Ved,
                Vg  = trans.Vg,
                Vq  = trans.Vq
            };
            var m = new Material()
            {
                beton    = beton,
                armatura = arm,
            };

            using (var t = new TransversalCalcEC2(g, f, m))
            {
                if (armCalc)
                {
                    if (trans.alfa == null)
                    {
                        t.CalculateArmature(trans.m, trans.s, new ReinforcementModelEC(trans.u_diametar, 1));
                    }
                    else
                    {
                        t.CalculateArmature(trans.m, trans.s, new ReinforcementModelEC(trans.u_diametar, 1), trans.teta, (double)trans.alfa);
                    }
                }
                Result = new TransverzalneSileEc2ResultModel()
                {
                    Result       = t.ToString(),
                    s            = t.Asw_min == 0 ? trans.s : t.s,
                    ListS        = t.List_s,
                    ListM        = t.List_m,
                    m            = t.Asw_min == 0 ? trans.m : t.m,
                    teta         = t.Θ,
                    alfa         = t.alfa,
                    u_diametar   = trans.u_diametar,
                    addArm_pot   = t.As_add,
                    TransArm_pot = t.Asw,
                    minArm_pot   = t.Asw_min,
                    IskorArm     = t.IskoriscenostArmature / 100,
                    IskorBeton   = t.IskoriscenostBetona / 100,
                    Errors       = t.Errors
                };
            }
            return(Result);
        }
Exemple #6
0
        public async Task Calculate()
        {
            try
            {
                if (Transverzal != null)
                {
                    Transverzal.Dispose();
                }

                if (!IsVedToggled)
                {
                    Transverzal = new TransverzalneSileEC2(b, h, beton, armatura, Longitud_As1, Vg, Vq, d1, 0, 0);
                }
                else
                {
                    Transverzal = new TransverzalneSileEC2(b, h, beton, armatura, Longitud_As1, Ved, d1, 0, 0);
                }

                Errors             = new ObservableCollection <string>(Transverzal.Errors);
                IsCalculationValid = Transverzal.Errors.Count() == 0 ? true : false;

                if (IsCalculationValid)
                {
                    Transversal_Asw = new ReinforcementModelEC(ReinforcementType.GetAramturaList().Single(n => n.diameter == 10), 1);

                    ListOfS = new ObservableCollection <double>(Transverzal.List_s);
                    ListOfM = new ObservableCollection <int>(Transverzal.List_m);

                    if (Transverzal.List_m.Min() == m)
                    {
                        ++m;
                    }
                    m = 2;
                    if (12.5 == s)
                    {
                        ++s;
                    }
                    s          = 12.5;
                    NotUpdated = false;
                    A_add_pot  = Transverzal.As_add;
                    A_add_usv  = new ReinforcementModelEC(ReinforcementType.GetAramturaList().Single(n => n.diameter == 16), 1);
                    //Transversal_Asw_min = new ReinforcementModel(ReinforcementType.GetAramturaList().Single(n => n.diameter == 6), 1);
                    Asw_min = Transverzal.Asw_min;
                    if (Asw_min > 0)
                    {
                        Transversal_Asw = new ReinforcementModelEC(ReinforcementType.GetAramturaList().Single(n => n.diameter == 6), 1);
                        if (Transverzal.List_m.Min() == m)
                        {
                            ++m;
                        }
                        m = Transverzal.List_m.Min();
                        if (Transverzal.List_s.Min() == s)
                        {
                            ++s;
                        }
                        s = Transverzal.s_max;
                    }
                    Result = Transverzal.ToString();
                }
            }
            catch (System.Exception ex)
            {
                var dialoga = new MessageDialog("Greška: " + ex.Message);
                await dialoga.ShowAsync();

                return;
            }
        }
Exemple #7
0
        public TransversalReinf_EC2ViewModel(double Vg, double Vq, double b, double h, double d1, ReinforcementTypeModelEC armatura, BetonModelEC beton, ReinforcementModelEC Longitud_As1)
        {
            this.Vg           = Vg;
            this.Vq           = Vq;
            this.b            = b;
            this.h            = h;
            this.d1           = d1;
            this.armatura     = armatura;
            this.beton        = beton;
            this.Longitud_As1 = Longitud_As1;

            CalculateCommand    = new CommandHandler(async() => await Calculate());
            CalculateArmCommand = new CommandHandler(async() => await CalculateArm());
        }