Beispiel #1
0
        //パソコンによる空気調和計算法 pp.180
        private static void makeRoom(double timeStep, out Zone room, out Wall exWall, out Wall inWall, out Wall ceiling, out Wall floor,
            out Sun sun, out Outdoor outdoor)
        {
            //太陽を作成//東京
            sun = new Sun(35, 139, 134);

            //外界を作成
            outdoor = new Outdoor();
            outdoor.Sun = sun;

            //室を作成
            room = new Zone();
            room.Volume = 353;
            room.SensibleHeatCapacity = 3500 * 1000;
            room.InitializeAirState(26, 0.018);
            room.VentilationVolume = room.Volume * 0.2;
            room.TimeStep = timeStep;

            WallLayers layers;
            WallLayers.Layer layer;

            //外壁を作成
            layers = new WallLayers();
            layer = new WallLayers.Layer(new WallMaterial("アルミ化粧板", 210, 2373), 0.002);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("中空層", 1d / 0.086d, 0), 0);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("ロックウール", 0.042, 84), 0.050);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("コンクリート", 1.4, 1934), 0.150);
            layers.AddLayer(layer);
            exWall = new Wall(layers);
            exWall.SurfaceArea = 22.4;
            exWall.TimeStep = timeStep;
            WallSurface ews = exWall.GetSurface(true);
            ews.SolarAbsorptance = 0.7;
            ews.LongWaveEmissivity = 0.9;
            ews.Albedo = 0.2;
            WallSurface iws = exWall.GetSurface(false);
            ews.FilmCoefficient = 23;
            iws.FilmCoefficient = 9.3;
            exWall.SetIncline(new Incline(Incline.Orientation.SW, 0.5 * Math.PI), true);
            room.AddSurface(iws);       //部屋に追加
            outdoor.AddWallSurface(ews);    //外界に追加
            room.SetShortWaveRadiationRate(iws, iws.Area);    //放射成分吸収比率を設定
            room.SetLongWaveRadiationRate(iws, iws.Area);    //放射成分吸収比率を設定

            //内壁を作成
            layers = new WallLayers();
            layer = new WallLayers.Layer(new WallMaterial("コンクリート", 1.4, 1934), 0.120, 2);
            layers.AddLayer(layer);
            inWall = new Wall(layers);
            inWall.SurfaceArea = 100.8;
            inWall.TimeStep = timeStep;
            iws = inWall.GetSurface(true);
            iws.FilmCoefficient = 9.3;
            room.AddSurface(iws);
            room.SetShortWaveRadiationRate(iws, iws.Area);    //放射成分吸収比率を設定
            room.SetLongWaveRadiationRate(iws, iws.Area);    //放射成分吸収比率を設定

            //床と天井を作成
            layers = new WallLayers();
            layer = new WallLayers.Layer(new WallMaterial("カーペット", 0.08, 318), 0.015);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("コンクリート", 1.4, 1934), 0.150);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("中空層", 1d / 0.086d, 0), 0);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("石膏ボード", 0.17, 1030), 0.012);
            layers.AddLayer(layer);
            //床
            floor = new Wall(layers);
            floor.SurfaceArea = 98;
            floor.TimeStep = timeStep;
            iws = floor.GetSurface(true);
            iws.FilmCoefficient = 9.3;
            room.AddSurface(iws);
            room.SetShortWaveRadiationRate(iws, iws.Area * 2.0);    //放射成分吸収比率を設定**多め
            room.SetLongWaveRadiationRate(iws, iws.Area * 2.0);    //放射成分吸収比率を設定**多め
            //天井
            ceiling = new Wall(layers);
            ceiling.SurfaceArea = 98;
            ceiling.TimeStep = timeStep;
            iws = ceiling.GetSurface(false);
            iws.FilmCoefficient = 9.3;
            room.AddSurface(iws);
            room.SetShortWaveRadiationRate(iws, iws.Area);    //放射成分吸収比率を設定
            room.SetLongWaveRadiationRate(iws, iws.Area);    //放射成分吸収比率を設定

            //室温・隣室温度を設定
            inWall.AirTemperature2 = ceiling.AirTemperature1 = floor.AirTemperature2 = 25;

            //窓を作成
            GlassPanes glassPanes = new GlassPanes(0.79, 0.04, 190);
            Window window = new Window(glassPanes);
            WindowSurface ws = window.GetSurface(true);
            ws.FilmCoefficient = 23;
            ws.Albedo = 0.2;
            window.SurfaceArea = 28;
            window.OutSideIncline = new Incline(Incline.Orientation.SW, 0.5 * Math.PI);
            ws = window.GetSurface(false);
            ws.FilmCoefficient = 9.3;

            room.AddWindow(window);
            outdoor.AddWindow(window);
            window.ShadowRate = 0;
            room.SetShortWaveRadiationRate(window, window.SurfaceArea);    //放射成分吸収比率を設定
            room.SetLongWaveRadiationRate(window, window.SurfaceArea);    //放射成分吸収比率を設定

            //壁体初期化
            inWall.InitializeTemperature(22);
            exWall.InitializeTemperature(22);
            floor.InitializeTemperature(22);
            ceiling.InitializeTemperature(22);
        }
