Example #1
0
        /// <summary>Sample program calculating the charateristics of a glass panes</summary>
        private static void glassPanesTest()
        {
            //Create an array of the GlassPanes.Glass class
            GlassPanes.Pane[] panes = new GlassPanes.Pane[3];

            //Create a transparent glass (3mm).
            panes[0] = new GlassPanes.Pane(0.79, 0.07, 0.85, 0.07, 131);    //Inside of the window
            panes[1] = new GlassPanes.Pane(0.79, 0.07, 0.85, 0.07, 131);
            panes[2] = new GlassPanes.Pane(0.79, 0.07, 0.85, 0.07, 131);    //Outside of the window

            //Create an instance of GlassPanes class
            GlassPanes glass = new GlassPanes(panes);

            //Set heat transfer coefficients[W/(m2-K)] of air gap
            glass.SetHeatTransferCoefficientsOfGaps(0, 1 / 0.12);
            glass.SetHeatTransferCoefficientsOfGaps(1, 1 / 0.12);

            //Set overall heat transfer coefficients[W/(m2-K)] at the surface of glass.
            glass.SetInsideFilmCoefficient(9.26);      //Inside of the window
            glass.SetOutsideFilmCoefficient(23.26);    //Outside of the window

            //Check the characteristics of the glass panes.
            Console.WriteLine("Transparent glass(3mm) * 3");
            Console.WriteLine("Overall transmissivity[-] = " + glass.OverallTransmissivity.ToString("F2"));
            Console.WriteLine("Overall absorptivity[-] = " + glass.OverallAbsorptivity.ToString("F2"));
            Console.WriteLine("Heat transfer coefficient of glass[-] = " + glass.ThermalTransmittanceOfGlass.ToString("F2"));
            Console.WriteLine("Heat transmission coefficient[-] = " + glass.ThermalTransmittance.ToString("F2"));
            Console.WriteLine();

            //Change the outside glass pane to heat reflecting glass(6mm)
            panes[0] = new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.HeatReflectingGlass06mm);

            //Check the characteristics of a single glass pane.
            Console.WriteLine("Heat reflecting glass(6mm)");
            Console.WriteLine("Transmissivity[-] = " + panes[0].OuterSideTransmissivity.ToString("F2"));
            Console.WriteLine("absorptivity[-] = " + panes[0].OuterSideAbsorptivity.ToString("F2"));
            Console.WriteLine("Reflectivity[-] = " + panes[0].OuterSideReflectivity.ToString("F2"));
            Console.WriteLine();

            //Create an instance of GlassPanes class. Other properties are same as above
            glass = new GlassPanes(panes);
            glass.SetHeatTransferCoefficientsOfGaps(0, 1 / 0.12);
            glass.SetHeatTransferCoefficientsOfGaps(1, 1 / 0.12);
            glass.SetInsideFilmCoefficient(9.26);      //Inside of the window
            glass.SetOutsideFilmCoefficient(23.26);    //Outside of the window

            //Check the characteristics of the glass panes.
            Console.WriteLine("Heat reflecting glass(6mm) + Transparent glass(3mm) * 2");
            Console.WriteLine("Overall transmissivity[-] = " + glass.OverallTransmissivity.ToString("F2"));
            Console.WriteLine("Overall absorptivity[-] = " + glass.OverallAbsorptivity.ToString("F2"));
            Console.WriteLine("Heat transfer coefficient of glass[-] = " + glass.ThermalTransmittanceOfGlass.ToString("F2"));
            Console.WriteLine("Heat transmission coefficient[-] = " + glass.ThermalTransmittance.ToString("F2"));

            Console.Read();
        }