コード例 #1
0
        public void Calculate_Program()
        {
            string design_file = Path.Combine(system_path, "DESIGN.FIL");
            string boq_file    = Path.Combine(system_path, "BoQ.FIL");

            StreamWriter sw        = new StreamWriter(new FileStream(rep_file_name, FileMode.Create));
            StreamWriter sw_design = new StreamWriter(new FileStream(design_file, FileMode.Create));
            StreamWriter sw_boq    = new StreamWriter(new FileStream(boq_file, FileMode.Create));

            try
            {
                #region Write Report
                sw.WriteLine("\t\t*******************************************************");
                sw.WriteLine("\t\t*                      ASTRA Pro                      *");
                sw.WriteLine("\t\t*       TechSOFT Engineering Services (I) Pvt. Ltd.   *");
                sw.WriteLine("\t\t*                                                     *");
                sw.WriteLine("\t\t*                  DESIGN OF SINGLE SPAN              *");
                sw.WriteLine("\t\t*  ONE WAY CONTINUOUS RCC SLAB BY LIMIT STATE METHOD  *");
                sw.WriteLine("\t\t*******************************************************");
                sw.WriteLine("\t\t-------------------------------------------------------");
                sw.WriteLine("\t\t    THIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
                sw.WriteLine("\t\t-------------------------------------------------------");
                //sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("USER'S DATA");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Span Length = {0} m", LengthString);
                sw.WriteLine("Assume Slab Thickness = {0} mm", AssumeSlabThickness);
                sw.WriteLine("Slab Load = {0} kN/sq.m", SlabLoad);
                sw.WriteLine("Finish Thickness = {0} mm", FinishThickness);
                sw.WriteLine("Finish Load = {0} kN/sq.m", FinishLoad);
                sw.WriteLine("Permanent Load Factor = {0}", FixedLoadfactor);
                sw.WriteLine("Imposed Load = {0} kN/sq.m", ImposedLoad);
                sw.WriteLine("Imposed Load Factor = {0}", ImposedLoadFactor);
                sw.WriteLine("Dia of Main Reinforcement = {0} mm", DiaMainReinforcement);
                sw.WriteLine("Dia of Distribution/Temperature Reinforcement = {0} mm", DiaDistributionReinforcement);
                sw.WriteLine("Percentage Distribution Reinforcement = {0} %", PercentageDistReinforcement.ToString("0.00"));
                sw.WriteLine("Grade of Concrete = M {0} N/sq.mm", ConcreteGrade);
                sw.WriteLine("Grade of Steel = Fe {0} N/sq.mm", SteelGrade);
                sw.WriteLine("α = {0}", Alpha);
                sw.WriteLine("β = {0}", Beta);
                sw.WriteLine("γ = {0}", Gamma);
                sw.WriteLine("δ = {0}", Delta);
                sw.WriteLine("λ = {0}", Lamda);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("DESIGN CALCULATIONS");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 1 ");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();

                double end_span = 0.0;
                double val      = 0.0;
                if (Lengths.Count > 1)
                {
                    if (Lengths[0] > Lengths[Lengths.Count - 1])
                    {
                        end_span = Lengths[0];
                    }
                    else
                    {
                        end_span = Lengths[Lengths.Count - 1];
                    }
                }

                double mid_span = 0.0d;
                for (int i = 1; i < Lengths.Count - 1; i++)
                {
                    if (Lengths[i] > mid_span)
                    {
                        mid_span = Lengths[i];
                    }
                }


                sw.WriteLine();
                sw.WriteLine("Consider a 1m wide strip and assume overall thickness ");
                sw.WriteLine("of Slab as {0} mm. Owing to symmetry only half the slab ", d_Do);
                sw.WriteLine("need be considered.");
                sw.WriteLine();

                double DL = (d_Do / 1000.0) * 1.0 * d_SL;
                sw.WriteLine("   Dead load of slab (DL) = {0:f3} * 1.0 * {1:f2}", (d_Do / 1000.0), d_SL);
                sw.WriteLine("                          = {0} kN/m", DL);

                double thick_dead_load = (d_Fo / 1000.0) * d_FL;
                sw.WriteLine();
                sw.WriteLine("   Dead load of {0:f2} cm thick finish = {1:f3} * 1.0 * {2}", (d_Fo / 10.0), (d_Fo / 1000.0), d_FL);
                sw.WriteLine("                                     = {0:f3} kN/m", thick_dead_load);
                sw.WriteLine();

                double total_dead_load = DL + thick_dead_load;
                sw.WriteLine("   Total dead load = {0:f2} + {1:f2}", DL, thick_dead_load);
                sw.WriteLine("                   = {0:f2} kN/m", total_dead_load);

                double IL = d_LL * 1.0;
                sw.WriteLine();
                sw.WriteLine("   Imposed Load (IL) = {0} * 1.0 ", d_LL);
                sw.WriteLine("                     = {0:f2} kN/m", IL);

                double factored_dead_load = d_DF * total_dead_load;
                sw.WriteLine();
                sw.WriteLine("   Factored dead load  = {0:f2} * {1:f2}", d_DF, total_dead_load);
                sw.WriteLine("                       = {0:f2} kN/m", factored_dead_load);

                double v1 = factored_dead_load * Lengths[0];
                sw.WriteLine("                       = {0:f2} * {1:f2}", factored_dead_load, Lengths[0]);
                sw.WriteLine("                       = {0:f2} kN/m", v1);

                double factored_imposed_load = ImposedLoadFactor * ImposedLoad;
                sw.WriteLine();
                sw.WriteLine("   Factored imposed load = {0:f2} * {1:f2} ", ImposedLoadFactor, ImposedLoad);
                sw.WriteLine("                         = {0:f2} kN/m", factored_imposed_load);

                double v2 = factored_imposed_load * Lengths[0];
                sw.WriteLine();
                sw.WriteLine("                         = {0:f2} * {1:f2}", factored_imposed_load, Lengths[0]);
                sw.WriteLine("                         = {0} kN", v2);

                sw.WriteLine();
                sw.WriteLine("    Moment at End Span = (DL * l)/12 + (LL * l)/10");
                sw.WriteLine("                       = ({0} * {1})/12 + ({2} * {1})/10", v1, end_span, v2);
                double E_end_moment = ((v1 * end_span) / 12) + ((v2 * end_span) / 10);
                sw.WriteLine("                       = {0} kN/m", E_end_moment.ToString("0.00"));


                sw.WriteLine();
                sw.WriteLine("    Moment at Interior Span = (DL * l)/24 + (LL * l)/12");
                sw.WriteLine("                            = ({0} * {1})/24 + ({2} * {1})/12", v1, mid_span, v2);

                double F_interior_moment = ((v1 * mid_span) / 16) + ((v2 * mid_span) / 12);
                sw.WriteLine("                            = {0} kN/m", F_interior_moment.ToString("0.00"));

                sw.WriteLine();
                sw.WriteLine("    Moment at support next to end support");
                sw.WriteLine("          = (DL * l)/10 + (LL * l)/9");
                sw.WriteLine("          = ({0} * {1})/10 + ({2} * {1})/9", v1, end_span, v2);

                double B_end_support_moment = ((v1 * end_span) / 10) + ((v2 * end_span) / 9);
                sw.WriteLine("          = {0} kN/m", B_end_support_moment.ToString("0.00"));


                sw.WriteLine();
                double max_moment = 0.0;

                if (E_end_moment > F_interior_moment && E_end_moment > B_end_support_moment)
                {
                    max_moment = E_end_moment;
                }
                else if (F_interior_moment > E_end_moment && F_interior_moment > B_end_support_moment)
                {
                    max_moment = F_interior_moment;
                }
                else if (B_end_support_moment > E_end_moment && B_end_support_moment > F_interior_moment)
                {
                    max_moment = B_end_support_moment;
                }

                //sw.WriteLine("Maximum bending moments at critical sections are computed using bending moment");
                ////Table ?
                //sw.WriteLine("coefficients given in Table 11.1 and are tabulated in Table 14.2");

                sw.WriteLine();
                sw.WriteLine("    For a balanced design, Mu = 0.138 * σ_ck * b * d * d");

                double d = Math.Sqrt((max_moment * 10E+5) / (0.138 * d_sigma_ck * 1000));

                sw.WriteLine();
                sw.WriteLine("    d =√(({0} * 10E+5)/(0.138 * {1} * 1000))", max_moment.ToString("0.00"), ConcreteGrade.ToString("0"));
                sw.WriteLine("      = {0:f2} mm", d);

                val  = (int)d / 10;
                val += 2;
                val  = val * 10;

                sw.WriteLine();
                if (val < 100)
                {
                    d = 100;
                    sw.WriteLine("This effective depth is too small, ");
                    sw.WriteLine();
                    sw.WriteLine("Let us adopt an over all depth D = 100 mm");
                    sw.WriteLine();
                    sw.WriteLine("Assume {0} mm bars with {1} mm clear cover.", DiaMainReinforcement, ClearCover);
                }
                else
                {
                    d = val;
                }

                double eff_depth = d - ClearCover - d_d1 / 2;
                sw.WriteLine();
                sw.WriteLine("   Effective depth = {0:f2} - {1:f2} - {2}/2 ", d, ClearCover, d_d1);
                sw.WriteLine("                   = {0:f2} mm", eff_depth);
                sw.WriteLine();


                // At, B


                double a, b, c, At1;

                a = (0.87 * d_sigma_y * d_sigma_y) / (d_sigma_ck * 1000);
                b = 0.87 * d_sigma_y * eff_depth;
                c = B_end_support_moment * 10E+5;
                double b_ac = (b * b) - 4 * a * c;
                At1 = (b) - Math.Sqrt(Math.Abs(b_ac));
                At1 = At1 / (2 * a);

                At1  = (int)At1;
                At1 += 1;
                sw.WriteLine("At B, the area of steel is given by ");
                sw.WriteLine();
                sw.WriteLine("          Mu = 0.87 * σ_y * At(d-((σ_y*At)/(σ_ck*b))");
                sw.WriteLine();
                sw.WriteLine("    {0:f3} * 10E+5 = 0.87 * {1:f2} * At({2:f2} - (({1:f2} * At )/({3:f2} * 1000))",
                             B_end_support_moment,
                             d_sigma_y,
                             eff_depth,
                             d_sigma_ck);
                sw.WriteLine();
                sw.WriteLine("          At = {0:f3} sq.mm/m", At1);
                sw.WriteLine();

                double area1        = Math.PI * d_d1 * d_d1 / 4;
                int    nos_main_rod = (int)(At1 / area1);
                nos_main_rod++;

                double main_spacing = (double)1000.0 / nos_main_rod;
                main_spacing = (int)main_spacing / 10;
                main_spacing = main_spacing * 10;

                double At1_ = area1 * 1000 / main_spacing;

                sw.WriteLine();
                sw.WriteLine("Use {0} mm bars @ {1} mm c/c.", d_d1, main_spacing);
                sw.WriteLine();

                if (At1_ > At1)
                {
                    sw.WriteLine(" Area of steel provided = {0:f0} sq.mm/m > {1:f0} sq.mm/m, OK", At1_, At1);
                }
                else
                {
                    sw.WriteLine(" Area of steel provided = {0:f0} sq.mm/m > {1:f0} sq.mm/m, NOT OK", At1_, At1);
                }


                double At2;

                a    = (0.87 * d_sigma_y * d_sigma_y) / (d_sigma_ck * 1000);
                b    = 0.87 * d_sigma_y * eff_depth;
                c    = E_end_moment * 10E+5;
                b_ac = (b * b) - 4 * a * c;
                At2  = (b) - Math.Sqrt(Math.Abs(b_ac));
                At2  = At2 / (2 * a);

                At2 = (int)At2;
                //At2 += 1;
                sw.WriteLine();
                sw.WriteLine(" At E, the area of steel is given by ");
                sw.WriteLine();
                sw.WriteLine("Or,  {0} * 10E+5 = 0.87 * {1} * At(({2} - ({3}*At)/({4} * 1000))",
                             E_end_moment.ToString("0.00"),
                             d_sigma_y,
                             eff_depth,
                             d_sigma_y,
                             d_sigma_ck);

                sw.WriteLine();
                sw.WriteLine("Or, As = {0:f2} sq.mm/m", At2);

                int nos_dist_rod = (int)(At2 / area1);
                nos_dist_rod++;

                double main_spacing_2 = (double)1000.0 / nos_dist_rod;
                main_spacing_2 = (int)main_spacing_2 / 10;
                main_spacing_2++;
                main_spacing_2 = main_spacing_2 * 10;
                double At2_ = area1 * 1000 / main_spacing_2;
                sw.WriteLine();
                sw.WriteLine("Use {0} mm bars @ {1} mm c/c, As = {2:f0} sq.mm/m",
                             d_d1,
                             main_spacing_2,
                             At2_);

                // At, F

                sw.WriteLine();
                sw.WriteLine("At F, The Area of steel is given by,");
                sw.WriteLine();
                sw.WriteLine("  {0} * 10E+5 = 0.87 * {1} * At({2} - (({3} * At)/({4} * 1000))",
                             F_interior_moment.ToString("0.000"),
                             d_sigma_y,
                             eff_depth,
                             d_sigma_y,
                             d_sigma_ck);


                double At3;

                a    = (0.87 * d_sigma_y * d_sigma_y) / (d_sigma_ck * 1000);
                b    = 0.87 * d_sigma_y * eff_depth;
                c    = F_interior_moment * 10E+5;
                b_ac = (b * b) - 4 * a * c;
                At3  = (b) - Math.Sqrt(Math.Abs(b_ac));
                At3  = At3 / (2 * a);

                At3 = (int)At3;

                int nos_main_rod_1 = (int)(At3 / area1);
                nos_main_rod_1++;

                double main_spacing_1 = (double)1000.0 / nos_main_rod_1;
                main_spacing_1 = (int)main_spacing_1 / 10;
                main_spacing_1 = (main_spacing_1 * 10);
                main_spacing_1--;

                double At3_ = (area1 * 1000) / main_spacing_1;

                sw.WriteLine();
                sw.WriteLine("Use {0:f0} mm bars @ {1:f0} mm c/c",
                             d_d1,
                             main_spacing_1);

                sw.WriteLine("As = {0:f2} sq.mm/m.", At3_);
                sw.WriteLine();
                sw.WriteLine("The Code requires that the maximum bar spacing should not exceed 3d");
                sw.WriteLine();
                sw.WriteLine("Minimum area of high strength main steel");
                sw.WriteLine("       = {0} % of the gross concrete", PercentageDistReinforcement);

                double strength_main_steel = (PercentageDistReinforcement / 100.0) * 1000 * d;

                sw.WriteLine("       = ({0:f2} /100) * 1000 * {1:f2}", PercentageDistReinforcement, d);
                sw.WriteLine("       = {0:f2} sq.mm.m", strength_main_steel);

                sw.WriteLine();
                if (At3_ > strength_main_steel)
                {
                    sw.WriteLine("Thus the actual area provided is OK");
                }
                else
                {
                    sw.WriteLine("Thus the actual area provided is NOT OK");
                }


                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Temperature reinforcement equal to 0.15% of the gross concrete");
                sw.WriteLine("area will be provided in the longitudinal direction");
                sw.WriteLine();
                //
                double dist_area = (0.15 / 100) * 1000 * 100;
                sw.WriteLine("  (0.15/100) * 1000 * 100 = {0:f3} sq.mm/m", dist_area);
                //area2
                double area2 = Math.PI * d_d2 * d_d2 / 4.0;

                int no_dist_rod = (int)(dist_area / area2);
                no_dist_rod++;

                double dist_spacing = 1000 / no_dist_rod;
                if (dist_spacing > 120)
                {
                    dist_spacing = 120;
                }
                //
                sw.WriteLine();
                sw.WriteLine("Use {0} mm MS bars @ {1} mm c/c", d_d2, dist_spacing);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 2 : Check for shear");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine(" The maximum shear force occurs at the first interior support B in the Span AB,");
                sw.WriteLine();

                double Vu = 0.6 * v1 + 0.6 * v2;
                sw.WriteLine(" SF = 0.6 * {0} + 0.6 * {1} = {2} kN",
                             v1, v2, Vu);

                sw.WriteLine();
                double tau_v = Vu / (1000 * eff_depth);
                sw.WriteLine("    Nominal shear stress τ_v = Vu/b*d");
                sw.WriteLine("                             = {0} * 1000 / 1000 * {1}", Vu, eff_depth);
                sw.WriteLine("                             = {0:f4}", tau_v);

                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("At B, percentage of tension steel,");

                double B_percent_tension_steel = (100 * At1_) / (1000 * eff_depth);

                sw.WriteLine("   100 As/b*d = (100 * {0})/(1000 * {1}) = {2}%",
                             At1_.ToString("0.00"), eff_depth, B_percent_tension_steel.ToString("0.0000"));


                ShearValue shV   = new ShearValue();
                double     tau_c = shV.Get_M15(B_percent_tension_steel);
                sw.WriteLine("So, τ_c = {0} N/sq.mm", tau_c);

                double k_value = kV.Get_KValue(d);

                sw.WriteLine("and    k = {0}", k_value);
                double tau_c_dash = k_value * tau_c;

                sw.WriteLine("τ_c` = {0} * {1} > τ_v    OK", k_value, tau_c);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 3 : Check for development length");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("The slab is checked for development length. Let us take the end support A.");

                //
                sw.WriteLine();
                sw.WriteLine("  φ < ((4 * τ_bd)/σ_s)*((1.3*(M1/V) + Lo))");
                //
                //

                double percent_curtain_bar = 50.0;

                sw.WriteLine(" Let us curtail {0}% bars at 0.1 l from the centre of support A.", percent_curtain_bar);
                sw.WriteLine();
                //sw.WriteLine("ταβγδλγσ");
                sw.WriteLine(" M1 = 0.87 * σ_y * At((d - (σ_y * At)/(σ_ck * b))");
                percent_curtain_bar = percent_curtain_bar / 100;

                double M1 = 0.87 * d_sigma_y * percent_curtain_bar * At2_ * ((eff_depth - (d_sigma_y * At2_ * percent_curtain_bar) / (d_sigma_ck * 1000)));

                sw.WriteLine("   = 0.87 * {0} * {1} * {2} * (({3} - ({4} * {5} * {6})/({7} * 1000))",
                             d_sigma_y,
                             percent_curtain_bar,
                             At2_.ToString("0.00"),
                             eff_depth,
                             d_sigma_y,
                             At2_.ToString("0.00"),
                             percent_curtain_bar,
                             d_sigma_ck);
                M1 = M1 / 10E+5;
                sw.WriteLine("    = {0:f2} * 10E+5 N-mm", M1);
                sw.WriteLine("    = {0:f2} kN-m", M1);

                sw.WriteLine();
                double V = 0.4 * v1 + 0.45 * v2;
                sw.WriteLine("   Shear force V = 0.4 * {0} + 0.45 * {1}", v1, v2);
                sw.WriteLine("                 = {0:f2} kN", V);
                sw.WriteLine();
                sw.WriteLine("Assuming Lo = 200 mm including anchor value of U-hook");

                double phi = ((4 * 1.6) / (0.87 * d_sigma_y)) * (((k_value * M1 * 1000) / V) + 200);

                //
                // CC
                sw.WriteLine();
                sw.WriteLine("  φ <= ((4 * 1.6)/(0.87*{0}))*(({1}*{2}*1000)/{3} + 200)",
                             d_sigma_y,
                             k_value,
                             M1.ToString("0.00"),
                             V.ToString("0.00"));

                sw.WriteLine("   = {0:f2} mm.", phi);

                //
                sw.WriteLine();
                sw.WriteLine(" Since the actual bar diameter is less than {0} mm, the slab is safe", phi.ToString("0.000"));
                sw.WriteLine("in development length. The bars must be embedded in the support by");
                sw.WriteLine("at least Ld/3 distance and a U-hook must be provided.");
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 4 : Check for Deflection.");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine(" The Slab is checked for deflection. Let us consider the end span.");
                sw.WriteLine();
                sw.WriteLine(" L/D <= α * β * γ * δ * λ");
                sw.WriteLine("   α  = {0} for continuous span", Alpha);
                sw.WriteLine("   β  = 1 since L < 10 m");
                sw.WriteLine();

                //double Pt = (100 * (50 * 1000 / 170)) / (1000 * 81);
                double Pt = (100 * (area1 * 1000 / main_spacing_1)) / (1000 * eff_depth);
                // CC
                sw.WriteLine("Pt = 100 * ({0:f0} * 1000/{1:f0})/(1000 * {2:f2})",
                             area1.ToString("0"),
                             main_spacing_1,
                             eff_depth);

                sw.WriteLine("   = {0:f2}%", Pt);
                sw.WriteLine();

                double gama = ModificationFactor.GetGamma(Pt);
                sw.WriteLine(" For a service stress of 240 Mpa in Fe 415 grade steel bar");
                sw.WriteLine(" the value of γ = {0}", gama.ToString("0.00"));
                sw.WriteLine("              δ = 1 since compressive reinforcement is zero.");
                sw.WriteLine("and           λ = 1");
                sw.WriteLine();

                double l_d = Alpha * gama;
                sw.WriteLine();
                sw.WriteLine(" Allowable L/d = {0} * {1:f3}", Alpha, gama.ToString("0.000"));
                sw.WriteLine("               = {0:f2}", l_d);
                sw.WriteLine();
                sw.WriteLine(" Actual    L/d = {0}/{1}", (end_span * 1000), eff_depth);

                val = (end_span * 1000.0 / eff_depth);
                if (val < l_d)
                {
                    sw.WriteLine("               = {0:f2} < {1:f2}, OK", val, l_d);
                }
                else
                {
                    sw.WriteLine("               = {0:f2} > {1:f2}, NOT OK", val, l_d);
                }
                sw.WriteLine();

                #endregion

                sw.WriteLine();
                sw.WriteLine("---------------------------------------------------------------------------");
                sw.WriteLine("---------------------       END OF REPORT        --------------------------");
                sw.WriteLine("---------------------------------------------------------------------------");


                #region Write DESIGN File
                sw_design.WriteLine("SLAB DESIGN 03");
                sw_design.WriteLine();
                sw_design.WriteLine("lengths = {0}", LengthString);
                //lengths = 3000, 3000, 3000, 3000, 3000
                sw_design.WriteLine("span_bredth = {0}", d_b);
                //span_bredth = 8000;
                sw_design.WriteLine("main_dia = {0}", d_d1);
                //main_dia = 8.0;
                sw_design.WriteLine("dist_dia = {0}", d_d2);
                //dist_dia = 6.0;
                sw_design.WriteLine("end_span_reinforcement = {0}", main_spacing_2 * 2);
                //end_span_reinforcement = 340;
                sw_design.WriteLine("support_reinforcement = {0}", main_spacing);
                //support_reinforcement = 140;
                sw_design.WriteLine("interior_reinforcement = {0}", main_spacing_1 * 2);
                //interior_reinforcement = 480;
                sw_design.WriteLine("start_centre_distance = {0}", 300);
                //start_centre_distance = 300;
                sw_design.WriteLine("start_wall_distance = {0}", 450);
                //start_wall_distance = 450;
                sw_design.WriteLine("clear_cover = {0}", ClearCover);
                //clear_cover = 15;
                sw_design.WriteLine("upper_distance = {0}", 900);
                //upper_distance = 900;
                sw_design.WriteLine("lower_distance = {0}", 600);
                //lower_distance = 600;
                sw_design.WriteLine("depth = {0}", d_Do);
                //depth = 120;
                sw_design.WriteLine("wall_thickness = {0}", WallThickness);
                //wall_thickness = 250;
                sw_design.WriteLine("bar_hill = {0}", 25.4);
                //bar_hill = 25.4;
                sw_design.WriteLine("pillar_length = {0}", 500);
                //pillar_length = 700;
                sw_design.WriteLine();
                sw_design.WriteLine("FINISH");
                #endregion

                string size1 = "9.1 x 1.0";
                string bgd   = "Fe 415";
                double d1    = 8;
                double d2    = 6;
                double dist1 = 2935;
                double dist2 = 2635;
                double dist3 = 1800;
                double dist4 = 1000;
                double bno1  = 9;
                double bno2  = 9;
                double bno3  = 16;
                double bno4  = 69;
                double bno5  = 38;


                double bwt1 = 0.00616 * d1 * d1 * dist1 * bno1;

                bwt1 = bwt1 / 10e5;


                double bwt2 = 0.00616 * d1 * d1 * dist2 * bno1;
                bwt2 = bwt2 / 10e5;
                double bwt3 = 0.00616 * d1 * d1 * dist3 * bno2;
                bwt3 = bwt3 / 10e5;
                double bwt4 = 0.00616 * d2 * d2 * dist4 * bno3;
                bwt4 = bwt4 / 10e5;
                double bwt5 = 0.00616 * d2 * d2 * dist4 * bno4;
                bwt5 = bwt5 / 10e5;

                double depth  = 90;
                double shape1 = 2935;
                double shape2 = 2635;
                double shape3 = 1800;
                double shape4 = 1000;


                #region BoQ File


                sw_boq.WriteLine("BoQ Text");
                sw_boq.WriteLine("size1={0}", size1);
                sw_boq.WriteLine("bgd={0}", bgd);
                sw_boq.WriteLine("d1={0}", d1);
                sw_boq.WriteLine("d2={0}", d2);
                sw_boq.WriteLine("dist1={0}", dist1);
                sw_boq.WriteLine("dist2={0}", dist2);
                sw_boq.WriteLine("dist3={0}", dist3);
                sw_boq.WriteLine("dist4={0}", dist4);
                sw_boq.WriteLine("bno1={0}", bno1);
                sw_boq.WriteLine("bno2={0}", bno2);
                sw_boq.WriteLine("bno3={0}", bno3);
                sw_boq.WriteLine("bno4={0}", bno4);
                sw_boq.WriteLine("bno5={0}", bno5);
                sw_boq.WriteLine("bwt1={0:f4}", bwt1);
                sw_boq.WriteLine("bwt2={0:f4}", bwt2);
                sw_boq.WriteLine("bwt3={0:f4}", bwt3);
                sw_boq.WriteLine("bwt4={0:f4}", bwt4);
                sw_boq.WriteLine("bwt5={0:f4}", bwt5);
                sw_boq.WriteLine("depth={0}", depth);
                sw_boq.WriteLine("shape1={0}", shape1);
                sw_boq.WriteLine("shape2={0}", shape2);
                sw_boq.WriteLine("shape3={0}", shape3);
                sw_boq.WriteLine("shape4={0}", shape4);
                sw_boq.WriteLine("FINISH");

                #endregion
            }
            catch (Exception ex)
            {
            }
            finally
            {
                sw.Flush();
                sw.Close();
                sw_design.Flush();
                sw_design.Close();
                sw_boq.Flush();
                sw_boq.Close();
            }
        }
コード例 #2
0
ファイル: frmOneWaySlab.cs プロジェクト: 15831944/mainApp
        public void Calculate_Program()
        {
            //rep_file_name = Path.Combine(user_path, "DESIGN_OF_ONE_RCC_SLAB.TXT");
            string view_file = Path.Combine(system_path, "DESIGN.FIL");
            string boq_file  = Path.Combine(system_path, "BoQ.FIL");

            StreamWriter sw_view = new StreamWriter(new FileStream(view_file, FileMode.Create));
            StreamWriter sw_boq  = new StreamWriter(new FileStream(boq_file, FileMode.Create));
            StreamWriter sw      = new StreamWriter(new FileStream(rep_file_name, FileMode.Create));

            try
            {
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("\t\t***********************************************");
                sw.WriteLine("\t\t*            ASTRA Pro Release 21             *");
                sw.WriteLine("\t\t*        TechSOFT Engineering Services        *");
                sw.WriteLine("\t\t*                                             *");
                sw.WriteLine("\t\t*           DESIGN OF SINGLE SPAN             *");
                sw.WriteLine("\t\t*  ONE WAY RCC SLAB BY LIMIT STATE METHOD     *");
                sw.WriteLine("\t\t***********************************************");
                sw.WriteLine("\t\t-----------------------------------------------");
                sw.WriteLine("\t\tTHIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
                sw.WriteLine("\t\t----------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");

                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("USER'S DATA");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine(" Length Perpendicular to Span [L] = {0:f2} m", L);
                sw.WriteLine(" Design Span for Slab [B]= {0:f2} m", B);
                sw.WriteLine(" Super imposed / Live Load [LL]= {0:f2} kN/sq.m", LL);
                sw.WriteLine(" Slab Load = {0:f2} kN/sq.m", Slab_load);
                sw.WriteLine(" Concrete Grade [f_ck] = M {0} N/sq.mm", sigma_ck);
                sw.WriteLine(" steel Grade [f_y] = Fe {0} N/sq.mm", sigma_y);
                sw.WriteLine(" Diameter of Main Reinforcement [d1] = {0} mm", d1);
                sw.WriteLine(" Diameter of Distribution Reinforcement [d2] = {0} mm", d2);
                sw.WriteLine(" Clear Cover [h1] = {0} mm", h1);
                sw.WriteLine(" End Cover [h2] = {0} mm", h2);
                sw.WriteLine(" Provide Distribution Reinforcement [ads] = {0} %", ads);
                sw.WriteLine(" Shear Strength of Concrete as % of Steel = {0} %", tc);
                sw.WriteLine(" α = {0}", alpha);
                sw.WriteLine(" β = {0}", beta);
                sw.WriteLine(" γ = {0}", gamma);
                sw.WriteLine(" δ = {0}", delta);
                sw.WriteLine(" λ = {0}", lamda);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("DESIGN CALCULATIONS");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("■ STEP 1: Calculations for Overall and effective depth");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("  Since length of the slab is more than twice the width, it is a");
                sw.WriteLine("ONE WAY RCC SLAB. Load will be transferred to the supports along");
                sw.WriteLine("the shorter span.");
                sw.WriteLine();
                sw.WriteLine("Consider a 100 cm wide strip of the slab parallel to its shorter span.");
                sw.WriteLine();

                double d, lowest_Span;

                double val1, val2;
                lowest_Span = (L > B) ? B * 1000 : L * 1000;
                d           = (lowest_Span / (alpha * beta * gamma * delta * lamda));

                sw.WriteLine("Minimum depth of slab");
                sw.WriteLine("    d = L /(α * β * γ * δ * λ)");
                sw.WriteLine();
                sw.WriteLine("Let α = {0}, β = {1}, γ = {2}, δ = {3} and λ = {4}", alpha, beta, gamma, delta, lamda);
                sw.WriteLine();
                sw.WriteLine("So, d = {0}/{1} = {2} mm", lowest_Span.ToString("0.0"), (alpha * beta * gamma * delta * lamda).ToString("0.00"), d.ToString("0.00"));

                double D = (d + h1);
                sw.WriteLine();
                sw.WriteLine("Let us adopt overall depth   D = {0} mm.", D.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("■ STEP 2: Calculations for Design Load, Moment and Shear");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                double deadLoad_slab = (D / 1000) * 1.0 * Slab_load;
                sw.WriteLine("Dead Load of slab = {0} * {1} * {2} = {3} kN/m.", (D / 1000).ToString("0.00"), 1.0, Slab_load, deadLoad_slab.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("Superimposed load = {0} * 1 = {1} kN/m.", ll.ToString("0.00"), ll.ToString("0.00"));
                double totalLoad = deadLoad_slab + ll;
                sw.WriteLine();
                sw.WriteLine("Total Load  = {0:f2} + {1:f2} = {2:f2} kN/m.", deadLoad_slab, LL, totalLoad);


                sw.WriteLine();
                double factoredLoad, loadFactor;
                loadFactor   = 1.5d;
                factoredLoad = totalLoad * loadFactor;
                sw.WriteLine("Factored load if the load factor is {0}", loadFactor.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("                               = {0} * {1} = {2} kN/m", loadFactor.ToString("0.00"), totalLoad.ToString("0.00"), factoredLoad.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("Maximum BM at centre of shorter span");
                sw.WriteLine("                       = (Wu * l * l) / 8");
                sw.WriteLine();
                sw.WriteLine("Assume steel consist of {0} mm bars with {1} mm clear cover.", d1, h1);

                double half_depth = d1 / 2;
                double eff_depth  = D - h1 - half_depth;
                sw.WriteLine();
                sw.WriteLine("Effective depth = {0} - {1} - {2} = {3} mm", D.ToString("0.0"), h1.ToString("0.0"), half_depth.ToString("0.00"), eff_depth.ToString("0.00"));

                lowest_Span = lowest_Span / 1000;

                double eff_span = (lowest_Span) + (eff_depth / 1000);
                sw.WriteLine();
                sw.WriteLine("Effective Span of Slab = {0} + d = {0} + {1} = {2} m", (lowest_Span).ToString("0.00"), (eff_depth / 1000).ToString("0.00"), eff_span.ToString("0.00"));
                double BM = factoredLoad * eff_span * eff_span / 8;
                //sw.WriteLine("So, BM = ({0} * {1} * {1}) / 8 = {2} kNm", factoredLoad.ToString("0.00"), eff_span.ToString("0.00"), BM.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("So, BM = M = ({0} * {1} * {1}) / 8 = {2} kNm", factoredLoad.ToString("0.00"), eff_span.ToString("0.00"), BM.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("Max shear force = Vu = (Wn * lc) / 2");
                double max_shear_force = (factoredLoad * lowest_Span / 2.0);
                sw.WriteLine("                = {0} * {1}/2 = {2} kN = {3} N", factoredLoad.ToString("0.00"), lowest_Span.ToString("0.0"), max_shear_force.ToString("0.0"), (max_shear_force * 1000).ToString("0.00"));

                max_shear_force *= 1000;


                sw.WriteLine();
                sw.WriteLine("Depth of the slab is given by");
                sw.WriteLine("              BM = 0.138 * σ_ck * b * d* d");

                double M = (BM * 10E+5);
                d = ((BM * 10E+5) / (0.138 * sigma_ck * 1000));
                d = Math.Sqrt(d);
                sw.WriteLine();
                sw.WriteLine("or      d = √(({0} * 10E+5)/(0.138 * {1} * 1000)) = {2} mm", BM.ToString("0.00"), sigma_ck.ToString("0.00"), d.ToString("0.00"));

                d  = (int)(d / 10);
                d += 2;
                d *= 10;
                sw.WriteLine();
                sw.WriteLine("Adopt effective depth d = {0} mm and over all depth", d.ToString("0.0"));
                sw.WriteLine("                      D = {0} mm", eff_depth);


                sw.WriteLine();
                sw.WriteLine("Adopt of tension steel is given by ");
                sw.WriteLine("             M   = 0.87 * σ_y * A_t( d - ((σ_y * A_t)/(σ_ck * b))");

                double a, b, c, At;

                a = (0.87 * sigma_y * sigma_y) / (sigma_ck * 1000);
                b = 0.87 * sigma_y * d;
                c = M;
                double b_ac = (b * b) - 4 * a * c;
                At = (b) - Math.Sqrt(Math.Abs(b_ac));
                At = At / (2 * a);

                At  = (int)At / 10;
                At += 1;
                At  = At * 10;
                sw.WriteLine();
                sw.WriteLine("   {0} * 10E+5 = 0.87 * {1} * At * ({2} - {3} * At / ({4} * 1000))",
                             BM.ToString("0.00"), sigma_y.ToString("0.00"), d.ToString("0.0"), sigma_y.ToString("0.00"), sigma_ck.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("or          At   = {0} sq.mm", At);
                sw.WriteLine();
                sw.WriteLine("Use {0} mm bars @ {1} mm c/c giving total area ", d1, d.ToString("0.0"));

                double est_value = (Math.PI * (d1 * d1) / 4) * (1000 / d);

                val1 = est_value;
                val2 = At;
                sw.WriteLine();
                if (val1 > val2)
                {
                    sw.WriteLine("                         = {0} sq.mm. > {1} sq.mm      OK", est_value.ToString("0"), At.ToString("0"));
                }
                else
                {
                    sw.WriteLine("                         = {0} sq.mm. < {1} sq.mm      NOT OK", est_value.ToString("0"), At.ToString("0"));
                }
                double n_rod = At / ((Math.PI * (d1 * d1) / 4));

                n_rod  = (int)n_rod;
                n_rod += 1;

                sw.WriteLine();
                sw.WriteLine("    Bend alternate bars at L/{0} from the face of support where ", n_rod);
                sw.WriteLine("moment reduces to less than half its maximum value. Temperature ");
                sw.WriteLine("reinforcement equal to {0}% of the gross concrete area will be", ads);
                sw.WriteLine("provided in the longitudinal direction.");
                sw.WriteLine();

                double dirArea = (ads / 100) * 1000 * eff_depth;
                sw.WriteLine("       = {0:f4} * 1000 * {1:f2}", (Ads / 100), eff_depth);
                sw.WriteLine("       = {0:f3} sq.mm.", dirArea);
                sw.WriteLine();
                sw.WriteLine("Use {0} mm MS bars @ 100 mm c/c giving total area ", d2.ToString("0"));
                sw.WriteLine();

                double a_st = Math.PI * d2 * d2 / 4;

                val1 = a_st * 10;
                val2 = dirArea;
                if (val1 > val2)
                {
                    sw.WriteLine("   = {0} * (1000/100) = {1} sq.mm.  > {2} sq.mm            OK", a_st.ToString("0.00"), (a_st * 10).ToString("0.00"), dirArea.ToString("0.0"));
                }
                else
                {
                    sw.WriteLine("   = {0} * (1000/100) = {1} sq.mm.  < {2} sq.mm           NOT OK", a_st.ToString("0.00"), (a_st * 10).ToString("0.00"), dirArea.ToString("0.0"));
                }


                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("■ STEP 3: Check for Shear");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("Percent tension steel = (100 * At)/ (b * d)");
                a_st = Math.PI * d1 * d1 / 4;



                double percent = (100 * (a_st * (1000 / 300))) / (1000 * d);
                sw.WriteLine("                      = (100 * ({0} * (1000/300)) / (1000 * {1}) = {2}%", a_st.ToString("0.0"), d.ToString("0.0"), percent.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("Shear strength of concrete for {0}% steel", percent.ToString("0.00"));
                ShearValue sh    = new ShearValue();
                double     tau_c = 0.0;

                tau_c = sh.Get_M15(percent);

                sw.WriteLine("     τ_c = {0} N/sq.mm.", tau_c);


                double k       = kVal_Table.Get_KValue(eff_depth);
                double tc_dash = k * tau_c;



                //tau_c = tau_c;
                sw.WriteLine();
                sw.WriteLine("For {0} mm thick slab, k = {1}", eff_depth.ToString("0.00"), k.ToString("0.00"));
                sw.WriteLine();
                sw.WriteLine("         So, τ_c` = k * Tc = {0} * {1} = {2} N/sq.mm", k.ToString("0.00"), tau_c.ToString("0.00"), tc_dash.ToString("0.00"));
                double Vu  = max_shear_force;
                double t_v = Vu / (1000 * d);

                sw.WriteLine();
                sw.WriteLine("Nominal shear stress Tv = Vu / b * d = {0}/(1000 * {1}) = {2} N/sq.mm", Vu, d, t_v.ToString("0.00"));

                sw.WriteLine();
                sw.WriteLine("The Slab is safe in shear.");
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("■ STEP 4: Check for development length");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("Moment of resistance offered by {0} mm bars @ {1} mm c/c", d1, d * 2);
                sw.WriteLine();
                sw.WriteLine("M1 = 0.87 * σ_y * At * (d - (σ_y * At / σ_ck * b))");
                sw.WriteLine("   = 0.87 * {0:f2} * {1:f2} * (1000/300) * ", sigma_y, a_st);
                sw.WriteLine("     ({0:f2} - ({1:f2} * {2:f2} * (1000 / 300)) / {3:f2} * 1000)",
                             d, sigma_y, a_st, Sigma_ck);

                double M1 = 0.87 * sigma_y * a_st * (1000.0 / 300.0) * (d - (sigma_y * a_st * (1000.0d / 300.0d) / (sigma_ck * 1000.0)));



                sw.WriteLine();
                sw.WriteLine("   = {0:F2} N mm", M1);
                sw.WriteLine("Vu = {0:F2} N", Vu);
                sw.WriteLine();
                sw.WriteLine("Let us assume anchorage length Lo = 0");
                sw.WriteLine("                  Ld <= 1.3 * (M1/Vu)");
                sw.WriteLine("                  56φ <= 1.3 * ({0}/{1})", M1.ToString("0.00"), Vu.ToString("0.00"));

                double phi = (1.3 * (M1 / Vu) / 56.0);


                val1 = phi;
                val2 = d1;
                sw.WriteLine();
                if (val1 > val2)
                {
                    sw.WriteLine("                  φ < {0}", phi.ToString("0.00"));
                    sw.WriteLine("We have provided φ = {0} mm, So OK.", d1.ToString("0.00"));
                }
                else
                {
                    sw.WriteLine("                  φ > {0}", phi.ToString("0.00"));
                    sw.WriteLine("We have provided φ = {0} mm, So NOT OK.", d1.ToString("0.00"));
                }

                sw.WriteLine();
                sw.WriteLine("  The Code requires that bars must be carried");
                sw.WriteLine("into the supports by atleast Ld / 3 = 190 mm");
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("■ STEP 5: Check for deflection");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();

                sw.WriteLine("Percent tension steel at midspan");
                sw.WriteLine("               = (100 * As) / (b * d)");
                sw.WriteLine("               = (100 * {0:F2} * 1000 / 150) / (1000 * 150)", a_st);
                double pps = (100 * a_st * 1000 / 150) / (1000 * 150);
                sw.WriteLine("               = {0}%", pps.ToString("0.00"));

                double gama = ModificationFactor.GetGamma(pps);
                sw.WriteLine();
                sw.WriteLine("             γ = {0}%", gama.ToString("0.00"));
                //sw.WriteLine(" σσσγγβαδλ■  √");
                sw.WriteLine();
                sw.WriteLine("  β = {0}, δ = {1} and λ = {2}", beta, delta, lamda);

                // Constant 20
                sw.WriteLine();
                sw.WriteLine("Allowable L/d = 20 * {0} = {1}", gama.ToString("0.00"), (20 * gama).ToString("0.00"));

                val1 = (eff_span * 1000) / d;
                val2 = (20 * gama);

                sw.WriteLine();
                if (val1 < val2)
                {
                    sw.WriteLine("Actual L/d = {0} / {1} = {2} < {3}       OK", (eff_span * 1000).ToString("0.00"), d, (eff_span * 1000 / d).ToString("0.00"), (20 * gama).ToString("0.00"));
                }
                else
                {
                    sw.WriteLine("Actual L/d = {0} / {1} = {2} > {3}       NOT OK", (eff_span * 1000).ToString("0.00"), d, (eff_span * 1000 / d).ToString("0.00"), (20 * gama).ToString("0.00"));
                }
                sw.WriteLine();
                sw.WriteLine("---------------------------------------------------------------------------");
                sw.WriteLine("---------------------       END OF REPORT        --------------------------");
                sw.WriteLine("---------------------------------------------------------------------------");

                double fd = 500;

                sw_view.WriteLine("SLAB DESIGN 02");
                sw_view.WriteLine("L = {0}", lowest_Span * 1000);
                sw_view.WriteLine("D = {0}", eff_depth);
                sw_view.WriteLine("b1 = {0}", d);
                sw_view.WriteLine("b2 = 100");
                sw_view.WriteLine("h1 = {0}", h1);
                sw_view.WriteLine("h2 = {0}", h2);
                sw_view.WriteLine("d1 = {0}", d1);
                sw_view.WriteLine("d2 = {0}", d2);
                sw_view.WriteLine("fd = {0:f0}", fd);
                sw_view.WriteLine("w1 = {0}", w1);
                sw_view.WriteLine("w2 = {0}", w1);
                sw_view.WriteLine("END");

                //BoQ CODE
                //S_No 1.,2.,3.
                //Member 3.5 8.0
                //Bar_Mark 01,02,03
                //Bar_CODE T10_B1,T6_B2,T10_B1
                //Bar_Grade Fe415,Fe415,Fe415
                //Bar_Dia 10,6,10
                //Bar_Length 3470,7970,3470
                //Bar_Nos 56,35,56
                //Bar_Weight 0.330,0.220,0.330
                //Bar_Shape 3019,120,1209
                //Bar_Shape 1209,120,3019
                //END BoQ

                int    main_bar_nos, dist_bar_nos;
                double wt_main_bar, wt_dist_bar;


                sw_boq.WriteLine("BoQ Code");
                sw_boq.WriteLine("S_No {0}.,{1}.,{2}.", 1, 2, 3);
                sw_boq.WriteLine("Member {0} {1}", B.ToString("0.0"), L.ToString("0.0"));
                sw_boq.WriteLine("Bar_Spacing {0},{1}", d.ToString("0.0"), "100.0");
                sw_boq.WriteLine("Bar_Mark 01,02,03");
                sw_boq.WriteLine("Bar_Code T{0}_B1,T{1}_B2,T{0}_B1", d1, d2);
                sw_boq.WriteLine("BAR_Grade Fe{0},Fe{0},Fe{0}", sigma_y);
                sw_boq.WriteLine("Bar_Dia {0},{1},{0}", d1, d2);
                sw_boq.WriteLine("Bar_Length {0},{1},{0}", (B * 1000 - 2 * h1), (L * 1000 - 2 * h1));

                main_bar_nos = (int)(L * 1000 / d);
                dist_bar_nos = (int)(B * 1000 / 100.0d);

                wt_main_bar  = 0.00616 * d1 * d1 * (B)*main_bar_nos;
                wt_dist_bar  = 0.00616 * d2 * d2 * (L)*dist_bar_nos;
                wt_main_bar /= 1000.0d;
                wt_dist_bar /= 1000.0d;
                //sw_boq.WriteLine("Bar_Nos {0},{1},{0}", "56", "35", "56");
                sw_boq.WriteLine("Bar_Nos {0},{1},{0}", main_bar_nos, dist_bar_nos);
                sw_boq.WriteLine("Bar_Weight {0},{1},{0}", wt_main_bar.ToString("0.000"), wt_dist_bar.ToString("0.000"));
                //sw_boq.WriteLine("Bar_Weight {0},{1},{0}", "0.330", "0.220");

                double k_d = eff_depth - (2 * ((h1 + (d1 / 2))));

                double aaa = Math.Sqrt((k_d * k_d) + (k_d * k_d));

                double tot_len = (lowest_Span * 1000.0) + 2 * w1 - 2 * h1;

                double sh1 = tot_len - (fd + (w1 - h1));
                double sh2 = (fd + (w1 - h1)) - eff_depth;



                sw_boq.WriteLine("Bar_Shape {0},{1:f0},{2}", sh1, aaa, sh2);
                //sw_boq.WriteLine("Bar_Shape {0},{1:f0},{2}", 3140, aaa, 1290);
                sw_boq.WriteLine("Bar_Shape {0}", ((L * 1000.0) - (2 * h1)));

                sw_boq.WriteLine("Bar_Shape {0},{1},{2}", sh2, aaa, sh1);
                sw_boq.WriteLine("END BoQ");
            }
            catch (Exception exx)
            {
            }
            finally
            {
                GC.Collect();
                sw.Flush();
                sw.Close();
                sw_view.Flush();
                sw_view.Close();
                sw_boq.Flush();
                sw_boq.Close();
            }
        }