Beispiel #2
0
        /// <summary>多数室テスト</summary>
        /// <remarks>
        /// 東西2室で壁・窓表面の相互放射を考慮した計算を行う。
        /// 東側は南北で2ゾーンに分割する。
        /// 壁体は全て200mmのコンクリートとする。
        /// 幅×奥行き×高さ = 8m×7m×3mとする。
        /// 地面(床)は考慮しない。
        /// 
        ///        N1           N2
        ///   -------------------------
        ///   |           |           |
        ///   |           |    znE1   | E1
        ///   |           |           |
        /// W |    znW    |- - - - - -|
        ///   |           |           |
        ///   |           |    znE2   | E2
        ///   |           |           |
        ///   ----+++++----------------
        ///        S1           S2
        /// 
        /// </remarks>
        private static void multiRoomTest()
        {
            const double TIME_STEP = 3600;
            const double INIT_TEMP = 15;
            const double H_GAIN = 0;
            const int ITER_NUM = 100;
            const double W_AI = 8;
            const double E_AI = 9.3;
            const double W_AO = 20;
            const double E_AO = 23;
            bool USE_TUBE = false;

            //モデル作成処理*********************************************************

            //屋外
            Outdoor outDoor = new Outdoor();
            Sun sun = new Sun(Sun.City.Tokyo);
            sun.Update(new DateTime(2001, 1, 1, 0, 0, 0));
            outDoor.Sun = sun;

            //壁リスト
            Wall[] walls = new Wall[12];

            //ゾーンを作成
            Zone znW = new Zone();
            znW.Volume = 7 * 4 * 3;
            znW.SensibleHeatCapacity = znW.Volume * 12000;//単位容積あたり12kJ
            Zone znE1 = new Zone();
            znE1.Volume = 3.5 * 4 * 3;
            znE1.SensibleHeatCapacity = znE1.Volume * 12000;//単位容積あたり12kJ
            Zone znE2 = new Zone();
            znE2.Volume = 3.5 * 4 * 3;
            znE2.SensibleHeatCapacity = znE2.Volume * 12000;//単位容積あたり12kJ
            znW.TimeStep = znE1.TimeStep = znE2.TimeStep = TIME_STEP;

            //壁構成を作成(コンクリート)
            WallLayers layers;
            WallLayers.Layer layer;
            layers = new WallLayers();
            layer = new WallLayers.Layer(new WallMaterial("コンクリート", 1.4, 1934), 0.150, 2);
            layers.AddLayer(layer);

            //西外壁
            walls[0] = new Wall(layers);
            walls[0].SurfaceArea = 7 * 3;
            WallSurface ews = walls[0].GetSurface(true);
            WallSurface iws = walls[0].GetSurface(false);
            ews.FilmCoefficient = W_AO;
            iws.FilmCoefficient = W_AI;
            walls[0].SetIncline(new Incline(Incline.Orientation.W, 0.5 * Math.PI), true);
            znW.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //東外壁1
            walls[1] = new Wall(layers);
            walls[1].SurfaceArea = 3.5 * 3;
            ews = walls[1].GetSurface(true);
            iws = walls[1].GetSurface(false);
            ews.FilmCoefficient = E_AO;
            iws.FilmCoefficient = E_AI;
            walls[1].SetIncline(new Incline(Incline.Orientation.E, 0.5 * Math.PI), true);
            znE1.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //東外壁2
            walls[2] = new Wall(layers);
            walls[2].SurfaceArea = 3.5 * 3;
            ews = walls[2].GetSurface(true);
            iws = walls[2].GetSurface(false);
            ews.FilmCoefficient = E_AO;
            iws.FilmCoefficient = E_AI;
            walls[2].SetIncline(new Incline(Incline.Orientation.E, 0.5 * Math.PI), true);
            znE2.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //北外壁1
            walls[3] = new Wall(layers);
            walls[3].SurfaceArea = 4 * 3;
            ews = walls[3].GetSurface(true);
            iws = walls[3].GetSurface(false);
            ews.FilmCoefficient = W_AO;
            iws.FilmCoefficient = W_AI;
            walls[3].SetIncline(new Incline(Incline.Orientation.N, 0.5 * Math.PI), true);
            znW.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //北外壁2
            walls[4] = new Wall(layers);
            walls[4].SurfaceArea = 4 * 3;
            ews = walls[4].GetSurface(true);
            iws = walls[4].GetSurface(false);
            ews.FilmCoefficient = E_AO;
            iws.FilmCoefficient = E_AI;
            walls[4].SetIncline(new Incline(Incline.Orientation.N, 0.5 * Math.PI), true);
            znE1.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //南外壁1
            walls[5] = new Wall(layers);
            walls[5].SurfaceArea = 4 * 3;
            ews = walls[5].GetSurface(true);
            iws = walls[5].GetSurface(false);
            ews.FilmCoefficient = W_AO;
            iws.FilmCoefficient = W_AI;
            walls[5].SetIncline(new Incline(Incline.Orientation.S, 0.5 * Math.PI), true);
            znW.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //南外壁2
            walls[6] = new Wall(layers);
            walls[6].SurfaceArea = 4 * 3;
            ews = walls[6].GetSurface(true);
            iws = walls[6].GetSurface(false);
            ews.FilmCoefficient = E_AO;
            iws.FilmCoefficient = E_AI;
            walls[6].SetIncline(new Incline(Incline.Orientation.S, 0.5 * Math.PI), true);
            znE2.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //屋根1
            walls[7] = new Wall(layers);
            walls[7].SurfaceArea = 4 * 7;
            ews = walls[7].GetSurface(true);
            iws = walls[7].GetSurface(false);
            ews.FilmCoefficient = W_AO;
            iws.FilmCoefficient = W_AI;
            walls[7].SetIncline(new Incline(Incline.Orientation.N, 0), true);
            znW.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //屋根2
            walls[8] = new Wall(layers);
            walls[8].SurfaceArea = 4 * 3.5;
            ews = walls[8].GetSurface(true);
            iws = walls[8].GetSurface(false);
            ews.FilmCoefficient = E_AO;
            iws.FilmCoefficient = E_AI;
            walls[8].SetIncline(new Incline(Incline.Orientation.N, 0), true);
            znE1.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //屋根3
            walls[9] = new Wall(layers);
            walls[9].SurfaceArea = 4 * 3.5;
            ews = walls[9].GetSurface(true);
            iws = walls[9].GetSurface(false);
            ews.FilmCoefficient = E_AO;
            iws.FilmCoefficient = E_AI;
            walls[9].SetIncline(new Incline(Incline.Orientation.N, 0), true);
            znE2.AddSurface(iws);
            outDoor.AddWallSurface(ews);

            //内壁1
            walls[10] = new Wall(layers);
            walls[10].SurfaceArea = 7 * 3.5;
            ews = walls[10].GetSurface(true);
            iws = walls[10].GetSurface(false);
            ews.FilmCoefficient = E_AI;
            iws.FilmCoefficient = W_AI;
            znW.AddSurface(iws);
            znE1.AddSurface(ews);

            //内壁2
            walls[11] = new Wall(layers);
            walls[11].SurfaceArea = 7 * 3.5;
            ews = walls[11].GetSurface(true);
            iws = walls[11].GetSurface(false);
            ews.FilmCoefficient = E_AI;
            iws.FilmCoefficient = W_AI;
            znW.AddSurface(iws);
            znE2.AddSurface(ews);

            //南窓
            GlassPanes gPanes = new GlassPanes(new GlassPanes.Pane[] {
                new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.TransparentGlass03mm),
                new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.HeatAbsorbingGlass03mm)
            });
            //外側ブラインド
            GlassPanes gPanesWithBlind = new GlassPanes(new GlassPanes.Pane[] {
                new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.TransparentGlass03mm),
                new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.HeatAbsorbingGlass03mm),
                new GlassPanes.Pane(0.05, 0.35, 9999)
            });
            Window window = new Window(gPanes, new Incline(Incline.Orientation.S, 0.5 * Math.PI));
            window.SurfaceArea = 1 * 3;
            WindowSurface ws1 = window.GetSurface(true);
            WindowSurface ws2 = window.GetSurface(false);
            ws1.LongWaveEmissivity = 0.7;
            ws1.FilmCoefficient = W_AO;
            ws2.FilmCoefficient = W_AI;
            znW.AddWindow(window);
            outDoor.AddWindow(window);

            /*//debug
            for (int i = 0; i < walls.Length; i++)
            {
                walls[i].GetSurface(true).ConvectiveRate = 0;
                walls[i].GetSurface(false).ConvectiveRate = 0;
            }
            //window.GetSurface(false).ConvectiveRate = 0;
            //debug*/

            //発熱体*****************************************************************
            znW.AddHeatGain(new ConstantHeatGain(0, H_GAIN, 0));

            //制御*******************************************************************
            znE1.ControlDrybulbTemperature = false;
            znE1.DrybulbTemperatureSetPoint = 20;
            znE2.ControlDrybulbTemperature = false;
            znE2.DrybulbTemperatureSetPoint = 20;
            znW.ControlDrybulbTemperature = false;
            znW.DrybulbTemperatureSetPoint = 20;

            //外界条件設定***********************************************************
            outDoor.AirState = new MoistAir(30, 0.020);
            outDoor.SetWallSurfaceBoundaryState();

            //天井に冷水配管を設置
            if (USE_TUBE)
            {
                Tube tube = new Tube(0.999, 0.275, 4186);
                tube.SetFlowRate(0.222);
                tube.FluidTemperature = 10;
                walls[7].AddTube(tube, 0);
                walls[8].AddTube(tube, 0);
                walls[9].AddTube(tube, 0);
            }

            //室温・壁温初期化*******************************************************
            for (int i = 0; i < walls.Length; i++) walls[i].InitializeTemperature(INIT_TEMP);
            znE1.InitializeAirState(INIT_TEMP, 0.015);
            znE2.InitializeAirState(INIT_TEMP, 0.015);
            znW.InitializeAirState(INIT_TEMP, 0.015);

            //多数室オブジェクトを作成・初期化
            Room[] rooms = new Room[2];
            rooms[0] = new Room(new Zone[] { znW });
            rooms[1] = new Room(new Zone[] { znE1, znE2 });
            MultiRoom mRoom = new MultiRoom(rooms);
            mRoom.SetTimeStep(TIME_STEP);
            //初期化
            mRoom.Initialize();

            //室間換気設定***********************************************************
            znW.VentilationVolume = znW.Volume * 0;
            znE1.VentilationVolume = znE1.Volume * 0;
            znE2.VentilationVolume = znE2.Volume * 0;
            znW.VentilationAirState = outDoor.AirState;
            znE1.VentilationAirState = outDoor.AirState;
            znE2.VentilationAirState = outDoor.AirState;
            //mRoom.SetAirFlow(znE1, znE2, 10);
            //mRoom.SetAirFlow(znE2, znW, 10);
            //mRoom.SetAirFlow(znW, znE1, 10);

            //熱収支確認用変数*******************************************************
            double heatTransferToExWall = 0;
            double heatTransferToTube = 0;
            double heatTransferToWindow = 0;
            double oaLoad = 0;

            //外気データ読み込み*****************************************************
            StreamReader sReader = new StreamReader("BESTestWeather.csv");
            sReader.ReadLine();

            //室温更新テスト*********************************************************
            for (int i = 0; i < ITER_NUM; i++)
            {
                //外気条件設定
                string[] wData = sReader.ReadLine().Split(',');
                outDoor.AirState = new MoistAir(double.Parse(wData[2]), double.Parse(wData[3]));
                sun.DirectNormalRadiation = double.Parse(wData[4]);
                sun.GlobalHorizontalRadiation = double.Parse(wData[5]);
                sun.DiffuseHorizontalRadiation = double.Parse(wData[6]);
                outDoor.NocturnalRadiation = double.Parse(wData[8]);

                //12~13時は外側ブラインドを利用
                if (sun.CurrentDateTime.Hour == 12 && sun.CurrentDateTime.Minute == 0) window.Initialize(gPanesWithBlind);
                if (sun.CurrentDateTime.Hour == 13 && sun.CurrentDateTime.Minute == 0) window.Initialize(gPanes);

                Console.WriteLine(
                    znW.CurrentDrybulbTemperature.ToString("F3").PadLeft(5) + " | "
                    + znE1.CurrentDrybulbTemperature.ToString("F3").PadLeft(5) + " | "
                    + znE2.CurrentDrybulbTemperature.ToString("F3").PadLeft(5) + " | "
                    + znW.CurrentSensibleHeatLoad.ToString("F2").PadLeft(5) + " | "
                    + znE1.CurrentSensibleHeatLoad.ToString("F2").PadLeft(5) + " | "
                    + znE2.CurrentSensibleHeatLoad.ToString("F2").PadLeft(5) + " | "
                    + walls[0].GetWallTemprature(true).ToString("F2").PadLeft(5) + " | "
                    + walls[0].GetWallTemprature(false).ToString("F2").PadLeft(5) + " | "
                    );

                //壁体状態更新
                for (int j = 0; j < walls.Length; j++) walls[j].Update();
                //外気条件を壁に設定
                outDoor.SetWallSurfaceBoundaryState();
                //室状態更新
                mRoom.UpdateRoomTemperatures();
                mRoom.UpdateRoomHumidities();

                //壁体への熱移動量を積算
                for (int j = 0; j < 10; j++) heatTransferToExWall += walls[j].GetHeatTransfer(true);
                //窓面への熱移動量を積算
                heatTransferToWindow += window.AbsorbedHeatGain + window.TransferHeatGain + window.TransmissionHeatGain;
                heatTransferToWindow -= rooms[0].TransmissionHeatLossFromWindow + rooms[1].TransmissionHeatLossFromWindow;
                //チューブへの熱移動量を積算
                heatTransferToTube += walls[7].GetHeatTransferToTube(0) + walls[8].GetHeatTransferToTube(0) + walls[9].GetHeatTransferToTube(0);
                //外気負荷を計算
                Zone[] zns = new Zone[] { znE1, znE2, znW };
                for (int j = 0; j < zns.Length; j++)
                {
                    if (zns[j].VentilationVolume != 0)
                    {
                        double airDS = 1d / (MoistAir.GetAirStateFromDBHR(zns[j].CurrentDrybulbTemperature, zns[j].CurrentHumidityRatio, MoistAir.Property.SpecificVolume));
                        double cpAir = MoistAir.GetSpecificHeat(zns[j].CurrentHumidityRatio);
                        oaLoad += zns[j].VentilationVolume * airDS * cpAir * (zns[j].VentilationAirState.DryBulbTemperature - zns[j].CurrentDrybulbTemperature);
                    }
                }

                //日時更新
                sun.Update(sun.CurrentDateTime.AddSeconds(TIME_STEP));
            }
            sReader.Close();

            //熱収支を書き出し
            //屋外から壁体への熱移動量[MJ]
            heatTransferToExWall *= TIME_STEP / 1000000d;
            //窓面への熱移動量[MJ]
            heatTransferToWindow *= TIME_STEP / 1000000d;
            //壁体からチューブへの熱移動量[MJ]
            heatTransferToTube *= TIME_STEP / 1000000d;
            //外気負荷[MJ]
            oaLoad *= TIME_STEP / 1000000d / 3.6;
            //壁体蓄熱量[MJ]
            double wallHeatStorage = 0;
            for (int i = 0; i < walls.Length; i++) wallHeatStorage += walls[i].GetHeatStorage(INIT_TEMP);
            wallHeatStorage /= 1000d;
            //室蓄熱量[MJ]
            double zoneHeatStorage = (znE1.GetHeatStorage(INIT_TEMP) + znE2.GetHeatStorage(INIT_TEMP) + znW.GetHeatStorage(INIT_TEMP)) / 1000d;
            //発熱量
            double heatGain = (H_GAIN * TIME_STEP * ITER_NUM) / 1000000;

            //書き出し
            Console.WriteLine("壁体への熱移動[MJ] | 窓面への熱移動[MJ] | 壁体の蓄熱量[MJ] | 室の蓄熱量[MJ] | 発熱量[MJ] | チューブへの熱移動[MJ] | 外気負荷[MJ]");
            Console.WriteLine(heatTransferToExWall.ToString("F2") + " | " +  heatTransferToWindow.ToString("F2") + " | " +
                wallHeatStorage.ToString("F2") + " | " + zoneHeatStorage.ToString("F2") + " | " + heatGain + " | " + heatTransferToTube.ToString("F2") + " | " + oaLoad.ToString("F2"));
            Console.WriteLine("熱収支[MJ] = " + (heatTransferToExWall + heatTransferToWindow - heatTransferToTube - wallHeatStorage - zoneHeatStorage + heatGain + oaLoad));

            Console.Read();
        }
