Esempio n. 1
0
        public void Calculate_Program(string file_name)
        {
            frmCurve f_c = null;

            StreamWriter sw = new StreamWriter(new FileStream(file_name, FileMode.Create));


            #region TechSOFT Banner
            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 DECK SLAB              *");
            sw.WriteLine("\t\t*          FOR T-BEAM RCC BRIDGE             *");
            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----------------------------------------------");

            #endregion


            try
            {
                #region USER DATA

                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("USER'S DATA");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine(" Width of Carriage way = {0:f3} m", width_carrage_way);
                sw.WriteLine(" Effective Span of Tee Beam = {0} m", effe_span);
                sw.WriteLine(" Concrete Grade = M {0:f0} ", concrete_grade);
                sw.WriteLine(" Steel Grade = Fe {0:f0} ", steel_grade);
                sw.WriteLine(" Permissible Stress in Concrete [σ_cb] = {0} N/sq.m", sigma_cb);
                sw.WriteLine(" Permissible Stress in Steel [σ_st] = {0} N/sq.m", sigma_st);
                sw.WriteLine(" Spacing of Cross Girders [L]= {0} m {1,40}", L, "Marked as (C) in the Drawing");
                sw.WriteLine(" No. Of Main girders = {0:f0} ", no_main_girder);
                sw.WriteLine(" Spacing of main Girders [B] = {0} m {1,40}", B, "Marked as (A) in the Drawing");
                sw.WriteLine(" Width of Cross Girders = {0} mm {1,40}", width_cross_girders, "Marked as (D) in the Drawing");
                sw.WriteLine(" Width of Long Girders = {0} mm {1,40}", width_long_girders, "Marked as (B) in the Drawing");
                sw.WriteLine(" Modular ratio [m] = {0} ", m);
                sw.WriteLine(" Lever arm factor [j] = {0} ", j);
                sw.WriteLine(" Moment factor [Q] = {0} ", Q);

                sw.WriteLine(" Minimum Cover = {0:f3} mm", minimum_cover);

                sw.WriteLine(" Load = {0:f3} kN", load);
                sw.WriteLine(" Width of Load [a]= {0:f3} m", width);
                sw.WriteLine(" Length of Load [b]= {0:f3} m", length);
                sw.WriteLine(" Impact Factor [IF]= {0:f3} ", impact_factor);
                sw.WriteLine(" Continuity Factor [CF]= {0:f3} ", continuity_factor);
                sw.WriteLine(" Constant [µ] = {0:f3} ", mu);

                sw.WriteLine(" Thickness of concrete Deck Slab [Ds] = {0} mm {1,40}", Ds, "Marked as (F) in the Drawing");
                sw.WriteLine(" Unit weight of concrete Deck Slab [γ_c]= {0} kN/cu.m", gamma_c);
                sw.WriteLine(" Thickness of Asphalt Wearing Course [Dwc] = {0} mm {1,40}", Dwc, "Marked as (E) in the Drawing");
                sw.WriteLine(" Unit weight of Asphalt Wearing Course [γ_wc] = {0} kN/cu.m", gamma_wc);

                sw.WriteLine();
                sw.WriteLine();
                #endregion

                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("DESIGN CALCULATIONS");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 1 : Calculations for Bending Moments for Permanent Load ");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("Self weight of slab = Ds * γ_c = {0} * {1} = {2} kN/sq.m.",
                             (Ds / 1000),
                             gamma_c,
                             self_weight_slab);
                sw.WriteLine();
                sw.WriteLine("Self weight of wearing course = Dwc * γ_wc ");

                sw.WriteLine("                              = {0} * {1}", (Dwc / 1000), gamma_wc);
                sw.WriteLine("                              = {0} kN/sq.m.", self_weight_wearing_cource);

                sw.WriteLine();
                sw.WriteLine("                 Total weight = {0} + {1}", self_weight_slab, self_weight_wearing_cource);
                sw.WriteLine("                              = {0} kN/sq.m.", total_weight);

                double w1;

                w1 = B * no_main_girder * total_weight;
                sw.WriteLine();
                sw.WriteLine("Total Permanent Load on Slab Panel = W1");
                sw.WriteLine("                                   = {0} * {1} * {2}",
                             B,
                             no_main_girder,
                             total_weight);
                sw.WriteLine("                                   = {0} kN", w1);

                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Full slab Panel is Loaded with uniformly distributed load");
                double k;
                k = B / no_main_girder;

                sw.WriteLine("k = B / L = {0:f2} / {1:f2} = {2:f2}",
                             B,
                             no_main_girder,
                             k);
                sw.WriteLine("1/k = 1 / {0} = {1}",
                             k,
                             (1 / k));

                f_c = new frmCurve(k, 0.0, 0.0, LoadType.FullyLoad);
                f_c.ShowDialog();
                double m1, m2, MB, ML;

                m1 = f_c.m1;
                m2 = f_c.m2;
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Select m1 and m2 from Pigeaud's curve");
                sw.WriteLine(" m1 = {0}    and      m2 = {1}", m1, m2);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("The Permanent Load Bending Moments are obtained by");
                sw.WriteLine("applying continuity Factor (CF) as, ");
                sw.WriteLine();
                sw.WriteLine("MB = (CF * w1) * (m1 + µm2)");

                sw.WriteLine("   = ({0:f2} * {1:f2}) * ({2:f4} + {3:f4} * {4:f4})",
                             continuity_factor,
                             w1,
                             m1,
                             mu,
                             m2);
                MB = (continuity_factor * w1) * (m1 + (mu * m2));
                sw.WriteLine("   = {0:f3} kN-m", MB);


                sw.WriteLine();
                sw.WriteLine("ML = (CF * w1) * (m2 + µm1)");

                sw.WriteLine("   = ({0:f2} * {1:f2}) * ({2:f4} + {3:f4} * {4:f4})",
                             continuity_factor,
                             w1,
                             m2,
                             mu,
                             m1);
                ML = (continuity_factor * w1) * (m2 + mu * m1);
                sw.WriteLine("   = {0:f3} kN-m", ML);

                //sw.WriteLine();
                //sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 2 : Calculations for Bending Moments for Imposed Load ");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();

                //double B = 2.5;
                //double L = 4.0;

                //m1 0.0049  0.081  m2 0.015  0.022
                //m1 0.049  0.081  m2 0.015  0.022
                double _k = B / L;
                sw.WriteLine(" B = {0:f3} m.", B);
                sw.WriteLine(" L = {0:f3} m.", L);
                sw.WriteLine();
                sw.WriteLine(" k = B / L = {0:f2} / {1:f2} = {2:f2} m.",
                             B,
                             L,
                             _k);
                double a = 0.84;
                double b = 4.57;

                double u, v;
                u = a + 2.0 * (Dwc / 1000.0);
                sw.WriteLine();
                sw.WriteLine("u = a + 2 * Dwc = {0} + 2 * {1} = {2:f2} m",
                             a,
                             (Dwc / 1000),
                             u);

                v = b + 2.0 * (Dwc / 1000.0);
                sw.WriteLine("v = b + 2 * Dwc = {0} + 2 * {1} = {2:f2} m",
                             b,
                             (Dwc / 1000),
                             v);
                double _v = 0.0;
                _v = v;
                if (v > L)
                {
                    v = L;
                }

                double u_by_B = u / B;
                double v_by_L = v / L;

                if (k < 0.4)
                {
                    k = 0.4;
                }
                if (k > 1.0)
                {
                    k = 1.0;
                }
                f_c = new frmCurve(k, u_by_B, v_by_L, LoadType.PartialLoad);
                f_c.ShowDialog();
                double _m1, _m2;
                _m1 = f_c.m1;
                _m2 = f_c.m2;

                sw.WriteLine();
                sw.WriteLine("u/B = {0} / {1} = {2:f2}",
                             u,
                             B,
                             u_by_B);
                sw.WriteLine("v/L = {0} / {1} = {2:f2}",
                             v,
                             L,
                             v_by_L);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Select m1 & m2 from Pigeaud's curves");
                sw.WriteLine("Corresponding to k = {0:f3}, u/B = {1:f2} and v/L = {2:f2}",
                             _k,
                             u_by_B,
                             v_by_L);
                sw.WriteLine("m1 = {0} and m2 = {1}",
                             _m1,
                             _m2);

                double total_impact_load;
                total_impact_load = impact_factor * load;

                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Total Load per track including impact");
                sw.WriteLine("   = IF * load");
                sw.WriteLine("   = {0:f2} * {1:f2}", impact_factor, load);
                sw.WriteLine("   = {0:f2} N", total_impact_load);

                double w2 = total_impact_load * (L / _v);
                sw.WriteLine();
                sw.WriteLine("Effective load on slab Panel = w2");
                sw.WriteLine("    = {0:f2} * ({1:f2}/{2:f2})", total_impact_load, L, b);
                sw.WriteLine("    = {0:f2} kN", w2);
                sw.WriteLine();
                sw.WriteLine("Moment along Shorter span ");

                double _MB = w2 * (_m1 + mu * _m2);
                sw.WriteLine("       = MB = w2 * (m1 + µ*m2)");
                sw.WriteLine("       = {0:f3} * ({1:f3} + {2:f3}*{3:f3}", w2, _m1, mu, _m2);
                sw.WriteLine("       = {0:f3} kN", _MB);

                double _ML = w2 * (_m2 + mu * _m1);
                sw.WriteLine();
                sw.WriteLine("       = ML = w2 * (m2 + µ*m1)");
                sw.WriteLine("       = {0:f3} * ({1:f3} + {2:f3} * {3:f3}", w2, m2, mu, m1);
                sw.WriteLine("       = {0:f3} kN", _ML);

                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("The Slab is designed as Continuous,");
                sw.WriteLine("The Imposed Load Bending Moment are obtained");
                sw.WriteLine("by applying Continuity Factor(CF) as");
                sw.WriteLine();
                sw.WriteLine("MB = CF * MB = {0:f3} * {1:f3} = {2:f3} kN-m",
                             continuity_factor, _MB,
                             (continuity_factor * _MB));
                _MB = continuity_factor * _MB;

                sw.WriteLine("ML = CF * ML = {0:f3} * {1:f3} = {2:f3} kN-m",
                             continuity_factor, _ML,
                             (continuity_factor * _ML));
                _ML = continuity_factor * _ML;

                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Final Design Bending Moments for the Slab ");
                sw.WriteLine("Short Span B.N. = MB = {0:f3} + {1:f3} = {2:f3} kN-m",
                             MB, _MB,
                             (MB + _MB));
                MB += _MB;
                sw.WriteLine("Long Span B.M. = ML = {0:f3} + {1:f3} = {2:f3} kN-m",
                             ML, _ML,
                             (ML + _ML));
                ML += _ML;
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 3 : Calculations for Effective Depth ");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();

                double d;

                d = (MB * 10E5) / (Q * 1000);
                d = Math.Sqrt(d);

                sw.WriteLine("d = √((MB * 10E+5)/(Q * 1000))");
                sw.WriteLine("  = √(({0:f3} * 10E+5)/({1:f3} * 1000)) ", MB, Q);
                sw.WriteLine("  = {0:f3} mm", d);

                double d1, d2;
                d1 = 12;

                sw.WriteLine();
                sw.WriteLine("Using {0:f0} mm dia bars", d1);
                double overall_depth = 0.0;
                overall_depth = d + minimum_cover + d1 / 2;

                sw.WriteLine();
                sw.WriteLine("Overall depth of Deck slab = {0:f3} + {1:f3} + {2:f3}", d, minimum_cover, (d1 / 2));

                sw.WriteLine("                           = {0:f3} mm", overall_depth);

                double _over_dep;
                _over_dep = overall_depth / 100;
                _over_dep = (double)(int)_over_dep;
                sw.WriteLine();
                sw.WriteLine("{0:f3} / 100 = {1:f3} = {2:f0}",
                             overall_depth,
                             (overall_depth / 100),
                             _over_dep);

                double _o_depth;
                _o_depth = _over_dep * 100 + 50;
                sw.WriteLine();
                if (_o_depth > overall_depth)
                {
                    sw.WriteLine("{0:f0} * 100 + 50 = {1:f0} > {2:f2} OK", _over_dep, _o_depth, overall_depth);
                }
                else
                {
                    _o_depth += 50;
                    sw.WriteLine("{0:f0} * 100 + 50 + 50 = {1:f0} > {2:f2} OK", _over_dep, _o_depth, overall_depth);
                }

                sw.WriteLine();

                if (_o_depth < overall_depth)
                {
                    _o_depth += 50;
                }
                double eff_depth;
                eff_depth = _o_depth - minimum_cover - (d1 / 2);
                sw.WriteLine();
                sw.WriteLine("Effective depth d = {0:f3} - {1:f3} - {2:f3} = {3:f3} mm",
                             _o_depth,
                             minimum_cover,
                             (d1 / 2), eff_depth);

                double adopt_eff_depth;
                adopt_eff_depth  = (int)(eff_depth / 10);
                adopt_eff_depth *= 10;

                sw.WriteLine();
                sw.WriteLine("Adopt Eff. Depth  = {0:f3} mm", adopt_eff_depth);

                double Ast1 = (MB * 10E5) / (sigma_st * j * adopt_eff_depth);
                //S = S / 10;
                //S = (int)S;

                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 4 : Calculations for Reinforcement along shorter span ");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("Ast1 = (Mb * 10^6)/(σ_st * j * d)");
                sw.WriteLine("     = ({0:f3} * 10^6)/({1:f3} * {2:f3}* {3:f3})", MB, sigma_st, j, adopt_eff_depth);
                sw.WriteLine("     = {0:f0} sq.mm", Ast1);
                double S = (1000 * (Math.PI * d1 * d1 / 4)) / Ast1;
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("spacing of Bars = S = (1000 * (π * 12 * 12/4))/ Ast1");
                sw.WriteLine("                    = {0:f0} mm", S);
                sw.WriteLine("                    = {0:f0} /10 = {1:f3} = {1:f0}", S, (S / 10.0));

                if (S > 145)
                {
                    S = 150;
                }
                else
                {
                    S = (int)(S / 10.0);
                    S = (S * 10.0);
                }
                sw.WriteLine("                    = {0:f0} * 10 = {1:f0} mm", (S / 10.0), S);

                sw.WriteLine();
                sw.WriteLine("Adopt T12 bars @{0:f0} mm c/c {1,40}", S, "Marked as (1) in the Drawing");

                _sp1 = S;
                _bd1 = 12;



                d2 = 10;
                double res_eff_depth;
                res_eff_depth = adopt_eff_depth - (d2 / 2);
                double Ast2;
                Ast2 = (ML * 10E5) / (sigma_st * j * res_eff_depth);

                //S = (1000.0 * (Math.PI * 12.0 * 12.0 / 4.0)) / Ast2;
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 5 : Calculations for Reinforcement along longer span ");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("Use 10 mm dia bars,");
                sw.WriteLine("Respective effective depth = {0} - {1} = {2} mm",
                             adopt_eff_depth,
                             (d2 / 2).ToString("0"),
                             res_eff_depth);

                sw.WriteLine();
                sw.WriteLine("Ast2 = (ML * 10^6)/(σ_st * j* d)");
                sw.WriteLine("     = ({0:f3} * 10^6)/({1:f2} * {2:f2}* {3:f2})",
                             ML, sigma_st, j, res_eff_depth);
                sw.WriteLine("     = {0:f2} sq.mm", Ast2);


                double spacing_bars;
                spacing_bars = (1000 * Math.PI * d2 * d2) / (4 * Ast2);



                sw.WriteLine();
                sw.WriteLine("spacing of Bars = S = (1000 * (π * 10 * 10/4))/ Ast2");
                sw.WriteLine("                    = {0:f3} mm", spacing_bars);
                sw.WriteLine("                    = {0:f3}/10 = {1:f3} = {1:f0} ", spacing_bars,
                             (spacing_bars / 10));

                double _spacing_bars = (int)(spacing_bars / 10);
                _spacing_bars = _spacing_bars * 10;

                sw.WriteLine("                    = {0:f0} * 10 = {1:f0} mm", (_spacing_bars / 10), _spacing_bars);



                if (_spacing_bars > 200)
                {
                    _spacing_bars = 200;
                }
                else
                {
                    _spacing_bars = (int)(_spacing_bars / 10.0);
                    _spacing_bars = _spacing_bars * 10;
                }

                _sp2 = _spacing_bars;
                _bd2 = 10;
                sw.WriteLine();
                sw.WriteLine("Adopt T10 bars @{0:f0} mm c/c {1,40}", _spacing_bars, "Marked as (2) in the Drawing");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("---------------------------------------------------------------------------");
                sw.WriteLine("---------------------       END OF REPORT        --------------------------");
                sw.WriteLine("---------------------------------------------------------------------------");
            }
            catch (Exception ex)
            {
            }
            finally
            {
                sw.Flush();
                sw.Close();
            }
        }