Beispiel #3
0
        /// <summary>壁熱貫流テスト</summary>
        private static void wallHeatTransferTest()
        {
            WallLayers layers = new WallLayers();
            WallLayers.Layer layer;
            layer = new WallLayers.Layer(new WallMaterial("合板", 0.19, 716), 0.025);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("コンクリート", 1.4, 1934), 0.120);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("空気層", 1d / 0.086, 0), 0.020);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("ロックウール", 0.042, 84), 0.050);
            layers.AddLayer(layer);
            Wall wall = new Wall(layers);

            wall.TimeStep = 3600;
            wall.AirTemperature1 = 20;
            wall.AirTemperature2 = 10;
            wall.InitializeTemperature(10); //壁体内温度は10℃均一とする
            wall.SurfaceArea = 1;

            Console.WriteLine("温度分布の推移");
            Console.WriteLine("合板, コンクリート, 空気層, ロックウール");
            double[] temps;
            for (int i = 0; i < 24; i++)
            {
                wall.Update();
                temps = wall.GetTemperatures();
                Console.Write((i + 1).ToString("F0").PadLeft(2) + "時間後 | ");
                for (int j = 0; j < temps.Length - 1; j++) Console.Write(((temps[j] + temps[j + 1]) / 2d).ToString("F1") + " | ");
                Console.WriteLine();
            }

            //定常状態まで進める
            for (int i = 0; i < 1000; i++) wall.Update();
            Console.WriteLine();
            Console.WriteLine("定常状態の温度分布");
            temps = wall.GetTemperatures();
            for (int j = 0; j < temps.Length - 1; j++) Console.Write(((temps[j] + temps[j + 1]) / 2d).ToString("F1") + " | ");

            Console.WriteLine();
            Console.WriteLine("定常状態の熱流1: " + wall.GetHeatTransfer(true).ToString("F1"));
            Console.WriteLine("定常状態の熱流2: " + wall.GetHeatTransfer(false).ToString("F1"));
            Console.WriteLine("定常状態の熱流3: " + wall.GetStaticHeatTransfer().ToString("F1"));

            Console.Read();
        }
Beispiel #4
0
        /// <summary>壁熱貫流テスト(潜熱蓄熱材)</summary>
        private static void wallHeatTransferTest4()
        {
            WallLayers layers = new WallLayers();
            WallLayers.Layer layer;
            layer = new WallLayers.Layer(new WallMaterial("コンクリート", 1.4, 1934), 0.060);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("潜熱蓄熱材A", 1.4, 1934), 0.030);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("潜熱蓄熱材B", 1.4, 1934), 0.030);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("コンクリート", 1.4, 1934), 0.060);
            layers.AddLayer(layer);
            Wall wall = new Wall(layers);

            LatentHeatStorageMaterial material = new LatentHeatStorageMaterial(11, new WallMaterial("潜熱蓄熱材A1", 1.4, 1934));
            material.AddMaterial(12, new WallMaterial("潜熱蓄熱材A2", 1.4, 1934 * 40));
            material.AddMaterial(100, new WallMaterial("潜熱蓄熱材A3", 1.4, 1934));
            wall.SetLatentHeatStorageMaterial(1, material);

            material = new LatentHeatStorageMaterial(13, new WallMaterial("潜熱蓄熱材B1", 1.4, 1934));
            material.AddMaterial(14, new WallMaterial("潜熱蓄熱材B2", 1.4, 1934 * 40));
            material.AddMaterial(100, new WallMaterial("潜熱蓄熱材B3", 1.4, 1934));
            wall.SetLatentHeatStorageMaterial(2, material);

            wall.AirTemperature1 = 20;
            wall.AirTemperature2 = 10;
            wall.SurfaceArea = 175;
            wall.GetSurface(true).ConvectiveRate = 1;
            wall.GetSurface(false).ConvectiveRate = 1;
            wall.TimeStep = 3600;

            StreamWriter sWriter = new StreamWriter("test.csv");
            wall.InitializeTemperature(10);
            Console.WriteLine("壁面温度[C]");
            for (int kkk = 0; kkk < 4; kkk++)
            {
                if (kkk % 2 == 0) wall.AirTemperature1 = 20;
                else wall.AirTemperature1 = 10;
                for (int i = 0; i < 24; i++)
                {
                    wall.Update();
                    double[] tmp = wall.GetTemperatures();
                    for (int j = 0; j < tmp.Length; j++) Console.Write(tmp[j].ToString("F2").PadLeft(5) + " | ");
                    Console.WriteLine();

                    for (int j = 0; j < tmp.Length; j++) sWriter.Write(tmp[j].ToString("F2").PadLeft(5) + " , ");
                    sWriter.WriteLine();
                }
            }
            sWriter.Close();

            Console.Read();
        }