Esempio n. 2
0
        public void Calculate_Program()
        {
            StreamWriter sw = new StreamWriter(new FileStream(rep_file_name, FileMode.Create));

            try
            {
                #region TechSOFT Banner
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("\t\t************************************************");
                sw.WriteLine("\t\t*                  ASTRA Pro                   *");
                sw.WriteLine("\t\t*         TechSOFT Engineering Services        *");
                sw.WriteLine("\t\t*                                              *");
                sw.WriteLine("\t\t*          DESIGN OF RCC DECK SLAB             *");
                sw.WriteLine("\t\t*                                              *");
                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----------------------------------------------");
                #endregion

                #region USER'S DATA
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("USER'S DATA");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine("Effective Span [S] = {0} m", txt_S.Text);
                sw.WriteLine("Width of Carrage way [CW] = {0} m", txt_CW.Text);
                sw.WriteLine("Width of Kerb [Wk] = {0} m", txt_Wk.Text);
                sw.WriteLine("Thickness of Kerb [tk] = {0} m", txt_tk.Text);
                sw.WriteLine("Width of Footpath [Fw] = {0} m", txt_Fw.Text);
                sw.WriteLine("Thickness of Wearing Course [twc] = {0} m    Marked as (E) in Drawing", txt_twc.Text);
                //
                _E = string.Format("{0:f3}", twc);



                sw.WriteLine("Track Load [Wt] = {0} kN", txt_Wt.Text);
                sw.WriteLine("Track Loading Length [Ltl] = {0} m", txt_Ltl.Text);
                sw.WriteLine("Track Loading Width [Wtl] = {0} m", txt_Wtl.Text);
                sw.WriteLine("Spacing of Main Long Girders [L] = {0} m     Marked as (A) in Drawing", txt_L.Text);
                //
                _A = string.Format("{0}", txt_L.Text);

                sw.WriteLine("Width of Long Girder [bl] = {0} m            Marked as (B) in Drawing", txt_bl.Text);
                //
                _B = string.Format("{0}", txt_bl.Text);

                sw.WriteLine("Spacing of Cross Girders [B] = {0} m         Marked as (C) in Drawing", txt_B.Text);
                //
                _C = string.Format("{0}", txt_B.Text);


                sw.WriteLine("Width of Cross Girders [bc] = {0} m          Marked as (D) in Drawing", txt_bc.Text);
                //
                _D = string.Format("{0}", txt_bc.Text);


                sw.WriteLine("Thickness of Deck Slab [Do] = {0} m          Marked as (F) in Drawing", txt_Do.Text);
                //
                _F = string.Format("{0}", txt_Do.Text);

                sw.WriteLine("Concrete Grade [fck] = M {0} = {0} N/sq.mm", txt_fck.Text);
                sw.WriteLine("Concrete Cube strength at transfer [fci] = {0} N/sq.mm", txt_fci.Text);
                sw.WriteLine("Permissible compressive stress in concrete [σ_cb] = {0} N/sq.mm", txt_sigma_cb.Text);
                sw.WriteLine("Permissible tensile stress in steel [σ_st] = {0} N/sq.mm", txt_sigma_st.Text);
                sw.WriteLine("Modular Ratio [m] = {0}", txt_m.Text);
                sw.WriteLine("Moment Factor [Q] = {0}", txt_Q.Text);
                sw.WriteLine("Lever Arm Factor [j] = {0}", txt_j.Text);
                sw.WriteLine("Steel Grade [fy] = Fe {0} = {0} N/sq.mm", txt_fy.Text);
                sw.WriteLine("Unit Weight of Concrete [γ_c] = {0} kN/cu.m", txt_gamma_c.Text);
                sw.WriteLine("Unit Weight of Wearing Course [γ_wc] = {0} kN/cu.m", txt_gamma_wc.Text);
                sw.WriteLine("Impact Factor [IF] = {0}", txt_IF.Text);
                sw.WriteLine("Continuity Factor [CF] = {0}", txt_CF.Text);
                sw.WriteLine("Diameter of Main Reinforcement Bars [dm] = {0}", txt_dm.Text);
                sw.WriteLine("Diameter of Distribution Reinforcement Bars [dd] = {0}", txt_dd.Text);
                sw.WriteLine();
                sw.WriteLine();
                #endregion

                #region DESIGN CALCULATIONS
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("DESIGN CALCULATIONS");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                #endregion

                #region STEP 1 : CROSS SECTION OF DECK SLAB
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 1 : CROSS SECTION OF DECK SLAB ");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("For each panel enclosed by 2 long and 2 Cross girders");
                sw.WriteLine();
                sw.WriteLine("Length = L = {0} m", L);
                sw.WriteLine();
                sw.WriteLine("Width = B = {0} m", B);
                sw.WriteLine();
                tds = _Do;
                sw.WriteLine("Thickness of Deck Slab = tds = {0} m", tds);
                sw.WriteLine();
                sw.WriteLine("Thickness of Wearing Course = twc = {0} m", twc);
                sw.WriteLine();
                #endregion

                #region STEP 2 : LIVE LOAD BENDING MOMENT
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 2 : LIVE LOAD BENDING MOMENT");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Live Load  = Wt = {0} kN", Wt);
                sw.WriteLine();
                sw.WriteLine("Live Load Length = Ltl = {0} m", Ltl);
                sw.WriteLine();
                sw.WriteLine("Live Load Width = Wtl = {0} m", Wtl);
                sw.WriteLine();
                sw.WriteLine("Considering 45° dispersion through wearing Course");
                sw.WriteLine();

                double u = Wtl + 2 * twc;
                sw.WriteLine("    u = {0} + 2 * {1} = {2} m", Wtl, twc, u);
                sw.WriteLine();
                double v = Ltl + 2 * twc;
                v = double.Parse(v.ToString("0.00"));
                sw.WriteLine("    v = {0} + 2 * {1} = {2} m", Ltl, twc, v);
                sw.WriteLine();
                sw.WriteLine();

                double u_by_B = u / B;
                sw.WriteLine("   u/B = {0} / {1} = {2} ", u, B, u_by_B);
                sw.WriteLine();
                double v_by_L = v / L;
                sw.WriteLine("   v/L = {0} / {1} = {2} ", v, L, v_by_L);
                sw.WriteLine();

                double K = B / L;
                K = double.Parse(K.ToString("0.0"));
                sw.WriteLine("  K = B/L = {0} / {1} = {2}", B, L, K);

                sw.WriteLine();

                double m1, m2;

                m1 = 0.098;
                m2 = 0.02;

                frmCurve fcurv = new frmCurve(K, u_by_B, v_by_L, LoadType.PartialLoad);
                //if (K == 0.5)
                //{
                fcurv.txt_m1.Text = m1.ToString();
                fcurv.txt_m2.Text = m2.ToString();
                //}
                fcurv.ShowDialog();

                m1 = fcurv.m1;
                m2 = fcurv.m2;

                sw.WriteLine(" Using Pegeaud's Curves     m1 = {0} and  m2 = {1}", m1, m2);
                sw.WriteLine();

                double MB = Wt * (m1 + 0.15 * m2);
                sw.WriteLine("Bending Moment along Short span = MB");
                sw.WriteLine("                                = Wt*(m1 + 0.15 * m2)");
                sw.WriteLine("                                = {0}*({1} + 0.15 * {2})", Wt, m1, m2);
                sw.WriteLine("                                = {0} kN-m", MB);
                sw.WriteLine();
                sw.WriteLine("As slab is continuous, Design B.M. = CF * MB = {0} * {1}", CF, MB);
                sw.WriteLine();

                double MB1 = CF * _IF * MB;
                MB1 = double.Parse(MB1.ToString("0.00"));
                sw.WriteLine("Including Impact Factor , MB1 = CF * IF * MB");
                sw.WriteLine("                              = {0} * {1} * {2}", CF, _IF, MB);
                sw.WriteLine("                              = {0} kN-m", MB1);
                sw.WriteLine();

                double ML = Wt * (m2 + 0.15 * m1);
                sw.WriteLine("Bending Moment along Long Span = ML ");
                sw.WriteLine("                               = Wt * (m2 + 0.15 * m1)");
                sw.WriteLine("                               = {0} * ({1} + 0.15 * {2})", Wt, m2, m1);
                sw.WriteLine("                               = {0} kN-m", ML);
                sw.WriteLine();

                double ML1 = CF * _IF * ML;
                sw.WriteLine("Design B.M. = ML1");
                sw.WriteLine("            = CF * IF * ML");
                sw.WriteLine("            = {0} * {1} * {2}", CF, _IF, ML);
                sw.WriteLine("            = {0} kN-m", ML1);
                sw.WriteLine();
                sw.WriteLine();
                #endregion

                #region STEP 3 : LIVE LOAD SHEAR FORCES
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 3 : LIVE LOAD SHEAR FORCES");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Considering dispersion along short span");

                double cons_disp = Wtl + 2 * (twc + _Do);
                sw.WriteLine("    = Wtl + 2 * (twc + Do)");
                sw.WriteLine("    = {0} + 2 * ({1} + {2})", Wtl, twc, _Do);
                sw.WriteLine("    = {0} m", cons_disp);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("For maximum Shear force Load is Placed at a Location ");
                sw.WriteLine("So that the whole dispersion is in the span.");
                sw.WriteLine();

                double x = cons_disp / 2.0;
                sw.WriteLine("So, placing the Load at {0}/2 = {1} m from the edge at the beam.", cons_disp, x);
                sw.WriteLine("So   x = {0}", x);
                sw.WriteLine();
                sw.WriteLine();


                sw.WriteLine("Effective width of slab = K * x * [1 - (x/L)] + bw");
                sw.WriteLine();
                sw.WriteLine("Width of Long Girders = {0} m", bl);
                sw.WriteLine("Width of Cross Girder = {0} m", bc);
                sw.WriteLine();
                double B1 = L - bl;
                sw.WriteLine("Clear Length of Panel = B1 = {0} - {1} = {2} m", B, bc, B1);
                sw.WriteLine();


                double L1 = B - bc;
                sw.WriteLine("Clear width of Panel = L1 = {0} - {1} = {2} m", L, bl, L1);
                sw.WriteLine();

                double B_by_L = B1 / L1;
                B_by_L = double.Parse(B_by_L.ToString("0.00"));

                sw.WriteLine(" B1 / L1 = {0} / {1} = {2}, From Table 1, given at the end of the Report,", B1, L1, B_by_L);
                K = Get_Table_1_Value(B_by_L, 2);
                //K = 2.6;
                sw.WriteLine(" K = {0}", K);
                sw.WriteLine();

                double eff_wdt_slab = K * x * (1 - (x / L1)) + Ltl + 2 * twc;
                eff_wdt_slab = double.Parse(eff_wdt_slab.ToString("0.000"));
                sw.WriteLine("Effective width of slab = K * x * [1 - (x/L1)] + Ltl");
                sw.WriteLine("       = {0} * {1} * [1 - ({1}/{2})] + {3}", K, x, L1, Ltl);
                sw.WriteLine("       = {0} m", eff_wdt_slab);
                sw.WriteLine();
                double load_per_mtr = Wt / eff_wdt_slab;
                load_per_mtr = double.Parse(load_per_mtr.ToString("0"));
                sw.WriteLine("Load per metre width = {0}/{1} = {2} kN", Wt, eff_wdt_slab, load_per_mtr);
                sw.WriteLine();

                double V = load_per_mtr * (L1 - x) / L1;
                V = double.Parse(V.ToString("0"));
                sw.WriteLine(" V = Shear force per metre width");
                sw.WriteLine("   = {0} * (L1-x)/L1", load_per_mtr);
                sw.WriteLine("   = {0} * ({1}-{2})/{1}", load_per_mtr, L1, x);
                sw.WriteLine("   = {0} kN", V);
                sw.WriteLine();

                double sh_frc_imp = _IF * V;
                sh_frc_imp = double.Parse(sh_frc_imp.ToString("0.00"));
                sw.WriteLine(" Shear force with impact = {0}* {1} = {2} kN", _IF, V, sh_frc_imp);
                sw.WriteLine();

                #endregion

                #region STEP 4 : Permanent Load BENDING MOMENTS AND SHEAR FORCES
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 4 : Permanent Load BENDING MOMENTS AND SHEAR FORCES");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();

                double self_weight_dk_slb = _Do * gamma_c;
                self_weight_dk_slb = double.Parse(self_weight_dk_slb.ToString("0.00"));
                sw.WriteLine("Self weigth of Deck Slab = {0} * {1} = {2} kN/sq.m", _Do, gamma_c, self_weight_dk_slb);
                sw.WriteLine();

                double self_wt_wrng_crs = twc * gamma_wc;
                self_wt_wrng_crs = double.Parse(self_wt_wrng_crs.ToString("0.00"));
                sw.WriteLine("Self weight of wearing course = {0} * {1} = {2} kN/sq.m", twc, gamma_wc, self_wt_wrng_crs);
                sw.WriteLine();

                double total_load = self_weight_dk_slb + self_wt_wrng_crs;
                total_load = double.Parse(total_load.ToString("0.00"));
                sw.WriteLine(" Total Load = {0} kN/sq.m", total_load);
                sw.WriteLine();

                double total_load_panel = L * B * total_load;
                total_load_panel = double.Parse(total_load_panel.ToString("0.00"));
                sw.WriteLine("Total Load on a Panel = L*B*{0}", total_load);
                sw.WriteLine("                      = {0} * {1} * {2}", L, B, total_load);
                sw.WriteLine("                      = {0} kN", total_load_panel);
                sw.WriteLine();
                sw.WriteLine("As the Panel is fully Loaded with uniformly distributed load");

                K = B / L;

                sw.WriteLine("So, u/B = 1    and   v/L = 1   and  K = B/L = {0}/ {1} = {2}", B, L, K);

                double one_by_K = (1 / K);
                sw.WriteLine(" and 1/K = (1/{0}) = {1}", K, one_by_K);
                sw.WriteLine();

                fcurv = new frmCurve(K, 1.0, 1.0, LoadType.FullyLoad);

                m1 = 0.047;
                m2 = 0.01;

                if (one_by_K == 2.0)
                {
                    fcurv.txt_m1.Text = m1.ToString();
                    fcurv.txt_m2.Text = m2.ToString();
                }
                fcurv.ShowDialog();

                m1 = fcurv.m1;
                m2 = fcurv.m2;

                sw.WriteLine();
                sw.WriteLine("From Pigeaud's Curve, m1 = {0}  and m2 = {1}", m1, m2);
                sw.WriteLine();


                double MB2 = total_load_panel * (m1 + 0.15 * m2);
                MB2 = double.Parse(MB2.ToString("0.00"));
                sw.WriteLine("Bending Moment along short span = MB2");
                sw.WriteLine("                                = {0}*(m1+0.15*m2)");
                sw.WriteLine("                                = {0}*({1}+0.15*{2})", total_load_panel, m1, m2);
                sw.WriteLine("                                = {0} kN-m", MB2);
                sw.WriteLine();

                double ML2 = total_load_panel * (m2 + 0.15 * m1);
                ML2 = double.Parse(ML2.ToString("0.00"));
                sw.WriteLine("Bending Moment along long span = ML2");
                sw.WriteLine("                                = {0}*(m2+0.15*m1)");
                sw.WriteLine("                                = {0}*({1}+0.15*{2})", total_load_panel, m2, m1);
                sw.WriteLine("                                = {0} kN-m", ML2);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("Design B.M. including continuity Factor = CF * {0}", MB2);
                sw.WriteLine("                                        = {0} * {1}", CF, MB2);
                MB2 = CF * MB2;
                MB2 = double.Parse(MB2.ToString("0.00"));
                sw.WriteLine("                                        = {0} kN-m", MB2);
                sw.WriteLine();

                sw.WriteLine("Design B.M. including continuity Factor = CF * {0}", ML2);
                sw.WriteLine("                                        = {0} * {1}", CF, ML2);
                ML2 = CF * ML2;
                ML2 = double.Parse(ML2.ToString("0.00"));
                sw.WriteLine("                                        = {0} kN-m", ML2);
                sw.WriteLine();
                sw.WriteLine();

                double fxd_ld_sh_frc = 0.5 * total_load * L1;
                fxd_ld_sh_frc = double.Parse(fxd_ld_sh_frc.ToString("0.00"));
                sw.WriteLine("Permanent Load Shear Force = 0.5*{0}*L1", total_load);
                sw.WriteLine("                       = 0.5*{0}*{1}", total_load, L1);
                sw.WriteLine("                       = {0} kN", fxd_ld_sh_frc);
                sw.WriteLine();
                sw.WriteLine();

                MB = MB1 + MB2;
                sw.WriteLine("Design Moments = MB = MB1 + MB2 = {0} + {1} = {2} kN-m", MB1, MB2, MB);
                ML = ML1 + ML2;
                sw.WriteLine("               = ML = ML1 + ML2 = {0} + {1} = {2} kN-m", ML1, ML2, ML);
                sw.WriteLine();
                #endregion

                #region STEP 5 : STRUCTURAL DESIGN OF DECK SLAB
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 5 : STRUCTURAL DESIGN OF DECK SLAB");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();
                double d = (MB * 10E5) / (Q * 1000);

                d = Math.Sqrt(d);
                d = double.Parse(d.ToString("0"));
                sw.WriteLine("Required Effective Depth = d = √((M*10E5)/(Q*b))");
                sw.WriteLine("                         = √(({0}*10E5)/({1}*1000))", MB, Q);
                sw.WriteLine("                         = {0} mm", d);
                sw.WriteLine();


                d  = (int)(d / 10.0);
                d += 1.0;
                d  = d * 10;
                sw.WriteLine();
                sw.WriteLine("Adopt effective depth = d = {0} mm", d);
                sw.WriteLine();
                sw.WriteLine("Required steel for reinforcement along short span ");

                double Ast = (MB * 10E5) / (sigma_st * j * d);

                Ast = double.Parse(Ast.ToString("0"));
                double _ast = Ast;
                sw.WriteLine(" Ast = (M*10E5)/(σ_st*j*d)");
                sw.WriteLine("     = ({0}*10E5)/({1}*{2}*{3})", MB, sigma_st, j, d);
                sw.WriteLine("     = {0} sq.mm", Ast);
                sw.WriteLine();
                sw.WriteLine();


                double spacing, pro_ast;
                spacing = 200;
                do
                {
                    spacing -= 10;
                    pro_ast  = (Math.PI * dm * dm / 4.0) * (1000 / spacing);
                    pro_ast  = double.Parse(pro_ast.ToString("0"));
                }while (pro_ast < _ast);
                _ast = pro_ast;
                sw.WriteLine("Use {0} mm diameter bars at {1} mm c/c spacing     Marked as (1) in Drawing", dm, spacing);

                //Bars 12 mm Dia
                _bd1 = string.Format("Bars {0} mm Dia", dm);
                //at 120 mm c/c
                _sp1 = string.Format("at {0} mm c/c", spacing);


                sw.WriteLine("Provided Ast = {0} sq.mm", pro_ast);
                sw.WriteLine();

                double d2 = d - (dm / 2.0) - (dd / 2.0);
                sw.WriteLine("Effective depth for long span using {0} mm dia bars", dd);
                sw.WriteLine("     d2 = d - (dm / 2.0) - (dd / 2.0)");
                sw.WriteLine("        = {0} - {1:f0} - {2:f0}", d, (dm / 2.0), (dd / 2.0));
                sw.WriteLine("        = {0} mm", d2);
                sw.WriteLine();

                Ast = (ML * 10E5) / (sigma_st * j * d);
                Ast = double.Parse(Ast.ToString("0"));
                sw.WriteLine("Required steel along long span = Ast");
                sw.WriteLine("                               = (ML*10E5)/(σ_st*j*d)");
                sw.WriteLine("                               = ({0}*10E5)/({1}*{2}*{3})", ML, sigma_st, j, d);
                sw.WriteLine("                               = {0} sq.mm", Ast);
                sw.WriteLine();
                sw.WriteLine("Requirement of minimum reinforcement using HYSD bars is 0.15% of");

                Ast = 0.0015 * _Do * 1000 * 1000;
                Ast = double.Parse(Ast.ToString("0"));
                sw.WriteLine("cross section area of Slab, Ast = 0.0015*Do*1000*1000");
                sw.WriteLine("                                = 0.0015 * {0} * 1000 * 1000", _Do);
                sw.WriteLine("                                = {0} sq.mm", Ast);
                sw.WriteLine();
                sw.WriteLine();

                //spacing = 150;

                spacing = 140;
                do
                {
                    spacing += 10;
                    pro_ast  = (Math.PI * dd * dd / 4.0) * (1000 / spacing);
                    pro_ast  = double.Parse(pro_ast.ToString("0"));
                }while (pro_ast < Ast);

                Ast = Math.PI * dd * dd / 4.0 * (1000.0 / spacing);
                Ast = double.Parse(Ast.ToString("0"));
                sw.WriteLine("Use {0} mm diameter bars at {1} mm c/c spacing, Ast = {2} sq.mm.    Marked as (2) in Drawing", dd, spacing, Ast);
                //Bars 10 mm Dia
                _bd2 = string.Format("Bars {0} mm Dia", dd);
                //at 150 mm c/c
                _sp2 = string.Format("at {0} mm c/c", spacing);


                sw.WriteLine();
                sw.WriteLine();
                #endregion

                #region STEP 6 : CHECK FOR SHEAR STRESS
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("STEP 6 : CHECK FOR SHEAR STRESS");
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine();
                sw.WriteLine();

                double tau_v = (sh_frc_imp * 1000.0) / (1000.0 * d);
                tau_v = double.Parse(tau_v.ToString("0.000"));
                sw.WriteLine("Nominal Shear Stress = τ_v");
                sw.WriteLine("                     = (V * 1000.0) / (1000.0 * d)");
                sw.WriteLine("                     = ({0} * 1000.0) / (1000.0 * {1})", sh_frc_imp, d);
                sw.WriteLine("                     = {0} N/sq.mm", tau_v);
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("The permissible Shear Stress in slab = τ_c");
                sw.WriteLine("                                     = K1 * K2 * τ_co");
                sw.WriteLine();

                double _d = d / 1000.0;

                double K1 = 1.14 - 0.7 * _d;
                K1 = double.Parse(K1.ToString("0.000"));
                sw.WriteLine("Where K1 = 1.14-0.7*d");
                sw.WriteLine("         = 1.14-0.7*{0}", _d);
                sw.WriteLine("         = {0} ", _d);
                if (K1 < 0.5)
                {
                    K1 = 0.5;
                    sw.WriteLine("         = {0} ", _d);
                }
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("  and K2 = 0.5+0.25*p");
                sw.WriteLine();
                double p = (_ast * 100.0) / (1000.0 * d);
                p = double.Parse(p.ToString("0.000"));
                sw.WriteLine("      p = Ast*100/b*d");
                sw.WriteLine("        = {0}*100/(1000*{1})", _ast, d);
                sw.WriteLine("        = {0}", p);
                sw.WriteLine();
                double K2 = 0.5 + 0.25 * p;
                sw.WriteLine(" K2 = 0.5 + 0.25 * {0}", p);
                sw.WriteLine("    = {0}", K2);

                if (K2 < 1.0)
                {
                    K2 = 1.0;
                    sw.WriteLine("    = {0} (K2 <= 1.0) ", K2);
                }
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine();

                sw.WriteLine();
                sw.WriteLine("For M20 Grade Concrete, Refering to Table 2 (Given at the end of the Report)");
                int    con_grade = 20;
                double tau_co    = 0.34;
                switch (con_grade)
                {
                case 15:
                    tau_co = 0.28;
                    break;

                case 20:
                    tau_co = 0.34;
                    break;

                case 25:
                    tau_co = 0.40;
                    break;

                case 30:
                    tau_co = 0.45;
                    break;

                case 35:
                    tau_co = 0.50;
                    break;

                case 40:
                    tau_co = 0.50;
                    break;

                default:
                    tau_co = 0.50;
                    break;
                }



                sw.WriteLine("τ_co = 0.34 N/sq.mm");
                sw.WriteLine();

                double tau_c = K1 * K2 * tau_co;
                tau_c = double.Parse(tau_c.ToString("0.000"));
                sw.WriteLine("τ_c = K1 * K2 * τ_co");
                sw.WriteLine("    = {0} * {1} * {2}", K1, K2, tau_co);
                sw.WriteLine("    = {0} N/sq.mm.", tau_c);
                sw.WriteLine();

                if (tau_v < tau_c)
                {
                    sw.WriteLine("Since τ_v < τ_c the shear stresses are within Safe permissible limits.");
                }
                else
                {
                    sw.WriteLine("Since τ_v > τ_c the shear stresses are NOT within Safe permissible limits.");
                }
                sw.WriteLine();
                #endregion

                Write_Table_1(sw);

                #region TABLE 2 : BASIC VALUES OF SHEAR STRESS τ_co (IRC:21-1987)
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("------------------------------------------------------------");
                sw.WriteLine("TABLE 2 : BASIC VALUES OF SHEAR STRESS τ_co (IRC:21-1987)");
                sw.WriteLine("______________________________________________________________");
                sw.WriteLine("Concrete Grade   M 15    M 20    M 25    M 30    M 35    M 40");
                sw.WriteLine("-------------------------------------------------------------");
                sw.WriteLine("τ_co (N/sq.mm)   0.28    0.34    0.40    0.45    0.50    0.50");
                sw.WriteLine("______________________________________________________________");
                #endregion

                #region END OF REPORT
                sw.WriteLine();
                sw.WriteLine();
                sw.WriteLine("---------------------------------------------------------------------------");
                sw.WriteLine("---------------------       END OF REPORT        --------------------------");
                sw.WriteLine("---------------------------------------------------------------------------");
                #endregion
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : " + ex.ToString());
            }
            finally
            {
                sw.Flush();
                sw.Close();
            }
        }