Beispiel #5
0
        /// <summary>壁構成作成処理</summary>
        /// <param name="isLightWeight">軽い壁構成か否か</param>
        /// <param name="exteriorWallLayer">外壁構成</param>
        /// <param name="floorWallLayer">床構成</param>
        /// <param name="roofWallLayer">天井構成</param>
        private static void makeWallLayer(bool isLightWeight,
            out WallLayers exteriorWallLayer, out WallLayers floorWallLayer, out WallLayers roofWallLayer)
        {
            WallLayers.Layer layer;

            exteriorWallLayer = new WallLayers("Exterior");
            floorWallLayer = new WallLayers("Floor");
            roofWallLayer = new WallLayers("Roof");

            if (isLightWeight)
            {
                //外壁構成
                layer = new WallLayers.Layer(new WallMaterial("Plasterboard", 0.160, 950d * 840d / 1000d), 0.012);
                exteriorWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Fibreglas quilt", 0.04, 12d * 840d / 1000d), 0.066);
                exteriorWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Wood Siding", 0.140, 530d * 900d / 1000d), 0.009);
                exteriorWallLayer.AddLayer(layer);

                //床構成
                layer = new WallLayers.Layer(new WallMaterial("Timber flooring", 0.140, 650d * 1200d / 1000d), 0.025);
                floorWallLayer.AddLayer(layer);
                //layer = new WallLayers.Layer(new WallMaterial("Insulation", 0.04, 0), 0);
                //floorWallLayer.AddLayer(layer);

                //天井構成
                layer = new WallLayers.Layer(new WallMaterial("Plasterboard", 0.160, 950d * 840d / 1000d), 0.010);
                roofWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Fibreglas quilt", 0.04, 12d * 840d / 1000d), 0.1118);
                roofWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Roofdeck", 0.140, 530d * 900d / 1000d), 0.019);
                roofWallLayer.AddLayer(layer);
            }
            else
            {
                //外壁構成
                layer = new WallLayers.Layer(new WallMaterial("Concrete Block", 0.510, 1400d * 1000d / 1000d), 0.1, 3);
                exteriorWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Foam Insulation", 0.040, 10d * 1400d / 1000d), 0.0615);
                exteriorWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Wood Siding", 0.140, 530d * 900d / 1000d), 0.009);
                exteriorWallLayer.AddLayer(layer);

                //床構成
                layer = new WallLayers.Layer(new WallMaterial("Concrete Slab", 1.130, 1400d * 1000d / 1000d), 0.08, 3);
                floorWallLayer.AddLayer(layer);
                //layer = new WallLayers.Layer(new WallMaterial("Insulation", 0.04, 0), 0);
                //floorWallLayer.AddLayer(layer);

                //天井構成
                layer = new WallLayers.Layer(new WallMaterial("Plasterboard", 0.160, 950d * 840d / 1000d), 0.010);
                roofWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Fibreglas quilt", 0.04, 12d * 840d / 1000d), 0.1118);
                roofWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Roofdeck", 0.140, 530d * 900d / 1000d), 0.019);
                roofWallLayer.AddLayer(layer);
            }
        }
Beispiel #6
0
        private static void makeSunZoneBuilding(out Zone[] rooms, out Wall[] walls, out Window[] windows, out Outdoor[] outdoor, out Sun sun)
        {
            const double ai = 8.29;
            const double ao = 29.3;
            const double aowin = 21;
            const double extswEmissivity = 0.6d;
            const double extlwEmissivity = 0.9d;

            //室を作成
            rooms = new Zone[2];

            //BackZoneを作成
            rooms[0] = new Zone();
            rooms[0].Volume = 8 * 6 * 2.7;  //室容積[m3]
            //内部負荷[W]
            rooms[0].AddHeatGain(new ConstantHeatGain(200 * 0.4, 200 * 0.6, 0));
            if (CALCULATE_ELEVATION_EFFECT) rooms[0].AtmosphericPressure = MoistAir.GetAtmosphericPressure(1609);
            else rooms[0].AtmosphericPressure = 101.325d;
            rooms[0].TimeStep = 3600;
            rooms[0].InitializeAirState(20, 0.01);
            rooms[0].FilmCoefficient = ai;
            //対流成分
            rooms[0].SetConvectiveRate(3.16 / ai);
            //漏気量
            rooms[0].VentilationVolume = rooms[0].Volume * 0.5;
            if (!CALCULATE_ELEVATION_EFFECT) rooms[0].Volume *= 0.82;

            //SunZoneを作成
            rooms[1] = new Zone();
            rooms[1].Volume = 8 * 2 * 2.7;  //室容積[m3]
            if (CALCULATE_ELEVATION_EFFECT) rooms[1].AtmosphericPressure = MoistAir.GetAtmosphericPressure(1609);
            else rooms[1].AtmosphericPressure = 101.325d;
            rooms[1].TimeStep = 3600;
            rooms[1].InitializeAirState(20, 0.01);
            rooms[1].FilmCoefficient = ai;
            //対流成分
            rooms[1].SetConvectiveRate(3.16 / ai);
            //漏気量
            rooms[1].VentilationVolume = rooms[1].Volume * 0.5;
            if (!CALCULATE_ELEVATION_EFFECT) rooms[1].Volume *= 0.82;

            //外界を作成
            outdoor = new Outdoor[2];
            outdoor[0] = new Outdoor();
            outdoor[0].GroundTemperature = 10;
            sun = new Sun(39.8, 360 - 104.9, 360 - 105);
            outdoor[0].Sun = sun;

            //壁構成を作成
            WallLayers exwLL, flwLL, rfwLL, exwLH, flwLH, rfwLH;
            makeWallLayer(true, out exwLL, out flwLL, out rfwLL);
            makeWallLayer(true, out exwLH, out flwLH, out rfwLH);

            //壁表面を作成
            WallSurface ews, iws;

            //壁を作成
            walls = new Wall[11];

            //屋根を作成1
            walls[0] = new Wall(rfwLL);
            walls[0].Name = "屋根";
            walls[0].SurfaceArea = 48;
            walls[0].SetIncline(new Incline(Incline.Orientation.N, 0), false);
            walls[0].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[0].SetFilmCoefficient(ao, false);//外表面総合熱伝達率[W/(m2K)]
            walls[0].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[0].GetSurface(true);
            ews = walls[0].GetSurface(false);
            ews.SolarAbsorptance = extswEmissivity;
            ews.LongWaveEmissivity = extlwEmissivity;
            rooms[0].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //屋根を作成2
            walls[1] = new Wall(rfwLH);
            walls[1].Name = "屋根";
            walls[1].SurfaceArea = 16;
            walls[1].SetIncline(new Incline(Incline.Orientation.N, 0), false);
            walls[1].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[1].SetFilmCoefficient(ao, false);//外表面総合熱伝達率[W/(m2K)]
            walls[1].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[1].GetSurface(true);
            ews = walls[1].GetSurface(false);
            ews.SolarAbsorptance = extswEmissivity;
            ews.LongWaveEmissivity = extlwEmissivity;
            rooms[1].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //床を作成1
            walls[2] = new Wall(flwLL);
            walls[2].Name = "床";
            walls[2].SurfaceArea = 48;
            walls[2].SetIncline(new Incline(Incline.Orientation.N, Math.PI), false);
            walls[2].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[2].SetFilmCoefficient(0.04, false);//外表面総合熱伝達率[W/(m2K)]//地面絶縁体
            walls[2].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[2].GetSurface(true);
            ews = walls[2].GetSurface(false);
            rooms[0].AddSurface(iws);
            outdoor[0].AddGroundWallSurface(ews);

            //床を作成2
            walls[3] = new Wall(flwLH);
            walls[3].Name = "床";
            walls[3].SurfaceArea = 8 * 2;
            walls[3].SetIncline(new Incline(Incline.Orientation.N, Math.PI), false);
            walls[3].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[3].SetFilmCoefficient(0.04, false);//外表面総合熱伝達率[W/(m2K)]//地面絶縁体
            walls[3].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[3].GetSurface(true);
            ews = walls[3].GetSurface(false);
            rooms[1].AddSurface(iws);
            outdoor[0].AddGroundWallSurface(ews);

            //北外壁を作成
            walls[4] = new Wall(exwLL);
            walls[4].Name = "北外壁";
            walls[4].SurfaceArea = 8 * 2.7;
            walls[4].SetIncline(new Incline(Incline.Orientation.N, 0.5 * Math.PI), false);
            walls[4].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[4].SetFilmCoefficient(ao, false);//外表面総合熱伝達率[W/(m2K)]
            walls[4].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[4].GetSurface(true);
            ews = walls[4].GetSurface(false);
            ews.SolarAbsorptance = extswEmissivity;
            ews.LongWaveEmissivity = extlwEmissivity;
            ews.Albedo = 0.2;
            rooms[0].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //南外壁を作成
            walls[5] = new Wall(exwLH);
            walls[5].Name = "南外壁";
            walls[5].SurfaceArea = 8 * 2.7 - 6d - 6d;
            walls[5].SetIncline(new Incline(Incline.Orientation.S, 0.5 * Math.PI), false);
            walls[5].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[5].SetFilmCoefficient(ao, false);//外表面総合熱伝達率[W/(m2K)]
            walls[5].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[5].GetSurface(true);
            ews = walls[5].GetSurface(false);
            ews.SolarAbsorptance = extswEmissivity;
            ews.LongWaveEmissivity = extlwEmissivity;
            ews.Albedo = 0.2;
            rooms[1].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //東外壁を作成1
            walls[6] = new Wall(exwLL);
            walls[6].Name = "東外壁";
            walls[6].SurfaceArea = 6 * 2.7;
            walls[6].SetIncline(new Incline(Incline.Orientation.E, 0.5 * Math.PI), false);
            walls[6].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[6].SetFilmCoefficient(ao, false);//外表面総合熱伝達率[W/(m2K)]
            walls[6].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[6].GetSurface(true);
            ews = walls[6].GetSurface(false);
            ews.SolarAbsorptance = extswEmissivity;
            ews.LongWaveEmissivity = extlwEmissivity;
            ews.Albedo = 0.2;
            rooms[0].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //東外壁を作成2
            walls[7] = new Wall(exwLH);
            walls[7].Name = "東外壁";
            walls[7].SurfaceArea = 2 * 2.7;
            walls[7].SetIncline(new Incline(Incline.Orientation.E, 0.5 * Math.PI), false);
            walls[7].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[7].SetFilmCoefficient(ao, false);//外表面総合熱伝達率[W/(m2K)]
            walls[7].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[7].GetSurface(true);
            ews = walls[7].GetSurface(false);
            ews.SolarAbsorptance = extswEmissivity;
            ews.LongWaveEmissivity = extlwEmissivity;
            ews.Albedo = 0.2;
            rooms[1].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //西外壁を作成1
            walls[8] = new Wall(exwLL);
            walls[8].Name = "西外壁";
            walls[8].SurfaceArea = 6 * 2.7;
            walls[8].SetIncline(new Incline(Incline.Orientation.W, 0.5 * Math.PI), false);
            walls[8].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[8].SetFilmCoefficient(ao, false);//外表面総合熱伝達率[W/(m2K)]
            walls[8].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[8].GetSurface(true);
            ews = walls[8].GetSurface(false);
            ews.SolarAbsorptance = extswEmissivity;
            ews.LongWaveEmissivity = extlwEmissivity;
            ews.Albedo = 0.2;
            rooms[0].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //西外壁を作成2
            walls[9] = new Wall(exwLH);
            walls[9].Name = "西外壁";
            walls[9].SurfaceArea = 2 * 2.7;
            walls[9].SetIncline(new Incline(Incline.Orientation.W, 0.5 * Math.PI), false);
            walls[9].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[9].SetFilmCoefficient(ao, false);//外表面総合熱伝達率[W/(m2K)]
            walls[9].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[9].GetSurface(true);
            ews = walls[9].GetSurface(false);
            ews.SolarAbsorptance = extswEmissivity;
            ews.LongWaveEmissivity = extlwEmissivity;
            ews.Albedo = 0.2;
            rooms[1].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //共用壁を作成
            WallLayers.Layer layer = new WallLayers.Layer(new WallMaterial("CommonWall", 0.510, 1400d * 1000d / 1000d), 0.2, 4);
            WallLayers cWL = new WallLayers();
            cWL.AddLayer(layer);
            walls[10] = new Wall(cWL);
            walls[10].Name = "共用壁";
            walls[10].SurfaceArea = 8 * 2.7;
            walls[10].SetIncline(new Incline(Incline.Orientation.S, 0.5 * Math.PI), false);
            walls[10].SetFilmCoefficient(ai, true); //内表面総合熱伝達率[W/(m2K)]
            walls[10].SetFilmCoefficient(ai, false);//内表面総合熱伝達率[W/(m2K)]
            walls[10].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[10].GetSurface(true);
            ews = walls[10].GetSurface(false);
            rooms[0].AddSurface(iws);
            rooms[1].AddSurface(ews);

            //窓の作成
            GlassPanes glassPane = new GlassPanes(0.74745, 0.043078, 1d / (1d / 333 + 1d / 333 + 1d / 6.297));
            //glassPane.LongWaveEmissivity = extlwEmissivity;
            //glassPane.ConvectiveRate = 3.16 / ai;
            glassPane.AngularDependenceCoefficients = new double[] { 1.3930, 5.5401, -19.5736, 19.0379 };
            Window window1 = new Window(glassPane);
            Window window2 = new Window(glassPane);
            //長波長吸収率・アルベド
            WindowSurface ws;
            ws = window1.GetSurface(true);
            ws.LongWaveEmissivity = extlwEmissivity;
            ws.FilmCoefficient = aowin;//表面総合熱伝達率[W/(m2K)]
            ws.Albedo = 0.2;
            ws = window2.GetSurface(true);
            ws.LongWaveEmissivity = extlwEmissivity;
            ws.FilmCoefficient = aowin;//表面総合熱伝達率[W/(m2K)]
            ws.Albedo = 0.2;
            //対流・放射成分
            ws = window1.GetSurface(false);
            ws.ConvectiveRate = 3.16 / ai;
            ws.FilmCoefficient = ai;//表面総合熱伝達率[W/(m2K)]
            ws = window2.GetSurface(false);
            ws.ConvectiveRate = 3.16 / ai;
            ws.FilmCoefficient = ai;//表面総合熱伝達率[W/(m2K)]
            //窓面積
            window1.SurfaceArea = 6;
            window2.SurfaceArea = 6;
            window1.OutSideIncline = new Incline(Incline.Orientation.S, 0.5 * Math.PI);
            window2.OutSideIncline = new Incline(Incline.Orientation.S, 0.5 * Math.PI);
            //室と外界に追加
            rooms[1].AddWindow(window1);
            rooms[1].AddWindow(window2);
            outdoor[0].AddWindow(window1);
            outdoor[0].AddWindow(window2);
            windows = new Window[] { window1, window2 };

            //放射率
            rooms[1].SetShortWaveRadiationRate(walls[3].GetSurface(true), 0.6);     //床面
            rooms[1].SetShortWaveRadiationRate(walls[1].GetSurface(true), 0.06);    //天井面
            rooms[1].SetShortWaveRadiationRate(walls[7].GetSurface(true), 0.02);    //東面
            rooms[1].SetShortWaveRadiationRate(walls[9].GetSurface(true), 0.02);    //西面
            rooms[1].SetShortWaveRadiationRate(walls[10].GetSurface(false), 0.2);    //北面
            rooms[1].SetShortWaveRadiationRate(walls[5].GetSurface(true), 0.03);    //南面
            rooms[1].SetShortWaveRadiationRate(window1, 0.035);
            rooms[1].SetShortWaveRadiationRate(window2, 0.035);

            rooms[1].ControlDrybulbTemperature = false;

            //対流成分設定
            rooms[0].SetConvectiveRate(3.16 / ai);
            rooms[1].SetConvectiveRate(3.16 / ai);
            outdoor[0].SetConvectiveRate(24.67 / ao);
        }
Beispiel #7
0
        /// <summary>HighConductanceWallを作成する</summary>
        /// <returns>HighConductanceWall</returns>
        private static WallLayers makeHighConductanceWall()
        {
            WallLayers hcWall = new WallLayers("HighConductanceWall");
            //外壁構成
            WallLayers.Layer layer;
            layer = new WallLayers.Layer(new WallMaterial("Glass", 1.06, 0.75 * 2500), 3.175 / 1000);
            hcWall.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("Air-gap", 6.297, 0), 0);
            hcWall.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("Glass", 1.06, 0.75 * 2500), 3.175 / 1000);
            hcWall.AddLayer(layer);

            return hcWall;
        }
Beispiel #8
0
        /// <summary>土中の壁構成を作成する</summary>
        private static void makeGroundWallLayer(out  WallLayers floorWallLayer, out WallLayers groundWallLayer)
        {
            const double GROUND_THICKNESS = 1.3;

            groundWallLayer = new WallLayers("GroundWall");
            floorWallLayer = new WallLayers("FloorWall");
            WallLayers.Layer layer;

            //土中壁
            layer = new WallLayers.Layer(new WallMaterial("Concrete Block", 0.510, 1400d * 1000d / 1000d), 0.1, 3);
            groundWallLayer.AddLayer(layer);
            //土の厚み
            layer = new WallLayers.Layer(new WallMaterial("Ground", 1.3, 800d * 1500d / 1000d), GROUND_THICKNESS, 6);
            groundWallLayer.AddLayer(layer);

            //床
            layer = new WallLayers.Layer(new WallMaterial("Concrete Slab", 1.130, 1400d * 1000d / 1000d), 0.08, 3);
            floorWallLayer.AddLayer(layer);
            //土の厚み
            layer = new WallLayers.Layer(new WallMaterial("Ground", 1.3, 800d * 1500d / 1000d), GROUND_THICKNESS, 6);
            floorWallLayer.AddLayer(layer);
        }
Beispiel #9
0
        /// <summary>Sample program calculating the unsteady heat conduction of wall</summary>
        private static void wallTest1()
        {
            WallLayers layers = new WallLayers();
            WallLayers.Layer layer;
            layer = new WallLayers.Layer(new WallMaterial("Plywood", 0.19, 716), 0.025);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("Concrete", 1.4, 1934), 0.120);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("Air gap", 1d / 0.086, 0), 0.020);
            layers.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("Rock wool", 0.042, 84), 0.050);
            layers.AddLayer(layer);
            Wall wall = new Wall(layers);

            wall.TimeStep = 3600;
            wall.AirTemperature1 = 20;
            wall.AirTemperature2 = 10;
            wall.InitializeTemperature(10); //Initial temperature is 10 C
            wall.SurfaceArea = 1;

            Console.WriteLine("Plywood, Concrete, Air gap, Rock wool");
            double[] temps;
            for (int i = 0; i < 24; i++)
            {
                wall.Update();
                temps = wall.GetTemperatures();
                Console.Write((i + 1).ToString("F0").PadLeft(2) + "Hour | ");
                for (int j = 0; j < temps.Length - 1; j++) Console.Write(((temps[j] + temps[j + 1]) / 2d).ToString("F1") + " | ");
                Console.WriteLine();
            }

            //Iterate until wall become steady state
            for (int i = 0; i < 1000; i++) wall.Update();
            Console.WriteLine();
            Console.WriteLine("Steady state");
            temps = wall.GetTemperatures();
            for (int j = 0; j < temps.Length - 1; j++) Console.Write(((temps[j] + temps[j + 1]) / 2d).ToString("F1") + " | ");

            Console.WriteLine();
            Console.WriteLine("Heat transfer at steady state 1: " + wall.GetHeatTransfer(true).ToString("F1"));
            Console.WriteLine("Heat transfer at steady state 2: " + wall.GetHeatTransfer(false).ToString("F1"));
            Console.WriteLine("Heat transfer at steady state 3: " + wall.GetStaticHeatTransfer().ToString("F1"));

            Console.Read();
        }