コード例 #1
0
ファイル: WallSurface.cs プロジェクト: windripple/popolo
        /// <summary>Constructor</summary>
        /// <param name="wall">壁オブジェクト</param>
        /// <param name="isSide1">壁面1か否か</param>
        internal WallSurface(Wall wall, bool isSide1)
        {
            this.wall = wall;
            this.isSide1 = isSide1;

            //短波長・長波長の放射率[-]を初期化
            SolarAbsorptance = 0.9;
            LongWaveEmissivity = 0.6;

            //イベント登録
            wall.FIOChangeEvent += new EventHandler(wall_FIOChangeEvent);
            wall.AreaChangeEvent += new EventHandler(wall_AreaChangeEvent);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <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();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>室の温湿度変動テスト(MultiRoomクラス)</summary>
        private static void RoomModelTest2()
        {
            //気象データ:乾球温度,絶対湿度,夜間放射,直達日射,天空日射
            double[] dbt = new double[] { 24.2, 24.1, 24.1, 24.2, 24.3, 24.2, 24.4, 25.1, 26.1, 27.1, 28.8, 29.9,
                30.7, 31.2, 31.6, 31.4, 31.3, 30.8, 29.4, 28.1, 27.5, 27.1, 26.6, 26.3 };
            double[] ahd = new double[] { 0.0134, 0.0136, 0.0134, 0.0133, 0.0131, 0.0134, 0.0138, 0.0142, 0.0142, 0.0140, 0.0147, 0.0149,
                0.0142, 0.0146, 0.0140, 0.0145, 0.0144, 0.0146, 0.0142, 0.0136, 0.0136, 0.0135, 0.0136, 0.0140 };
            double[] nrd = new double[] { 32, 30, 30, 29, 26, 24, 24, 25, 25, 25, 24, 24, 24, 23, 24, 24, 24, 24, 23, 23, 24, 26, 25, 23 };
            double[] dnr = new double[] { 0, 0, 0, 0, 0, 0, 106, 185, 202, 369, 427, 499, 557, 522, 517, 480, 398, 255, 142, 2, 0, 0, 0, 0 };
            double[] drd = new double[] { 0, 0, 0, 0, 0, 0, 36, 115, 198, 259, 314, 340, 340, 349, 319, 277, 228, 167, 87, 16, 0, 0, 0, 0 };

            //屋外を作成
            Outdoor outdoor = new Outdoor();
            Sun sun = new Sun(Sun.City.Tokyo);
            outdoor.Sun = sun;
            outdoor.GroundTemperature = 25;

            //傾斜を作成
            Incline nIn = new Incline(Incline.Orientation.N, 0.5 * Math.PI);    //北
            Incline eIn = new Incline(Incline.Orientation.E, 0.5 * Math.PI);    //東
            Incline wIn = new Incline(Incline.Orientation.W, 0.5 * Math.PI);    //西
            Incline sIn = new Incline(Incline.Orientation.S, 0.5 * Math.PI);    //南
            Incline hIn = new Incline(Incline.Orientation.S, 0);                //水平

            //ゾーンを作成
            Zone[] zones = new Zone[4];
            Zone wpZone = zones[0] = new Zone("西室ペリメータ");
            wpZone.Volume = 3 * 5 * 3;
            Zone wiZone = zones[1] = new Zone("西室インテリア");
            wiZone.Volume = 4 * 5 * 3;
            Zone epZone = zones[2] = new Zone("東室ペリメータ");
            epZone.Volume = 3 * 5 * 3;
            Zone eiZone = zones[3] = new Zone("東室インテリア");
            eiZone.Volume = 4 * 5 * 3;
            foreach (Zone zn in zones)
            {
                zn.TimeStep = 3600;
                zn.DrybulbTemperatureSetPoint = 26;
                zn.HumidityRatioSetPoint = 0.01;
            }

            //東側インテリアに発熱体を設定
            eiZone.AddHeatGain(new ConstantHeatGain(100, 100, 20));

            //壁構成を作成:400mmコンクリート
            WallLayers wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.ReinforcedConcrete), 0.4));

            //窓構成を作成
            GlassPanes gPanes = new GlassPanes(new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.HeatReflectingGlass06mm));

            //壁体をゾーンに追加
            Wall[] walls = new Wall[18];
            List<WallSurface> outdoorSurfaces = new List<WallSurface>();
            Wall wpwWall = walls[0] = new Wall(wl, "西室ペリメータ西壁");
            wpwWall.SurfaceArea = 3 * 3;
            outdoorSurfaces.Add(wpwWall.GetSurface(true));
            wpZone.AddSurface(wpwWall.GetSurface(false));
            wpwWall.SetIncline(wIn, true);

            Wall wpcWall = walls[1] = new Wall(wl, "西室ペリメータ天井");
            wpcWall.SurfaceArea = 3 * 5;
            outdoorSurfaces.Add(wpcWall.GetSurface(true));
            wpZone.AddSurface(wpcWall.GetSurface(false));
            wpcWall.SetIncline(hIn, true);

            Wall wpfWall = walls[2] = new Wall(wl, "西室ペリメータ床");
            wpfWall.SurfaceArea = 3 * 5;
            outdoor.AddGroundWallSurface(wpfWall.GetSurface(true));
            wpZone.AddSurface(wpfWall.GetSurface(false));

            Wall winWall = walls[3] = new Wall(wl, "西室インテリア北壁");
            winWall.SurfaceArea = 3 * 5;
            outdoorSurfaces.Add(winWall.GetSurface(true));
            wiZone.AddSurface(winWall.GetSurface(false));
            winWall.SetIncline(nIn, true);

            Wall wiwWall = walls[4] = new Wall(wl, "西室インテリア西壁");
            wiwWall.SurfaceArea = 3 * 4;
            outdoorSurfaces.Add(wiwWall.GetSurface(true));
            wiZone.AddSurface(wiwWall.GetSurface(false));
            wiwWall.SetIncline(wIn, true);

            Wall wicWall = walls[5] = new Wall(wl, "西室インテリア天井");
            wicWall.SurfaceArea = 4 * 5;
            outdoorSurfaces.Add(wicWall.GetSurface(true));
            wiZone.AddSurface(wicWall.GetSurface(false));
            wicWall.SetIncline(hIn, true);

            Wall wifWall = walls[6] = new Wall(wl, "西室インテリア床");
            wifWall.SurfaceArea = 4 * 5;
            outdoor.AddGroundWallSurface(wifWall.GetSurface(true));
            wiZone.AddSurface(wifWall.GetSurface(false));

            Wall epwWall = walls[7] = new Wall(wl, "東室ペリメータ東壁");
            epwWall.SurfaceArea = 3 * 3;
            outdoorSurfaces.Add(epwWall.GetSurface(true));
            epZone.AddSurface(epwWall.GetSurface(false));
            epwWall.SetIncline(eIn, true);

            Wall epcWall = walls[8] = new Wall(wl, "東室ペリメータ天井");
            epcWall.SurfaceArea = 3 * 5;
            outdoorSurfaces.Add(epcWall.GetSurface(true));
            epZone.AddSurface(epcWall.GetSurface(false));
            epcWall.SetIncline(hIn, true);

            Wall epfWall = walls[9] = new Wall(wl, "東室ペリメータ床");
            epfWall.SurfaceArea = 3 * 5;
            outdoor.AddGroundWallSurface(epfWall.GetSurface(true));
            epZone.AddSurface(epfWall.GetSurface(false));

            Wall einWall = walls[10] = new Wall(wl, "東室インテリア北壁");
            einWall.SurfaceArea = 5 * 3;
            outdoorSurfaces.Add(einWall.GetSurface(true));
            eiZone.AddSurface(einWall.GetSurface(false));
            einWall.SetIncline(nIn, true);

            Wall eiwWall = walls[11] = new Wall(wl, "東室インテリア東壁");
            eiwWall.SurfaceArea = 4 * 3;
            outdoorSurfaces.Add(eiwWall.GetSurface(true));
            eiZone.AddSurface(eiwWall.GetSurface(false));
            eiwWall.SetIncline(eIn, true);

            Wall eicWall = walls[12] = new Wall(wl, "東室インテリア天井");
            eicWall.SurfaceArea = 4 * 5;
            outdoorSurfaces.Add(eicWall.GetSurface(true));
            eiZone.AddSurface(eicWall.GetSurface(false));
            eicWall.SetIncline(hIn, true);

            Wall eifWall = walls[13] = new Wall(wl, "東室インテリア床");
            eifWall.SurfaceArea = 4 * 5;
            outdoor.AddGroundWallSurface(eifWall.GetSurface(true));
            eiZone.AddSurface(eifWall.GetSurface(false));

            Wall cpWall = walls[14] = new Wall(wl, "ペリメータ部の内壁");
            cpWall.SurfaceArea = 3 * 3;
            wpZone.AddSurface(cpWall.GetSurface(true));
            epZone.AddSurface(cpWall.GetSurface(false));

            Wall ciWall = walls[15] = new Wall(wl, "インテリア部の内壁");
            ciWall.SurfaceArea = 4 * 3;
            wiZone.AddSurface(ciWall.GetSurface(true));
            eiZone.AddSurface(ciWall.GetSurface(false));

            Wall wpsWall = walls[16] = new Wall(wl, "西側ペリメータ南壁");
            wpsWall.SurfaceArea = 5 * 3 - 3 * 2;
            outdoorSurfaces.Add(wpsWall.GetSurface(true));
            wpZone.AddSurface(wpsWall.GetSurface(false));
            wpsWall.SetIncline(sIn, true);

            Wall epsWall = walls[17] = new Wall(wl, "東側ペリメータ南壁");
            epsWall.SurfaceArea = 5 * 3 - 3 * 2;
            outdoorSurfaces.Add(epsWall.GetSurface(true));
            epZone.AddSurface(epsWall.GetSurface(false));
            epsWall.SetIncline(sIn, true);

            //外表面を初期化
            foreach (WallSurface ws in outdoorSurfaces)
            {
                //屋外に追加
                outdoor.AddWallSurface(ws);
                //放射率を初期化
                ws.InitializeEmissivity(WallSurface.SurfaceMaterial.Concrete);
            }

            //窓をゾーンに追加
            Window wWind = new Window(gPanes, "西室ペリメータ南窓");
            wWind.SurfaceArea = 3 * 2;
            wpZone.AddWindow(wWind);
            outdoor.AddWindow(wWind);

            Window eWind = new Window(gPanes, "東室ペリメータ南窓");
            eWind.SurfaceArea = 3 * 2;
            eWind.Shade = SunShade.MakeHorizontalSunShade(3, 2, 1, 1, 1, 0.5, sIn);
            wpZone.AddWindow(eWind);
            outdoor.AddWindow(eWind);

            //多数室オブジェクトを作成
            Room eRm = new Room(new Zone[] { epZone, eiZone }); //東側の室
            Room wRm = new Room(new Zone[] { wpZone, wiZone }); //西側の室
            MultiRoom mRoom = new MultiRoom(new Room[] { eRm, wRm });   //多数室
            mRoom.SetTimeStep(3600);

            //換気の設定
            wpZone.VentilationVolume = 10;  //西室ペリメータのみ外気導入
            mRoom.SetAirFlow(wpZone, wiZone, 10);
            mRoom.SetAirFlow(epZone, eiZone, 10);
            mRoom.SetAirFlow(eiZone, epZone, 10);

            //短波長放射の入射比率を調整:ペリメータ床面6割、その他は面積比率
            double sfSum = 0;
            foreach (ISurface isf in eRm.GetSurface()) sfSum += isf.Area;
            sfSum -= epfWall.SurfaceArea;
            foreach (ISurface isf in eRm.GetSurface()) eRm.SetShortWaveRadiationRate(isf, isf.Area / sfSum * 0.4);
            eRm.SetShortWaveRadiationRate(epfWall.GetSurface(false), 0.6);
            sfSum = 0;
            foreach (ISurface isf in wRm.GetSurface()) sfSum += isf.Area;
            sfSum -= wpfWall.SurfaceArea;
            foreach (ISurface isf in wRm.GetSurface()) wRm.SetShortWaveRadiationRate(isf, isf.Area / sfSum * 0.4);
            wRm.SetShortWaveRadiationRate(wpfWall.GetSurface(false), 0.6);

            //タイトル行書き出し
            StreamWriter sWriter = new StreamWriter("室の温湿度変動テスト2.csv", false, Encoding.GetEncoding("Shift_JIS"));
            foreach (Zone zn in zones) sWriter.Write(zn.Name + "乾球温度[C], " + zn.Name + "絶対湿度[kg/kgDA], " + zn.Name + "顕熱負荷[W], " + zn.Name + "潜熱負荷[W], ");
            sWriter.WriteLine();

            //計算実行
            for (int i = 0; i < 100; i++)
            {
                DateTime dTime = new DateTime(2007, 8, 3, 0, 0, 0);
                for (int j = 0; j < 24; j++)
                {
                    //時刻を設定
                    sun.Update(dTime);
                    mRoom.SetCurrentDateTime(dTime);

                    //空調設定
                    bool operating = (8 <= dTime.Hour && dTime.Hour <= 19);
                    foreach (Zone zn in zones)
                    {
                        zn.ControlHumidityRatio = operating;
                        zn.ControlDrybulbTemperature = operating;
                    }

                    //気象条件を設定
                    outdoor.AirState = new MoistAir(dbt[j], ahd[j]);
                    outdoor.NocturnalRadiation = nrd[j];
                    sun.SetGlobalHorizontalRadiation(drd[j], dnr[j]);

                    //換気の設定
                    wpZone.VentilationAirState = outdoor.AirState;

                    //外壁表面の状態を設定
                    outdoor.SetWallSurfaceBoundaryState();

                    //壁体を更新
                    foreach (Wall wal in walls) wal.Update();

                    //多数室を更新
                    mRoom.UpdateRoomTemperatures();
                    mRoom.UpdateRoomHumidities();

                    //時刻を更新
                    dTime = dTime.AddHours(1);

                    //書き出し設定
                    if (i == 99)
                    {
                        foreach (Zone zn in zones)
                        {
                            sWriter.Write(zn.CurrentDrybulbTemperature.ToString("F1") + ", " + zn.CurrentHumidityRatio.ToString("F3") + ", " +
                                zn.CurrentSensibleHeatLoad.ToString("F0") + ", " + zn.CurrentLatentHeatLoad.ToString("F0") + ", ");
                        }
                        sWriter.WriteLine();
                    }
                }
            }

            sWriter.Close();
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void makeGroundCouplingBuilding(out Zone[] rooms, out Wall[] walls, out Window[] windows, out Outdoor[] outdoor, out Sun sun)
        {
            //放射率
            double extswEmissivity = 0.9;
            double extlwEmissivity = 0.6;

            //表面熱伝達率
            double ao = 29.3;
            double aowin = 21;
            double ai = 8.29;
            double ago = 100000;

            //室を作成
            rooms = new Zone[1];
            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;

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

            //壁構成を作成
            WallLayers exwL, flwL, rfwL, grwL;
            makeWallLayer(true, out exwL, out flwL, out rfwL);
            makeGroundWallLayer(out flwL, out grwL);

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

            //壁リストを作成
            walls = new Wall[9];
            //屋根を作成
            walls[0] = new Wall(rfwL);
            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);

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

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

            //北外壁(土中)を作成
            walls[3] = new Wall(grwL);
            walls[3].Name = "北外壁(土中)";
            walls[3].SurfaceArea = 8 * 1.35;
            walls[3].SetIncline(new Incline(Incline.Orientation.N, 0.5 * Math.PI), false);
            walls[3].SetFilmCoefficient(ai, true);   //内表面総合熱伝達率[W/(m2K)]
            walls[3].SetFilmCoefficient(ago, false); //外表面総合熱伝達率[W/(m2K)]
            walls[3].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[3].GetSurface(true);
            ews = walls[3].GetSurface(false);
            rooms[0].AddSurface(iws);
            outdoor[0].AddGroundWallSurface(ews);

            //東外壁を作成
            walls[4] = new Wall(exwL);
            walls[4].Name = "東外壁";
            walls[4].SurfaceArea = 6 * 1.35;
            walls[4].SetIncline(new Incline(Incline.Orientation.E, 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(grwL);
            walls[5].Name = "東外壁(土中)";
            walls[5].SurfaceArea = 6 * 1.35;
            walls[5].SetIncline(new Incline(Incline.Orientation.E, 0.5 * Math.PI), false);
            walls[5].SetFilmCoefficient(ai, true);   //内表面総合熱伝達率[W/(m2K)]
            walls[5].SetFilmCoefficient(ago, false); //外表面総合熱伝達率[W/(m2K)]
            walls[5].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[5].GetSurface(true);
            ews = walls[5].GetSurface(false);
            rooms[0].AddSurface(iws);
            outdoor[0].AddGroundWallSurface(ews);

            //西外壁を作成
            walls[6] = new Wall(exwL);
            walls[6].Name = "西外壁";
            walls[6].SurfaceArea = 6 * 1.35;
            walls[6].SetIncline(new Incline(Incline.Orientation.W, 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);

            //西外壁(土中)を作成
            walls[7] = new Wall(grwL);
            walls[7].Name = "西外壁(土中)";
            walls[7].SurfaceArea = 6 * 1.35;
            walls[7].SetIncline(new Incline(Incline.Orientation.W, 0.5 * Math.PI), false);
            walls[7].SetFilmCoefficient(ai, true);   //内表面総合熱伝達率[W/(m2K)]
            walls[7].SetFilmCoefficient(ago, false); //外表面総合熱伝達率[W/(m2K)]
            walls[7].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[7].GetSurface(true);
            ews = walls[7].GetSurface(false);
            rooms[0].AddSurface(iws);
            outdoor[0].AddGroundWallSurface(ews);

            //南外壁(土中)
            walls[8] = new Wall(grwL);
            walls[8].Name = "南外壁(土中)";
            walls[8].SurfaceArea = 8 * 1.35;
            walls[8].SetIncline(new Incline(Incline.Orientation.S, 0.5 * Math.PI), false);
            walls[8].SetFilmCoefficient(ai, true);   //内表面総合熱伝達率[W/(m2K)]
            walls[8].SetFilmCoefficient(ago, false); //外表面総合熱伝達率[W/(m2K)]
            walls[8].InitializeTemperature(25);
            //壁表面の設定
            iws = walls[8].GetSurface(true);
            ews = walls[8].GetSurface(false);
            rooms[0].AddSurface(iws);
            outdoor[0].AddGroundWallSurface(ews);

            //窓を作成
            GlassPanes glassPanes = new GlassPanes(0.74745, 0.043078, 1d / (1d / 333 + 1d / 333 + 1d / 6.297));
            //glassPanes.LongWaveEmissivity = extlwEmissivity;
            //glassPanes.ConvectiveRate = 3.16 / ai;
            glassPanes.AngularDependenceCoefficients = new double[] { 1.3930, 5.5401, -19.5736, 19.0379 };
            Window window1 = new Window(glassPanes);
            Window window2 = new Window(glassPanes);
            //長波長吸収率
            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.FilmCoefficient = ai; //表面総合熱伝達率[W/(m2K)]
            ws.ConvectiveRate = 3.16 / ai;
            ws = window2.GetSurface(false);
            ws.FilmCoefficient = ai; //表面総合熱伝達率[W/(m2K)]
            ws.ConvectiveRate = 3.16 / ai;
            //窓面積
            window1.SurfaceArea = 5.4;
            window2.SurfaceArea = 5.4;

            window1.OutSideIncline = new Incline(Incline.Orientation.S, 0.5 * Math.PI);
            window2.OutSideIncline = new Incline(Incline.Orientation.S, 0.5 * Math.PI);
            //室と外界に追加
            rooms[0].AddWindow(window1);
            rooms[0].AddWindow(window2);
            outdoor[0].AddWindow(window1);
            outdoor[0].AddWindow(window2);
            windows = new Window[] { window1, window2 };

            //短波長放射入射比率を設定
            rooms[0].SetShortWaveRadiationRate(walls[1].GetSurface(true), 0.642);           //床面
            rooms[0].SetShortWaveRadiationRate(walls[0].GetSurface(true), 0.168);           //天井面
            rooms[0].SetShortWaveRadiationRate(walls[4].GetSurface(true), 0.038 * 0.5);     //東面
            rooms[0].SetShortWaveRadiationRate(walls[6].GetSurface(true), 0.038 * 0.5);     //西面
            rooms[0].SetShortWaveRadiationRate(walls[2].GetSurface(true), 0.053 * 0.5);     //北面
            rooms[0].SetShortWaveRadiationRate(walls[5].GetSurface(true), 0.038 * 0.5);     //東面(土中)
            rooms[0].SetShortWaveRadiationRate(walls[7].GetSurface(true), 0.038 * 0.5);     //西面(土中)
            rooms[0].SetShortWaveRadiationRate(walls[3].GetSurface(true), 0.053 * 0.5);     //北面(土中)
            rooms[0].SetShortWaveRadiationRate(walls[8].GetSurface(true), 0.026 * 10.8 / 9.6);   //南面(土中)
            if (0 < windows.Length)
            {
                rooms[0].SetShortWaveRadiationRate(windows[0], 0.0175 * 10.8 / 12d);
                rooms[0].SetShortWaveRadiationRate(windows[1], 0.0175 * 10.8 / 12d);
            }

            //対流成分設定
            rooms[0].SetConvectiveRate(3.16 / ai);
            outdoor[0].SetConvectiveRate(24.67 / ao);
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void makeBuilding(TestCase tCase, out Zone[] rooms, out Wall[] walls, out Window[] windows, out Outdoor[] outdoor, out Sun sun)
        {
            if (tCase == TestCase.C960)
            {
                makeSunZoneBuilding(out rooms, out walls, out windows, out outdoor, out sun);
                return;
            }
            else if (tCase == TestCase.C990)
            {
                makeGroundCouplingBuilding(out rooms, out walls, out windows, out outdoor, out sun);
                return;
            }

            bool hasEWWindow = (tCase & TestCase.HasEWWindow) == tCase;
            bool hasSunShade = (tCase & TestCase.HasSunShade) == tCase;
            bool hasHeatGain = (tCase & TestCase.HasHeatGain) == tCase;
            bool hasHighConcuctanceWall = (tCase & TestCase.HasHighConcuctanceWall) == tCase;
            bool isLowIntIREmissivity = (tCase & TestCase.LowIntIREmissivity) == tCase;
            bool isLowExtIREmissivity = (tCase & TestCase.LowExtIREmissivity) == tCase;
            bool isLowIntSWEmissivity = (tCase & TestCase.LowIntSWEmissivity) == tCase;
            bool isHighIntSWEmissivity = (tCase & TestCase.HighIntSWEmissivity) == tCase;
            bool noInfiltration = (tCase & TestCase.NoInfiltration) == tCase;
            bool isLowExtSWEmissivity = (tCase & TestCase.LowExtSWEmissivity) == tCase;
            bool isHeavyWeight = (tCase & TestCase.HeavyWeight) == tCase;
            bool noWindow = (tCase & TestCase.NoWindow) == tCase;

            //放射率
            double extswEmissivity, extlwEmissivity;
            if (isLowExtIREmissivity) extlwEmissivity = 0.1;
            else extlwEmissivity = 0.9;
            if (tCase == TestCase.C250) extswEmissivity = 0.9;
            else if (isLowExtSWEmissivity) extswEmissivity = 0.1;
            else extswEmissivity = 0.6;

            //表面熱伝達率
            double ao, aowin, ai;
            if (isLowExtIREmissivity)
            {
                ao = 25.2;
                aowin = 16.9;
            }
            else
            {
                ao = 29.3;
                aowin = 21;
            }
            if (isLowIntIREmissivity) ai = 3.73;
            else ai = 8.29;

            //室を作成
            rooms = new Zone[1];
            rooms[0] = new Zone();
            rooms[0].Volume = 8 * 6 * 2.7;  //室容積[m3]
            //内部負荷[W]
            if (hasHeatGain) 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);
            //漏気量
            if (tCase == TestCase.C230) rooms[0].VentilationVolume = rooms[0].Volume;
            else if (noInfiltration) rooms[0].VentilationVolume = 0;
            else rooms[0].VentilationVolume = rooms[0].Volume * 0.5;
            if (!CALCULATE_ELEVATION_EFFECT) rooms[0].VentilationVolume *= 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 exwL, flwL, rfwL;
            makeWallLayer(!isHeavyWeight, out exwL, out flwL, out rfwL);

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

            //壁リストを作成
            if (hasHighConcuctanceWall) walls = new Wall[7];
            else walls = new Wall[6];
            //屋根を作成
            walls[0] = new Wall(rfwL);
            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);

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

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

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

            //西外壁を作成
            walls[4] = new Wall(exwL);
            walls[4].Name = "西外壁";
            if (hasEWWindow) walls[4].SurfaceArea = 6 * 2.7 - 6;
            else walls[4].SurfaceArea = 6 * 2.7;
            walls[4].SetIncline(new Incline(Incline.Orientation.W, 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(exwL);
            walls[5].Name = "南外壁";
            if (noWindow || hasEWWindow) walls[5].SurfaceArea = 8 * 2.7;
            else 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[0].AddSurface(iws);
            outdoor[0].AddWallSurface(ews);

            //窓を作成
            if (!noWindow && !hasHighConcuctanceWall)
            {
                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;

                if (hasEWWindow)
                {
                    window1.OutSideIncline = new Incline(Incline.Orientation.E, 0.5 * Math.PI);
                    window2.OutSideIncline = new Incline(Incline.Orientation.W, 0.5 * Math.PI);
                    if (hasSunShade)
                    {
                        window1.Shade = SunShade.MakeGridSunShade(3, 2, 1, 0, 0, 0, 0, window1.OutSideIncline);
                        window2.Shade = SunShade.MakeGridSunShade(3, 2, 1, 0, 0, 0, 0, window2.OutSideIncline);
                    }
                }
                else
                {
                    window1.OutSideIncline = new Incline(Incline.Orientation.S, 0.5 * Math.PI);
                    window2.OutSideIncline = new Incline(Incline.Orientation.S, 0.5 * Math.PI);
                    if (hasSunShade)
                    {
                        window1.Shade = SunShade.MakeHorizontalSunShade(3, 2, 1, 4.5, 0.5, 0.5, window1.OutSideIncline);
                        window2.Shade = SunShade.MakeHorizontalSunShade(3, 2, 1, 0.5, 4.5, 0.5, window2.OutSideIncline);
                    }
                }
                //室と外界に追加
                rooms[0].AddWindow(window1);
                rooms[0].AddWindow(window2);
                outdoor[0].AddWindow(window1);
                outdoor[0].AddWindow(window2);
                windows = new Window[] { window1, window2 };
            }
            else windows = new Window[0];

            //HighConductanceWallを作成
            if (hasHighConcuctanceWall)
            {
                walls[6] = new Wall(makeHighConductanceWall());
                walls[6].SurfaceArea = 12;
                walls[6].SetIncline(new Incline(Incline.Orientation.S, 0), false);
                walls[6].SetFilmCoefficient(ai, true);
                walls[6].SetFilmCoefficient(aowin, false);
                walls[6].InitializeTemperature(25);
                //壁表面の設定
                iws = walls[6].GetSurface(true);
                ews = walls[6].GetSurface(false);
                ews.SolarAbsorptance = extswEmissivity;
                ews.LongWaveEmissivity = extlwEmissivity;
                rooms[0].AddSurface(iws);
                outdoor[0].AddWallSurface(ews);
            }

            //短波長放射入射比率を設定
            if (hasEWWindow)
            {
                if (isLowIntSWEmissivity)
                {
                    rooms[0].SetShortWaveRadiationRate(walls[1].GetSurface(true), 0.642);   //床面
                    rooms[0].SetShortWaveRadiationRate(walls[0].GetSurface(true), 0.168);   //天井面
                    rooms[0].SetShortWaveRadiationRate(walls[3].GetSurface(true), 0.025);   //東面
                    rooms[0].SetShortWaveRadiationRate(walls[4].GetSurface(true), 0.025);   //西面
                    rooms[0].SetShortWaveRadiationRate(walls[2].GetSurface(true), 0.0525);   //北面
                    rooms[0].SetShortWaveRadiationRate(walls[5].GetSurface(true), 0.0525);   //南面
                    if (0 < windows.Length)
                    {
                        rooms[0].SetShortWaveRadiationRate(windows[0], 0.0175);
                        rooms[0].SetShortWaveRadiationRate(windows[1], 0.0175);
                    }
                }
                else
                {
                    rooms[0].SetShortWaveRadiationRate(walls[1].GetSurface(true), 0.651);   //床面
                    rooms[0].SetShortWaveRadiationRate(walls[0].GetSurface(true), 0.177);   //天井面
                    rooms[0].SetShortWaveRadiationRate(walls[3].GetSurface(true), 0.027);   //東面
                    rooms[0].SetShortWaveRadiationRate(walls[4].GetSurface(true), 0.027);   //西面
                    rooms[0].SetShortWaveRadiationRate(walls[2].GetSurface(true), 0.056);   //北面
                    rooms[0].SetShortWaveRadiationRate(walls[5].GetSurface(true), 0.056);   //南面
                    if (0 < windows.Length)
                    {
                        rooms[0].SetShortWaveRadiationRate(windows[0], 0.003);
                        rooms[0].SetShortWaveRadiationRate(windows[1], 0.003);
                    }
                }
            }
            else
            {
                if (isLowIntSWEmissivity)
                {
                    rooms[0].SetShortWaveRadiationRate(walls[1].GetSurface(true), 0.244);   //床面
                    rooms[0].SetShortWaveRadiationRate(walls[0].GetSurface(true), 0.192);   //天井面
                    rooms[0].SetShortWaveRadiationRate(walls[3].GetSurface(true), 0.057);   //東面
                    rooms[0].SetShortWaveRadiationRate(walls[4].GetSurface(true), 0.057);   //西面
                    rooms[0].SetShortWaveRadiationRate(walls[2].GetSurface(true), 0.082);   //北面
                    rooms[0].SetShortWaveRadiationRate(walls[5].GetSurface(true), 0.065);   //南面
                    if (0 < windows.Length)
                    {
                        rooms[0].SetShortWaveRadiationRate(windows[0], 0.152);
                        rooms[0].SetShortWaveRadiationRate(windows[1], 0.152);
                    }
                }
                else if (isHighIntSWEmissivity)
                {
                    rooms[0].SetShortWaveRadiationRate(walls[1].GetSurface(true), 0.651);   //床面
                    rooms[0].SetShortWaveRadiationRate(walls[0].GetSurface(true), 0.177);   //天井面
                    rooms[0].SetShortWaveRadiationRate(walls[3].GetSurface(true), 0.041);   //東面
                    rooms[0].SetShortWaveRadiationRate(walls[4].GetSurface(true), 0.041);   //西面
                    rooms[0].SetShortWaveRadiationRate(walls[2].GetSurface(true), 0.056);   //北面
                    rooms[0].SetShortWaveRadiationRate(walls[5].GetSurface(true), 0.028);   //南面
                    if (0 < windows.Length)
                    {
                        rooms[0].SetShortWaveRadiationRate(windows[0], 0.003);
                        rooms[0].SetShortWaveRadiationRate(windows[1], 0.003);
                    }
                }
                else
                {
                    rooms[0].SetShortWaveRadiationRate(walls[1].GetSurface(true), 0.642);   //床面
                    rooms[0].SetShortWaveRadiationRate(walls[0].GetSurface(true), 0.168);   //天井面
                    rooms[0].SetShortWaveRadiationRate(walls[3].GetSurface(true), 0.038);   //東面
                    rooms[0].SetShortWaveRadiationRate(walls[4].GetSurface(true), 0.038);   //西面
                    rooms[0].SetShortWaveRadiationRate(walls[2].GetSurface(true), 0.053);   //北面
                    rooms[0].SetShortWaveRadiationRate(walls[5].GetSurface(true), 0.026);   //南面
                    if (0 < windows.Length)
                    {
                        rooms[0].SetShortWaveRadiationRate(windows[0], 0.026);
                        rooms[0].SetShortWaveRadiationRate(windows[1], 0.026);
                    }
                }
            }

            //対流成分設定
            rooms[0].SetConvectiveRate(3.16 / ai);
            outdoor[0].SetConvectiveRate(24.67 / ao);
            //HighConductanceWallの対流成分
            if (hasHighConcuctanceWall)
            {
                ews = walls[6].GetSurface(false);
                ews.ConvectiveRate = 16.37 / aowin;
            }
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>Sample program calculating the unsteady heat conduction of wall with heating tube</summary>
        private static void wallTest2()
        {
            WallLayers wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.FrexibleBoard), 0.0165));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("Water", 0.59, 4186), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("Water", 0.59, 4186), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.ExtrudedPolystyreneFoam_3), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AirGap), 0.015));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));
            Wall wall = new Wall(wl);
            wall.TimeStep = 300;
            wall.AirTemperature1 = 20;
            wall.AirTemperature2 = 10;
            wall.SurfaceArea = 6.48;

            Tube tube = new Tube(0.84, 0.346, 4186);
            //installing tube to wall
            wall.AddTube(tube, 1);
            tube.SetFlowRate(0);  //initial flow rate is 0 kg/s
            tube.FluidTemperature = 30;

            wall.InitializeTemperature(20); //initialize temperature of the wall

            for (int i = 0; i < wall.Layers.LayerNumber; i++) Console.Write("temperature" + i + ", ");
            Console.WriteLine("heat transfer to the tube[W], outlet temperature of fluid[C]");
            for (int i = 0; i < 100; i++)
            {
                if (i == 50) tube.SetFlowRate(0.54);  //start heating
                wall.Update();
                double[] tmp = wall.GetTemperatures();
                for (int j = 0; j < tmp.Length - 1; j++) Console.Write(((tmp[j] + tmp[j + 1]) / 2d).ToString("F1") + ", ");
                Console.Write(wall.GetHeatTransferToTube(1).ToString("F0") + ", " + tube.GetOutletFluidTemperature().ToString("F1"));
                Console.WriteLine();
            }
            Console.Read();
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <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();
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <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();
        }
コード例 #9
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void makeExWalls(
            Dictionary<string, Zone> zones, Dictionary<string, WallLayers> wallLayers,
            Dictionary<string, Incline> inclines, Dictionary<string, Window> windows, Dictionary<string, Wall> frames
            , Dictionary<string, Wall> doors, Outdoor outdoor, out Dictionary<string, Wall> exWalls)
        {
            exWalls = new Dictionary<string, Wall>();
            Wall exWall;

            exWall = new Wall(wallLayers["外壁"], "EW1-1");
            exWall.SurfaceArea = 5.005 * 2.7 - windows["WI1-1"].SurfaceArea - windows["WI1-2"].SurfaceArea
                 - frames["SS1-1"].SurfaceArea - frames["SS1-2"].SurfaceArea;
            exWall.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F居間"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-2");
            exWall.SurfaceArea = 3.64 * 2.7 - windows["WI1-3"].SurfaceArea - frames["SS1-3"].SurfaceArea;
            exWall.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F和室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-3");
            exWall.SurfaceArea = 1.82 * 2.7;
            exWall.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F和室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-4");
            exWall.SurfaceArea = 1.82 * 2.7;
            exWall.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F押入"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-5");
            exWall.SurfaceArea = 1.82 * 2.7 - windows["WI1-4"].SurfaceArea - frames["SS1-4"].SurfaceArea;
            exWall.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F浴室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-6");
            exWall.SurfaceArea = 1.82 * 2.7;
            exWall.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F洗面所"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-7");
            exWall.SurfaceArea = 2.73 * 2.7 - windows["WI1-5"].SurfaceArea - frames["SS1-5"].SurfaceArea;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F洗面所"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-8");
            exWall.SurfaceArea = 0.91 * 2.7 - windows["WI1-6"].SurfaceArea - frames["SS1-6"].SurfaceArea;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1FWC"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-9");
            exWall.SurfaceArea = 0.91 * 2.7;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["階段室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-10");
            exWall.SurfaceArea = 1.82 * 2.7 - doors["DR1-1"].SurfaceArea;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F廊下"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-11");
            exWall.SurfaceArea = 2.275 * 2.7 - doors["DR1-2"].SurfaceArea;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F台所"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-12");
            exWall.SurfaceArea = 3.185 * 2.7 - windows["WI1-7"].SurfaceArea - frames["SS1-7"].SurfaceArea;
            exWall.SetIncline(inclines["W"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F台所"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW1-13");
            exWall.SurfaceArea = 4.095 * 2.7 - windows["WI1-8"].SurfaceArea - windows["WI1-9"].SurfaceArea
                 - frames["SS1-8"].SurfaceArea - frames["SS1-9"].SurfaceArea;
            exWall.SetIncline(inclines["W"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["1F居間"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-1");
            exWall.SurfaceArea = 5.005 * 2.7 - windows["WI2-1"].SurfaceArea - windows["WI2-2"].SurfaceArea
                 - frames["SS2-1"].SurfaceArea - frames["SS2-2"].SurfaceArea;
            exWall.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F主寝室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-2");
            exWall.SurfaceArea = 3.64 * 2.7 - windows["WI2-3"].SurfaceArea - frames["SS2-3"].SurfaceArea;
            exWall.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F子供室1"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-3");
            exWall.SurfaceArea = 2.73 * 2.7 - windows["WI2-4"].SurfaceArea - frames["SS2-4"].SurfaceArea;
            exWall.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F子供室1"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-4");
            exWall.SurfaceArea = 0.91 * 2.7;
            exWall.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F押入3"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-5");
            exWall.SurfaceArea = 3.64 * 2.7 - windows["WI2-5"].SurfaceArea - frames["SS2-5"].SurfaceArea;
            exWall.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F子供室2"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-6");
            exWall.SurfaceArea = 2.73 * 2.7 - windows["WI2-6"].SurfaceArea - frames["SS2-6"].SurfaceArea;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F子供室2"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-7");
            exWall.SurfaceArea = 1.82 * 2.7 - windows["WI2-7"].SurfaceArea - frames["SS2-7"].SurfaceArea;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["階段室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-8");
            exWall.SurfaceArea = 0.91 * 2.7 - windows["WI2-8"].SurfaceArea - frames["SS2-8"].SurfaceArea;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2FWC"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-9");
            exWall.SurfaceArea = 3.185 * 2.7 - windows["WI2-9"].SurfaceArea - frames["SS2-9"].SurfaceArea;
            exWall.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F予備室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-10");
            exWall.SurfaceArea = 3.185 * 2.7;
            exWall.SetIncline(inclines["W"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F予備室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-11");
            exWall.SurfaceArea = 0.91 * 2.7;
            exWall.SetIncline(inclines["W"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F押入1"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["外壁"], "EW2-12");
            exWall.SurfaceArea = 3.185 * 2.7;
            exWall.SetIncline(inclines["W"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["2F主寝室"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            exWall = new Wall(wallLayers["屋根1"], "EW-RF");
            exWall.SurfaceArea = 8.645 * 7.280;
            exWall.SetIncline(inclines["H"], true);
            outdoor.AddWallSurface(exWall.GetSurface(true));
            zones["屋根裏"].AddSurface(exWall.GetSurface(false));
            exWalls.Add(exWall.Name, exWall);

            //総合熱伝達率設定
            foreach (string key in exWalls.Keys)
            {
                exWalls[key].GetSurface(true).FilmCoefficient = AO;
                exWalls[key].GetSurface(false).FilmCoefficient = AI;
                exWalls[key].TimeStep = TIME_STEP;
            }

            exWall = new Wall(wallLayers["地面"], "EW-SOIL");
            exWall.SurfaceArea = 8.645 * 7.280;
            outdoor.AddGroundWallSurface(exWall.GetSurface(true));
            zones["床下"].AddSurface(exWall.GetSurface(false));
            exWall.TimeStep = TIME_STEP;
            exWalls.Add(exWall.Name, exWall);
        }
コード例 #10
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void makeDoors(
            Dictionary<string, Zone> zones, Dictionary<string, WallLayers> wallLayers,
            Dictionary<string, Incline> inclines, Outdoor outdoor, out Dictionary<string, Wall> doors)
        {
            doors = new Dictionary<string, Wall>();
            Wall door;

            door = new Wall(wallLayers["外部ドア"], "DR1-1");
            door.SurfaceArea = 1.0 * 2.0;
            door.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(door.GetSurface(true));
            zones["1F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["外部ドア"], "DR1-2");
            door.SurfaceArea = 0.8 * 2.0;
            door.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(door.GetSurface(true));
            zones["1F台所"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR1-3");
            door.SurfaceArea = 0.8 * 2.0;
            zones["1F浴室"].AddSurface(door.GetSurface(true));
            zones["1F洗面所"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR1-4");
            door.SurfaceArea = 0.8 * 2.0;
            zones["1F廊下"].AddSurface(door.GetSurface(true));
            zones["1F洗面所"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR1-5");
            door.SurfaceArea = 0.8 * 2.0;
            zones["1F廊下"].AddSurface(door.GetSurface(true));
            zones["1FWC"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR1-6");
            door.SurfaceArea = 0.8 * 2.0;
            zones["1F居間"].AddSurface(door.GetSurface(true));
            zones["1F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR1-7");
            door.SurfaceArea = 0.8 * 2.0;
            zones["1F和室"].AddSurface(door.GetSurface(true));
            zones["1F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR1-8");
            door.SurfaceArea = 0.8 * 2.0;
            zones["1F台所"].AddSurface(door.GetSurface(true));
            zones["1F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR1-9");
            door.SurfaceArea = 1.7 * 2.0;
            zones["1F和室"].AddSurface(door.GetSurface(true));
            zones["1F押入"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR2-1");
            door.SurfaceArea = 1.7 * 2.0 * 2;
            zones["2F主寝室"].AddSurface(door.GetSurface(true));
            zones["2F押入1"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR2-2");
            door.SurfaceArea = 0.8 * 2.0;
            zones["2F主寝室"].AddSurface(door.GetSurface(true));
            zones["2F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR2-3");
            door.SurfaceArea = 0.8 * 2.0;
            zones["2F子供室1"].AddSurface(door.GetSurface(true));
            zones["2F押入2"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR2-4");
            door.SurfaceArea = 1.7 * 2.0;
            zones["2F子供室2"].AddSurface(door.GetSurface(true));
            zones["2F押入3"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR2-5");
            door.SurfaceArea = 0.8 * 2.0;
            zones["2F子供室2"].AddSurface(door.GetSurface(true));
            zones["2F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR2-6");
            door.SurfaceArea = 0.8 * 2.0;
            zones["2F予備室"].AddSurface(door.GetSurface(true));
            zones["2F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR2-7");
            door.SurfaceArea = 0.8 * 2.0;
            zones["2FWC"].AddSurface(door.GetSurface(true));
            zones["2F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            door = new Wall(wallLayers["室内ドア"], "DR2-8");
            door.SurfaceArea = 0.8 * 2.0;
            zones["2F子供室1"].AddSurface(door.GetSurface(true));
            zones["2F廊下"].AddSurface(door.GetSurface(false));
            doors.Add(door.Name, door);

            //総合熱伝達率設定
            foreach (string key in doors.Keys)
            {
                doors[key].GetSurface(true).FilmCoefficient = AI;
                doors[key].GetSurface(false).FilmCoefficient = AI;
                doors[key].TimeStep = TIME_STEP;
            }
            //外部ドア
            doors["DR1-1"].GetSurface(true).FilmCoefficient = AO;
            doors["DR1-2"].GetSurface(true).FilmCoefficient = AO;
        }
コード例 #11
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void makeWindows(
            Dictionary<string, Zone> zones,Dictionary<string, Incline> inclines, Outdoor outdoor, Dictionary<string, WallLayers> wallLayers,
            out Dictionary<string, Window> windows, out Dictionary<string, Wall> frames)
        {
            bool makeWindowFrame = true;

            const double WIN1720 = 2.89;//1.7 * 2.0;   //
            const double WIN1712 = 1.64;//1.7 * 1.2;   //
            const double WIN0512 = 0.42;//0.5 * 1.2;   //
            const double WIN1745 = 0.45;//1.7 * 0.45;  //

            //外側Low-e 6mm, 内側フロート 6mm
            GlassPanes.Pane[] panes = new GlassPanes.Pane[2];
            panes[0] = new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.TransparentGlass06mm);
            panes[1] = new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.HeatReflectingGlass06mm);
            GlassPanes gPanes = new GlassPanes(panes);
            gPanes.SetHeatTransferCoefficientsOfGaps(0, 5.9);

            windows = new Dictionary<string, Window>();
            Window win;
            frames = new Dictionary<string, Wall>();
            Wall frm;

            win = new Window(gPanes, "WI1-1");
            win.SurfaceArea = WIN1720;
            win.OutSideIncline = inclines["S"];
            zones["1F居間"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-1");
            frm.SurfaceArea = Math.Max(1.7 * 2.0 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1F居間"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI1-2");
            win.SurfaceArea = WIN1720;
            win.OutSideIncline = inclines["S"];
            zones["1F居間"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-2");
            frm.SurfaceArea = Math.Max(1.7 * 2.0 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1F居間"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI1-3");
            win.SurfaceArea = WIN1720;
            win.OutSideIncline = inclines["S"];
            zones["1F和室"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-3");
            frm.SurfaceArea = Math.Max(1.7 * 2.0 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1F和室"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI1-4");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["E"];
            zones["1F浴室"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-4");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1F浴室"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI1-5");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["N"];
            zones["1F洗面所"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-5");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1F洗面所"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI1-6");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["N"];
            zones["1FWC"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-6");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1FWC"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI1-7");
            win.SurfaceArea = WIN1745;
            win.OutSideIncline = inclines["W"];
            zones["1F台所"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-7");
            frm.SurfaceArea = Math.Max(1.7 * 0.45 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["W"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1F台所"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI1-8");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["W"];
            zones["1F居間"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-8");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["W"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1F居間"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI1-9");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["W"];
            zones["1F居間"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS1-9");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["W"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["1F居間"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-1");
            win.SurfaceArea = WIN1712;
            win.OutSideIncline = inclines["S"];
            zones["2F主寝室"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-1");
            frm.SurfaceArea = Math.Max(1.7 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2F主寝室"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-2");
            win.SurfaceArea = WIN1712;
            win.OutSideIncline = inclines["S"];
            zones["2F主寝室"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-2");
            frm.SurfaceArea = Math.Max(1.7 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2F主寝室"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-3");
            win.SurfaceArea = WIN1712;
            win.OutSideIncline = inclines["S"];
            zones["2F子供室1"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-3");
            frm.SurfaceArea = Math.Max(1.7 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["S"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2F子供室1"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-4");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["E"];
            zones["2F子供室1"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-4");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2F子供室1"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-5");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["E"];
            zones["2F子供室2"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-5");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2F子供室2"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-6");
            win.SurfaceArea = WIN1712;
            win.OutSideIncline = inclines["N"];
            zones["2F子供室2"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-6");
            frm.SurfaceArea = Math.Max(1.7 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2F子供室2"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-7");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["N"];
            zones["階段室"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-7");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["階段室"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-8");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["N"];
            zones["2FWC"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-8");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2FWC"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-9");
            win.SurfaceArea = WIN1712;
            win.OutSideIncline = inclines["N"];
            zones["2F予備室"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-9");
            frm.SurfaceArea = Math.Max(1.7 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["N"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2F予備室"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            win = new Window(gPanes, "WI2-10");
            win.SurfaceArea = WIN0512;
            win.OutSideIncline = inclines["E"];
            zones["2F主寝室"].AddWindow(win);
            outdoor.AddWindow(win);
            windows.Add(win.Name, win);

            frm = new Wall(wallLayers["サッシ"], "SS2-10");
            frm.SurfaceArea = Math.Max(0.5 * 1.2 - win.SurfaceArea, 0.0001);
            frm.SetIncline(inclines["E"], true);
            outdoor.AddWallSurface(frm.GetSurface(true));
            zones["2F主寝室"].AddSurface(frm.GetSurface(false));
            frames.Add(frm.Name, frm);

            //総合熱伝達率設定
            foreach (string key in windows.Keys)
            {
                windows[key].GetSurface(true).FilmCoefficient = AO;
                windows[key].GetSurface(false).FilmCoefficient = AI;
            }
            //総合熱伝達率設定
            foreach (string key in frames.Keys)
            {
                frames[key].GetSurface(true).FilmCoefficient = AO;
                frames[key].GetSurface(false).FilmCoefficient = AI;

                if (! makeWindowFrame) frames[key].SurfaceArea = 0.000001;
            }
        }
コード例 #12
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>Sample program calculating the air state and heat load of the building (MultiRoom class)</summary>
        private static void AirStateAndHeatLoadTest2()
        {
            //A sample weather data
            //Drybulb temperature [C]
            double[] dbt = new double[] { 24.2, 24.1, 24.1, 24.2, 24.3, 24.2, 24.4, 25.1, 26.1, 27.1, 28.8, 29.9,
                30.7, 31.2, 31.6, 31.4, 31.3, 30.8, 29.4, 28.1, 27.5, 27.1, 26.6, 26.3 };
            //Humidity ratio [kg/kg(DA)]
            double[] hum = new double[] { 0.0134, 0.0136, 0.0134, 0.0133, 0.0131, 0.0134, 0.0138, 0.0142, 0.0142, 0.0140, 0.0147, 0.0149,
                0.0142, 0.0146, 0.0140, 0.0145, 0.0144, 0.0146, 0.0142, 0.0136, 0.0136, 0.0135, 0.0136, 0.0140 };
            //Nocturnal radiation [W/m2]
            double[] nrd = new double[] { 32, 30, 30, 29, 26, 24, 24, 25, 25, 25, 24, 24, 24, 23, 24, 24, 24, 24, 23, 23, 24, 26, 25, 23 };
            //Direct normal radiation [W/m2]
            double[] dnr = new double[] { 0, 0, 0, 0, 0, 0, 106, 185, 202, 369, 427, 499, 557, 522, 517, 480, 398, 255, 142, 2, 0, 0, 0, 0 };
            //Diffuse horizontal radiation [W/m2]
            double[] drd = new double[] { 0, 0, 0, 0, 0, 0, 36, 115, 198, 259, 314, 340, 340, 349, 319, 277, 228, 167, 87, 16, 0, 0, 0, 0 };

            //Create an instance of the Outdoor class
            Outdoor outdoor = new Outdoor();
            Sun sun = new Sun(Sun.City.Tokyo);  //Located in Tokyo
            outdoor.Sun = sun;
            outdoor.GroundTemperature = 25;     //Ground temperature is assumed to be constant

            //Create an instance of the Incline class
            Incline nIn = new Incline(Incline.Orientation.N, 0.5 * Math.PI); //North, Vertical
            Incline eIn = new Incline(Incline.Orientation.E, 0.5 * Math.PI); //East, Vertical
            Incline wIn = new Incline(Incline.Orientation.W, 0.5 * Math.PI); //West, Vertical
            Incline sIn = new Incline(Incline.Orientation.S, 0.5 * Math.PI); //South, Vertical
            Incline hIn = new Incline(Incline.Orientation.S, 0);  //Horizontal

            //Create an instance of the Zone class
            Zone[] zones = new Zone[4];
            Zone wpZone = zones[0] = new Zone("West perimeter zone");
            wpZone.Volume = 3 * 5 * 3;  //Ceiling height is 3m
            Zone wiZone = zones[1] = new Zone("West interior zone");
            wiZone.Volume = 4 * 5 * 3;
            Zone epZone = zones[2] = new Zone("East perimeter zone");
            epZone.Volume = 3 * 5 * 3;
            Zone eiZone = zones[3] = new Zone("East interior zone");
            eiZone.Volume = 4 * 5 * 3;
            foreach (Zone zn in zones)
            {
                zn.VentilationVolume = 10; //Ventilation volume[CMH]
                zn.TimeStep = 3600;
                zn.DrybulbTemperatureSetPoint = 26;
                zn.HumidityRatioSetPoint = 0.01;
            }

            //Set a heat production element to the east interior zone
            //Convective sensible heat=100W, Radiative sensible heat=100W, Latent heat=20W
            eiZone.AddHeatGain(new ConstantHeatGain(100, 100, 20));

            //Create an instance of the WallLayers class : Concrete,400mm
            WallLayers wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.ReinforcedConcrete), 0.4));

            //Create an instance of the GlassPanes class:Low-emissivity coating single glass
            GlassPanes gPanes = new GlassPanes(new GlassPanes.Pane(GlassPanes.Pane.PredifinedGlassPane.HeatReflectingGlass06mm));

            //Set wall surfaces to the zone objects
            Wall[] walls = new Wall[18];
            List<WallSurface> outdoorSurfaces = new List<WallSurface>();
            Wall wpwWall = walls[0] = new Wall(wl, "West wall in the west perimeter zone");
            wpwWall.SurfaceArea = 3 * 3;
            outdoorSurfaces.Add(wpwWall.GetSurface(true));
            wpZone.AddSurface(wpwWall.GetSurface(false));
            wpwWall.SetIncline(wIn, true);

            Wall wpcWall = walls[1] = new Wall(wl, "Ceiling in the west perimeter zone");
            wpcWall.SurfaceArea = 3 * 5;
            outdoorSurfaces.Add(wpcWall.GetSurface(true));
            wpZone.AddSurface(wpcWall.GetSurface(false));
            wpcWall.SetIncline(hIn, true);

            Wall wpfWall = walls[2] = new Wall(wl, "Floor in the west perimeter zone");
            wpfWall.SurfaceArea = 3 * 5;
            outdoor.AddGroundWallSurface(wpfWall.GetSurface(true));
            wpZone.AddSurface(wpfWall.GetSurface(false));

            Wall winWall = walls[3] = new Wall(wl, "North wall in the west interior zone");
            winWall.SurfaceArea = 3 * 5;
            outdoorSurfaces.Add(winWall.GetSurface(true));
            wiZone.AddSurface(winWall.GetSurface(false));
            winWall.SetIncline(nIn, true);

            Wall wiwWall = walls[4] = new Wall(wl, "West wall in the west interior zone");
            wiwWall.SurfaceArea = 3 * 4;
            outdoorSurfaces.Add(wiwWall.GetSurface(true));
            wiZone.AddSurface(wiwWall.GetSurface(false));
            wiwWall.SetIncline(wIn, true);

            Wall wicWall = walls[5] = new Wall(wl, "Ceiling in the west interior zone");
            wicWall.SurfaceArea = 4 * 5;
            outdoorSurfaces.Add(wicWall.GetSurface(true));
            wiZone.AddSurface(wicWall.GetSurface(false));
            wicWall.SetIncline(hIn, true);

            Wall wifWall = walls[6] = new Wall(wl, "Floor in the west interior zone");
            wifWall.SurfaceArea = 4 * 5;
            outdoor.AddGroundWallSurface(wifWall.GetSurface(true));
            wiZone.AddSurface(wifWall.GetSurface(false));

            Wall epwWall = walls[7] = new Wall(wl, "East wall in the east perimeter zone");
            epwWall.SurfaceArea = 3 * 3;
            outdoorSurfaces.Add(epwWall.GetSurface(true));
            epZone.AddSurface(epwWall.GetSurface(false));
            epwWall.SetIncline(eIn, true);

            Wall epcWall = walls[8] = new Wall(wl, "Ceiling in the east perimeter zone");
            epcWall.SurfaceArea = 3 * 5;
            outdoorSurfaces.Add(epcWall.GetSurface(true));
            epZone.AddSurface(epcWall.GetSurface(false));
            epcWall.SetIncline(hIn, true);

            Wall epfWall = walls[9] = new Wall(wl, "Floor in the east perimeter zone");
            epfWall.SurfaceArea = 3 * 5;
            outdoor.AddGroundWallSurface(epfWall.GetSurface(true));
            epZone.AddSurface(epfWall.GetSurface(false));

            Wall einWall = walls[10] = new Wall(wl, "North wall in the east interior zone");
            einWall.SurfaceArea = 5 * 3;
            outdoorSurfaces.Add(einWall.GetSurface(true));
            eiZone.AddSurface(einWall.GetSurface(false));
            einWall.SetIncline(nIn, true);

            Wall eiwWall = walls[11] = new Wall(wl, "East wall in the east interior zone");
            eiwWall.SurfaceArea = 4 * 3;
            outdoorSurfaces.Add(eiwWall.GetSurface(true));
            eiZone.AddSurface(eiwWall.GetSurface(false));
            eiwWall.SetIncline(eIn, true);

            Wall eicWall = walls[12] = new Wall(wl, "Ceiling in the east interior zone");
            eicWall.SurfaceArea = 4 * 5;
            outdoorSurfaces.Add(eicWall.GetSurface(true));
            eiZone.AddSurface(eicWall.GetSurface(false));
            eicWall.SetIncline(hIn, true);

            Wall eifWall = walls[13] = new Wall(wl, "Floor in the east interior zone");
            eifWall.SurfaceArea = 4 * 5;
            outdoor.AddGroundWallSurface(eifWall.GetSurface(true));
            eiZone.AddSurface(eifWall.GetSurface(false));

            Wall cpWall = walls[14] = new Wall(wl, "Inner wall at perimeter");
            cpWall.SurfaceArea = 3 * 3;
            wpZone.AddSurface(cpWall.GetSurface(true));
            epZone.AddSurface(cpWall.GetSurface(false));

            Wall ciWall = walls[15] = new Wall(wl, "Inner wall at interior");
            ciWall.SurfaceArea = 4 * 3;
            wiZone.AddSurface(ciWall.GetSurface(true));
            eiZone.AddSurface(ciWall.GetSurface(false));

            Wall wpsWall = walls[16] = new Wall(wl, "South wall in the west perimeter zone");
            wpsWall.SurfaceArea = 5 * 3 - 3 * 2;    //Reduce window surface area
            outdoorSurfaces.Add(wpsWall.GetSurface(true));
            wpZone.AddSurface(wpsWall.GetSurface(false));
            wpsWall.SetIncline(sIn, true);

            Wall epsWall = walls[17] = new Wall(wl, "South wall in the east perimeter zone");
            epsWall.SurfaceArea = 5 * 3 - 3 * 2;    //Reduce window surface area
            outdoorSurfaces.Add(epsWall.GetSurface(true));
            epZone.AddSurface(epsWall.GetSurface(false));
            epsWall.SetIncline(sIn, true);

            //Initialize outdoor surfaces
            foreach (WallSurface ws in outdoorSurfaces)
            {
                //Add wall surfaces to Outdoor object
                outdoor.AddWallSurface(ws);
                //Initialize emissivity of surface
                ws.InitializeEmissivity(WallSurface.SurfaceMaterial.Concrete);
            }

            //Add windows to the west zone
            Window wWind = new Window(gPanes, "Window in the west perimeter zone");
            wWind.SurfaceArea = 3 * 2;
            wpZone.AddWindow(wWind);
            outdoor.AddWindow(wWind);
            //Add windows to the east zone
            Window eWind = new Window(gPanes, "Window in the east perimeter zone");
            eWind.SurfaceArea = 3 * 2;
            //Set horizontal sun shade.
            eWind.Shade = SunShade.MakeHorizontalSunShade(3, 2, 1, 1, 1, 0.5, sIn);
            wpZone.AddWindow(eWind);
            outdoor.AddWindow(eWind);

            //Creat an insances of the Room class and MultiRoom class
            Room eRm = new Room(new Zone[] { epZone, eiZone }); //East room
            Room wRm = new Room(new Zone[] { wpZone, wiZone }); //Weast room
            MultiRoom mRoom = new MultiRoom(new Room[] { eRm, wRm }); //Multi room (east and west rooms)
            mRoom.SetTimeStep(3600);

            //Set ventilation volume
            wpZone.VentilationVolume = 10; //Only west perimeter zone has outdoor air ventilation
            mRoom.SetAirFlow(wpZone, wiZone, 10);
            mRoom.SetAirFlow(epZone, eiZone, 10);
            mRoom.SetAirFlow(eiZone, epZone, 10);

            //Set short wave radiation distribution:60% of short wave is distributed to perimeter floor.
            double sfSum = 0;
            foreach (ISurface isf in eRm.GetSurface()) sfSum += isf.Area;
            sfSum -= epfWall.SurfaceArea;
            foreach (ISurface isf in eRm.GetSurface()) eRm.SetShortWaveRadiationRate(isf, isf.Area / sfSum * 0.4);
            eRm.SetShortWaveRadiationRate(epfWall.GetSurface(false), 0.6);
            sfSum = 0;
            foreach (ISurface isf in wRm.GetSurface()) sfSum += isf.Area;
            sfSum -= wpfWall.SurfaceArea;
            foreach (ISurface isf in wRm.GetSurface()) wRm.SetShortWaveRadiationRate(isf, isf.Area / sfSum * 0.4);
            wRm.SetShortWaveRadiationRate(wpfWall.GetSurface(false), 0.6);

            //Output title wrine to standard output stream
            StreamWriter sWriter = new StreamWriter("AirStateAndHeatLoadTest2.csv");
            foreach (Zone zn in zones) sWriter.Write(zn.Name + "Drybulb temperature[C], " + zn.Name +
                                      "Humidity ratio[kg/kgDA], " + zn.Name + "Sensible heat load[W], " + zn.Name + "Latent heat load[W], ");
            sWriter.WriteLine();

            //Update the state (Iterate 100 times to make state steady)
            for (int i = 0; i < 100; i++)
            {
                DateTime dTime = new DateTime(2007, 8, 3, 0, 0, 0);
                for (int j = 0; j < 24; j++)
                {
                    //Set date and time to Sun and Zone object.
                    sun.Update(dTime);
                    mRoom.SetCurrentDateTime(dTime);

                    //Operate HVAC system (8:00~19:00)
                    bool operating = (8 <= dTime.Hour && dTime.Hour <= 19);
                    foreach (Zone zn in zones)
                    {
                        zn.ControlHumidityRatio = operating;
                        zn.ControlDrybulbTemperature = operating;
                    }

                    //Set weather state.
                    outdoor.AirState = new MoistAir(dbt[j], hum[j]);
                    outdoor.NocturnalRadiation = nrd[j];
                    sun.SetGlobalHorizontalRadiation(drd[j], dnr[j]);

                    //Set ventilation air state.
                    wpZone.VentilationAirState = outdoor.AirState;

                    //Update boundary state of outdoor facing surfaces.
                    outdoor.SetWallSurfaceBoundaryState();

                    //Update the walls.
                    foreach (Wall wal in walls) wal.Update();

                    //Update the MultiRoom object.
                    mRoom.UpdateRoomTemperatures();
                    mRoom.UpdateRoomHumidities();

                    //Update date and time
                    dTime = dTime.AddHours(1);

                    //If it is last iteration, output result to CSV text.
                    if (i == 99)
                    {
                        foreach (Zone zn in zones)
                        {
                            sWriter.Write(zn.CurrentDrybulbTemperature.ToString("F1") + ", " + zn.CurrentHumidityRatio.ToString("F3") + ", " +
                            zn.CurrentSensibleHeatLoad.ToString("F0") + ", " + zn.CurrentLatentHeatLoad.ToString("F0") + ", ");
                        }
                        sWriter.WriteLine();
                    }
                }
            }

            sWriter.Close();
        }
コード例 #13
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>Sample program calculating the unsteady heat conduction of wall with latent heat storage material</summary>
        private static void wallTest3()
        {
            //Initial temperature
            const double INIT_TEMP = 35;

            //Create an instance of WallLayers class
            WallLayers wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.FrexibleBoard), 0.0165));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("dummy", 1, 1), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("dummy", 1, 1), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.ExtrudedPolystyreneFoam_3), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AirGap), 0.015));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));

            //Create an instance of Wall class
            Wall wall = new Wall(wl);
            wall.TimeStep = 1200;
            wall.AirTemperature1 = 20;
            wall.AirTemperature2 = 20;
            wall.SurfaceArea = 6.48;

            //Create an instance of LatentHeatStorageMaterial class
            LatentHeatStorageMaterial pmc1;
            pmc1 = new LatentHeatStorageMaterial(19, new WallMaterial("PCM1 (Solid)", 0.19, 3.6 * 1400));
            pmc1.AddMaterial(23, new WallMaterial("PCM1 (Two phase)", (0.19 + 0.22) / 2d, 15.1 * 1400));
            pmc1.AddMaterial(100, new WallMaterial("PCM1 (Liquid)", 0.22, 3.6 * 1400));
            pmc1.Initialize(INIT_TEMP);
            //Set PCM to second wall layer
            wall.SetLatentHeatStorageMaterial(1, pmc1);

            //Create an instance of LatentHeatStorageMaterial class
            LatentHeatStorageMaterial pcm2;
            pcm2 = new LatentHeatStorageMaterial(30, new WallMaterial("PCM2 (Solid)", 0.19, 3.6 * 1390));
            pcm2.AddMaterial(32, new WallMaterial("PCM2 (Two phase)", (0.19 + 0.22) / 2d, 63.25 * 1400));
            pcm2.AddMaterial(100, new WallMaterial("PCM2 (Liquid)", 0.22, 3.5 * 1410));
            pcm2.Initialize(INIT_TEMP);
            //Set PCM to third wall layer
            wall.SetLatentHeatStorageMaterial(2, pcm2);

            //Install heating tube between PMCs
            Tube tube = new Tube(0.84, 0.346, 4186);
            wall.AddTube(tube, 1);
            tube.SetFlowRate(0);
            tube.FluidTemperature = 40;

            //Initialize wall temperature
            wall.InitializeTemperature(INIT_TEMP);

            for (int i = 0; i < wall.Layers.LayerNumber; i++) Console.Write("Temperature" + i + ", ");
            Console.WriteLine("Heat storage[kJ]");
            for (int i = 0; i < 200; i++)
            {
                if (i == 100)
                {
                    tube.SetFlowRate(0.54); //Start heating
                    wall.AirTemperature1 = 30;
                    wall.AirTemperature2 = 30;
                }
                wall.Update();
                double[] tmp = wall.GetTemperatures();
                for (int j = 0; j < tmp.Length - 1; j++) Console.Write(((tmp[j] + tmp[j + 1]) / 2d).ToString("F1") + ", ");
                Console.Write(wall.GetHeatStorage(INIT_TEMP).ToString("F0"));
                Console.WriteLine();
            }
            Console.Read();
        }
コード例 #14
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>壁熱貫流テスト(冷温水配管埋設)</summary>
        private static void wallHeatTransferTest2()
        {
            WallLayers wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.FrexibleBoard), 0.0165));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("水", 0.59, 4186), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("水", 0.59, 4186), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.ExtrudedPolystyreneFoam_3), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AirGap), 0.015));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));
            Wall wall = new Wall(wl);
            wall.TimeStep = 300;
            wall.AirTemperature1 = 20;
            wall.AirTemperature2 = 10;
            wall.SurfaceArea = 6.48;

            //配管を埋設
            Tube tube = new Tube(0.84, 0.346, 4186);
            wall.AddTube(tube, 1);
            tube.SetFlowRate(0);    //最初は流量0
            tube.FluidTemperature = 30;

            wall.InitializeTemperature(20); //壁体温度を初期化

            for (int i = 0; i < wall.Layers.LayerNumber; i++) Console.Write("温度" + i + ", ");
            Console.WriteLine("配管への熱移動量[W], 配管出口温度[C]");
            for (int i = 0; i < 100; i++)
            {
                if (i == 50) tube.SetFlowRate(0.54);    //通水開始
                wall.Update();
                double[] tmp = wall.GetTemperatures();
                for (int j = 0; j < tmp.Length - 1; j++) Console.Write(((tmp[j] + tmp[j + 1]) / 2d).ToString("F1") + ", ");
                Console.Write(wall.GetHeatTransferToTube(1).ToString("F0") + ", " + tube.GetOutletFluidTemperature().ToString("F1"));
                Console.WriteLine();
            }
            Console.Read();
        }
コード例 #15
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void makeFloors(Dictionary<string, Zone> zones,
            Dictionary<string, WallLayers> wallLayers, out Dictionary<string, Wall> floors)
        {
            floors = new Dictionary<string, Wall>();
            Wall floor;

            floor = new Wall(wallLayers["屋根2"], "CE-1");
            floor.SurfaceArea = 17.4;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2F主寝室"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-2");
            floor.SurfaceArea = 10.7;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2F子供室1"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-3");
            floor.SurfaceArea = 10.1;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2F予備室"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-4");
            floor.SurfaceArea = 9.9;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2F子供室2"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-5");
            floor.SurfaceArea = 4.2;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2F廊下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-6");
            floor.SurfaceArea = 3.1;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2F押入1"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-7");
            floor.SurfaceArea = 0.8;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2F押入2"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-8");
            floor.SurfaceArea = 1.7;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2F押入3"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-9");
            floor.SurfaceArea = 1.7;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["2FWC"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["屋根2"], "CE-10");
            floor.SurfaceArea = 3.3;
            zones["屋根裏"].AddSurface(floor.GetSurface(true));
            zones["階段室"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-1");
            floor.SurfaceArea = 17.4;
            zones["2F主寝室"].AddSurface(floor.GetSurface(true));
            zones["1F居間"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-2");
            floor.SurfaceArea = 17.4;
            zones["2F押入1"].AddSurface(floor.GetSurface(true));
            zones["1F居間"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-3");
            floor.SurfaceArea = 10.7 - 0.91 * 0.91;
            zones["1F和室"].AddSurface(floor.GetSurface(true));
            zones["2F子供室1"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-4");
            floor.SurfaceArea = 0.91 * 0.91;
            zones["2F子供室1"].AddSurface(floor.GetSurface(true));
            zones["1F押入"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-5");
            floor.SurfaceArea = 0.8;
            zones["2F押入2"].AddSurface(floor.GetSurface(true));
            zones["1F和室"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-6");
            floor.SurfaceArea = 0.8;
            zones["2F押入3"].AddSurface(floor.GetSurface(true));
            zones["1F和室"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-7");
            floor.SurfaceArea = 0.8;
            zones["2F押入3"].AddSurface(floor.GetSurface(true));
            zones["1F押入"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-8");
            floor.SurfaceArea = 3.185 * 2.275;
            zones["2F予備室"].AddSurface(floor.GetSurface(true));
            zones["1F台所"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-9");
            floor.SurfaceArea = 3.185 * 0.91;
            zones["2F予備室"].AddSurface(floor.GetSurface(true));
            zones["1F廊下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-10");
            floor.SurfaceArea = 4.2;
            zones["2F廊下"].AddSurface(floor.GetSurface(true));
            zones["1F廊下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-11");
            floor.SurfaceArea = 1.7;
            zones["2FWC"].AddSurface(floor.GetSurface(true));
            zones["1F廊下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-12");
            floor.SurfaceArea = 1.82 * 0.91;
            zones["2F子供室2"].AddSurface(floor.GetSurface(true));
            zones["1F廊下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-13");
            floor.SurfaceArea = 2.73 * 1.82;
            zones["2F子供室2"].AddSurface(floor.GetSurface(true));
            zones["1F洗面所"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-14");
            floor.SurfaceArea = 1.82 * 1.82;
            zones["2F子供室2"].AddSurface(floor.GetSurface(true));
            zones["1F浴室"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["2F床"], "FL2-15");
            floor.SurfaceArea = 0.91 * 1.82;
            zones["階段室"].AddSurface(floor.GetSurface(true));
            zones["1FWC"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["1F床"], "FL1-1");
            floor.SurfaceArea = 20.5;
            zones["1F居間"].AddSurface(floor.GetSurface(true));
            zones["床下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["1F床"], "FL1-2");
            floor.SurfaceArea = 11.6;
            zones["1F和室"].AddSurface(floor.GetSurface(true));
            zones["床下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["1F床"], "FL1-3");
            floor.SurfaceArea = 7.2;
            zones["1F台所"].AddSurface(floor.GetSurface(true));
            zones["床下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["1F床"], "FL1-4");
            floor.SurfaceArea = 5.0;
            zones["1F洗面所"].AddSurface(floor.GetSurface(true));
            zones["床下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["1F床"], "FL1-5");
            floor.SurfaceArea = 3.3;
            zones["1F浴室"].AddSurface(floor.GetSurface(true));
            zones["床下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["1F床"], "FL1-6");
            floor.SurfaceArea = 1.7;
            zones["1FWC"].AddSurface(floor.GetSurface(true));
            zones["床下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["1F床"], "FL1-7");
            floor.SurfaceArea = 1.7;
            zones["1F廊下"].AddSurface(floor.GetSurface(true));
            zones["床下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            floor = new Wall(wallLayers["1F床"], "FL1-8");
            floor.SurfaceArea = 1.7;
            zones["1F押入"].AddSurface(floor.GetSurface(true));
            zones["床下"].AddSurface(floor.GetSurface(false));
            floors.Add(floor.Name, floor);

            //総合熱伝達率設定
            foreach (string key in floors.Keys)
            {
                floors[key].GetSurface(true).FilmCoefficient = (4.6 + 1.5) / 2 + 4.7;
                floors[key].GetSurface(true).ConvectiveRate = (4.6 + 1.5) / 2 / floors[key].GetSurface(true).FilmCoefficient;
                floors[key].GetSurface(false).FilmCoefficient = (4.6 + 1.5) / 2 + 4.7;
                floors[key].GetSurface(false).ConvectiveRate = (4.6 + 1.5) / 2 / floors[key].GetSurface(false).FilmCoefficient;

                //上下別の設定
                /*floors[key].GetSurface(true).FilmCoefficient = 4.6 + 4.7;
                floors[key].GetSurface(true).ConvectiveRate = 4.6 / (4.6 + 4.7);
                floors[key].GetSurface(false).FilmCoefficient = 1.5 + 4.7;
                floors[key].GetSurface(false).ConvectiveRate = 1.5 / (1.5 + 4.7);*/

                floors[key].TimeStep = TIME_STEP;
            }
        }
コード例 #16
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>壁熱貫流テスト(潜熱蓄熱材)</summary>
        private static void wallHeatTransferTest3()
        {
            //初期温度
            const double INIT_TEMP = 35;

            //壁層を作成
            WallLayers wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.FrexibleBoard), 0.0165));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("ダミー材料", 1, 1), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("ダミー材料", 1, 1), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.ExtrudedPolystyreneFoam_3), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AirGap), 0.015));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));

            //壁体を作成
            Wall wall = new Wall(wl);
            wall.TimeStep = 1200;
            wall.AirTemperature1 = 20;
            wall.AirTemperature2 = 20;
            wall.SurfaceArea = 6.48;

            //潜熱蓄熱材1を作成して設定
            LatentHeatStorageMaterial material1;
            material1 = new LatentHeatStorageMaterial(19, new WallMaterial("パッシブ・スミターマル(凝固)", 0.19, 3.6 * 1400));
            material1.AddMaterial(23, new WallMaterial("パッシブ・スミターマル(遷移)", (0.19 + 0.22) / 2d, 15.1 * 1400));
            material1.AddMaterial(100, new WallMaterial("パッシブ・スミターマル(融解)", 0.22, 3.6 * 1400));
            material1.Initialize(INIT_TEMP);
            wall.SetLatentHeatStorageMaterial(1, material1);

            //潜熱蓄熱材2を作成して設定
            LatentHeatStorageMaterial material2;
            material2 = new LatentHeatStorageMaterial(30, new WallMaterial("スミターマル(凝固)", 0.19, 3.6 * 1390));
            material2.AddMaterial(32, new WallMaterial("スミターマル(遷移)", (0.19 + 0.22) / 2d, 63.25 * 1400));
            material2.AddMaterial(100, new WallMaterial("スミターマル(融解)", 0.22, 3.5 * 1410));
            material2.Initialize(INIT_TEMP);
            wall.SetLatentHeatStorageMaterial(2, material2);

            //潜熱蓄熱材の間に配管を埋設
            Tube tube = new Tube(0.84, 0.346, 4186);
            wall.AddTube(tube, 1);
            tube.SetFlowRate(0);
            tube.FluidTemperature = 40;

            //壁体温度を初期化
            wall.InitializeTemperature(INIT_TEMP);

            for (int i = 0; i < wall.Layers.LayerNumber; i++) Console.Write("温度" + i + ", ");
            Console.WriteLine("蓄熱量[kJ]");
            for (int i = 0; i < 200; i++)
            {
                if (i == 100)
                {
                    tube.SetFlowRate(0.54);    //通水開始
                    wall.AirTemperature1 = 30;
                    wall.AirTemperature2 = 30;
                }
                wall.Update();
                double[] tmp = wall.GetTemperatures();
                for (int j = 0; j < tmp.Length - 1; j++) Console.Write(((tmp[j] + tmp[j + 1]) / 2d).ToString("F1") + ", ");
                Console.Write(wall.GetHeatStorage(INIT_TEMP).ToString("F0"));
                Console.WriteLine();
            }
            Console.Read();
        }
コード例 #17
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void makeInWalls(
            Dictionary<string, Zone> zones, Dictionary<string, WallLayers> wallLayers, Dictionary<string, Wall> doors,
            out Dictionary<string, Wall> inWalls)
        {
            inWalls = new Dictionary<string, Wall>();
            Wall inWall;

            inWall = new Wall(wallLayers["内壁"], "IW1-1");
            inWall.SurfaceArea = 3.64 * 2.7;
            zones["1F居間"].AddSurface(inWall.GetSurface(true));
            zones["1F和室"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-2");
            inWall.SurfaceArea = 0.91 * 2.7;
            zones["1F和室"].AddSurface(inWall.GetSurface(true));
            zones["1F押入"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-3");
            inWall.SurfaceArea = 1.82 * 2.7;
            zones["1F和室"].AddSurface(inWall.GetSurface(true));
            zones["1F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-4");
            inWall.SurfaceArea = 0.91 * 2.7;
            zones["1F和室"].AddSurface(inWall.GetSurface(true));
            zones["1F浴室"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-5");
            inWall.SurfaceArea = 0.91 * 2.7;
            zones["1F押入"].AddSurface(inWall.GetSurface(true));
            zones["1F浴室"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-6");
            inWall.SurfaceArea = 1.82 * 2.7;
            zones["1F廊下"].AddSurface(inWall.GetSurface(true));
            zones["1F浴室"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-7");
            inWall.SurfaceArea = 1.82 * 2.7 - doors["DR1-3"].SurfaceArea;
            zones["1F洗面所"].AddSurface(inWall.GetSurface(true));
            zones["1F浴室"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-8");
            inWall.SurfaceArea = 0.91 * 2.7 - doors["DR1-4"].SurfaceArea;
            zones["1F洗面所"].AddSurface(inWall.GetSurface(true));
            zones["1F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-9");
            inWall.SurfaceArea = 1.82 * 2.7;
            zones["1F洗面所"].AddSurface(inWall.GetSurface(true));
            zones["1FWC"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-10");
            inWall.SurfaceArea = 1.82 * 2.7;
            zones["階段室"].AddSurface(inWall.GetSurface(true));
            zones["1F浴室"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-11");
            inWall.SurfaceArea = 3.185 * 2.7 - doors["DR1-8"].SurfaceArea;
            zones["1F台所"].AddSurface(inWall.GetSurface(true));
            zones["1F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-12");
            inWall.SurfaceArea = 2.73 * 2.7 - doors["DR1-6"].SurfaceArea;
            zones["1F居間"].AddSurface(inWall.GetSurface(true));
            zones["1F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW1-13");
            inWall.SurfaceArea = 0.91 * 2.7 - doors["DR1-5"].SurfaceArea;
            zones["1FWC"].AddSurface(inWall.GetSurface(true));
            zones["1F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-1");
            inWall.SurfaceArea = 3.64 * 2.7;
            zones["2F主寝室"].AddSurface(inWall.GetSurface(true));
            zones["2F子供室1"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-2");
            inWall.SurfaceArea = 3.185 * 2.7;
            zones["2F主寝室"].AddSurface(inWall.GetSurface(true));
            zones["2F予備室"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-3");
            inWall.SurfaceArea = 1.82 * 2.7;
            zones["2F子供室1"].AddSurface(inWall.GetSurface(true));
            zones["2F押入3"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-4");
            inWall.SurfaceArea = 0.91 * 2.7;
            zones["2F押入2"].AddSurface(inWall.GetSurface(true));
            zones["2F押入3"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-5");
            inWall.SurfaceArea = 0.91 * 2.7;
            zones["2F押入2"].AddSurface(inWall.GetSurface(true));
            zones["2F子供室2"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-6");
            inWall.SurfaceArea = 1.82 * 2.7;
            zones["階段室"].AddSurface(inWall.GetSurface(true));
            zones["2F子供室2"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-7");
            inWall.SurfaceArea = 1.82 * 2.7;
            zones["階段室"].AddSurface(inWall.GetSurface(true));
            zones["2FWC"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-8");
            inWall.SurfaceArea = 1.82 * 2.7;
            zones["2F予備室"].AddSurface(inWall.GetSurface(true));
            zones["2FWC"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-9");
            inWall.SurfaceArea = 0.91 * 2.7;
            zones["階段室"].AddSurface(inWall.GetSurface(true));
            zones["2F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-10");
            inWall.SurfaceArea = 1.82 * 2.7 - doors["DR2-2"].SurfaceArea;
            zones["2F主寝室"].AddSurface(inWall.GetSurface(true));
            zones["2F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-11");
            inWall.SurfaceArea = 0.91 * 2.7 - doors["DR2-8"].SurfaceArea;
            zones["2F子供室1"].AddSurface(inWall.GetSurface(true));
            zones["2F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-12");
            inWall.SurfaceArea = 0.91 * 2.7;
            zones["2F主寝室"].AddSurface(inWall.GetSurface(true));
            zones["2F押入1"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-13");
            inWall.SurfaceArea = 0.91 * 2.7 - doors["DR2-7"].SurfaceArea;
            zones["2FWC"].AddSurface(inWall.GetSurface(true));
            zones["2F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-14");
            inWall.SurfaceArea = 1.82 * 2.7 - doors["DR2-5"].SurfaceArea;
            zones["2F子供室2"].AddSurface(inWall.GetSurface(true));
            zones["2F廊下"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            inWall = new Wall(wallLayers["内壁"], "IW2-15");
            inWall.SurfaceArea = 0.91 * 2.7;
            zones["2F子供室1"].AddSurface(inWall.GetSurface(true));
            zones["2F押入2"].AddSurface(inWall.GetSurface(false));
            inWalls.Add(inWall.Name, inWall);

            //総合熱伝達率設定
            foreach (string key in inWalls.Keys)
            {
                inWalls[key].GetSurface(true).FilmCoefficient = AI;
                inWalls[key].GetSurface(false).FilmCoefficient = AI;
                inWalls[key].TimeStep = TIME_STEP;
            }
        }
コード例 #18
0
ファイル: Program.cs プロジェクト: windripple/popolo
        //パソコンによる空気調和計算法 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);
        }
コード例 #19
0
ファイル: Program.cs プロジェクト: windripple/popolo
        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);
        }
コード例 #20
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void RoomModelTest()
        {
            //夏か否か
            bool IS_SUMMER = true;

            //タイムステップ
            const double TIME_STEP = 1800;

            //室を作成
            Zone room;
            Sun sun;
            Wall exWall, inWall, floor, ceiling;
            Outdoor oDoor;
            makeRoom(TIME_STEP, out room, out exWall, out inWall, out ceiling, out floor, out sun, out oDoor);
            Wall[] walls = new Wall[] { exWall, inWall, ceiling, floor };
            Zone[] rooms = new Zone[] { room };

            //発熱要素
            ConstantHeatGain hGain;
            if(IS_SUMMER) hGain = new ConstantHeatGain(55 * 16 * 0.5 + 2900 * 0.6 + 500 * 0.6, 55 * 16 * 0.5 + 2900 * 0.4 + 500 * 0.4, (119 - 55) * 16);
            else hGain = new ConstantHeatGain((71 * 16 * 0.5 + 2900 * 0.6 + 500 * 0.6) * 0.5, (71 * 16 * 0.5 + 2900 * 0.4 + 500 * 0.4) * 0.5, ((119 - 71) * 16) * 0.5);

            //設計用気象データ
            double[] wdIdn, wdIsky, wdDbt, wdAhd, wdRN;
            if (IS_SUMMER)
            {
                wdIdn = new double[] { 0, 0, 0, 0, 0, 244, 517, 679, 774, 829, 856, 862, 847, 809, 739, 619, 415, 97, 0, 0, 0, 0, 0, 0 };
                wdIsky = new double[] { 0, 0, 0, 0, 21, 85, 109, 116, 116, 113, 110, 109, 111, 114, 116, 114, 102, 63, 0, 0, 0, 0, 0, 0 };
                wdDbt = new double[] { 27.4, 27.1, 26.8, 26.5, 26.9, 27.7, 28.8, 29.8, 30.8, 31.5, 32.1, 32.6, 32.9, 33.2, 33.5, 33.1, 32.4, 31.5, 30.6, 29.8, 29.1, 28.5, 28.1, 27.7 };
                wdAhd = new double[] { 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018, 0.018 };
                wdRN = new double[] { 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 25, 25, 25, 25, 24, 24, 24 };
                room.DrybulbTemperatureSetPoint = 26;
                room.HumidityRatioSetPoint = 0.0105;
            }
            else
            {
                wdIdn = new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                wdIsky = new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                wdDbt = new double[] { 0.3, 0.1, 0, -0.2, -0.4, -0.5, -0.2, 0.5, 1.2, 1.9, 2.4, 2.8, 3.1, 3.3, 3.5, 3.3, 3, 2.6, 2.1, 1.7, 1.3, 0.9, 0.7, 0.4 };
                wdAhd = new double[] { 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014, 0.0014 };
                //wdRN = new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                wdRN = new double[] { 124, 123, 123, 123, 123, 122, 123, 124, 125, 127, 128, 128, 129, 129, 130, 129, 129, 128, 127, 126, 126, 125, 124, 124 };
                room.DrybulbTemperatureSetPoint = 22;
                room.HumidityRatioSetPoint = 0.0082;
            }

            using (StreamWriter sWriter = new StreamWriter("test.csv", false, Encoding.GetEncoding("Shift_JIS")))
            {
                sWriter.WriteLine("時刻,室乾球温度[C],顕熱負荷[W],室絶対湿度[kg/kg(DA)],潜熱負荷[W], 周壁平均温度[C]");

                DateTime dt;
                if(IS_SUMMER) dt = new DateTime(1999, 7, 21);
                else dt = new DateTime(1999, 1, 21);

                for (int i = 0; i < (10 * 24 + 1) * 60 * 60 / TIME_STEP; i++)
                {
                    //外気条件を更新
                    int wdIndex = dt.Hour;
                    wdIndex--;
                    if (wdIndex < 0) wdIndex = 23;
                    double dbt = wdDbt[wdIndex];
                    double ahd = wdAhd[wdIndex];
                    oDoor.AirState = MoistAir.GetAirStateFromDBHR(dbt, ahd);
                    room.VentilationAirState = MoistAir.GetAirStateFromDBHR(dbt, ahd);

                    //太陽の情報を更新
                    sun.Update(dt);
                    sun.SetGlobalHorizontalRadiation(wdIsky[wdIndex], wdIdn[wdIndex]);

                    //隣室温度を設定
                    ceiling.AirTemperature1 = floor.AirTemperature2 = room.CurrentDrybulbTemperature;
                    inWall.AirTemperature2 = room.CurrentDrybulbTemperature * 0.7 + dbt * 0.3;

                    //室内発熱要素を設定
                    if (9 <= dt.Hour && dt.Hour <= 18) room.AddHeatGain(hGain);
                    else room.RemoveHeatGain(hGain);

                    //室温制御を更新
                    room.ControlDrybulbTemperature = (8 <= dt.Hour && dt.Hour <= 18);
                    room.ControlHumidityRatio = (8 <= dt.Hour && dt.Hour <= 18);

                    //相当外気温度を更新
                    oDoor.SetWallSurfaceBoundaryState();
                    oDoor.NocturnalRadiation = wdRN[wdIndex];

                    //壁の熱流CFを更新
                    foreach (Wall wall in walls) wall.Update();

                    //室を更新
                    room.Update();

                    //書き出し
                    sWriter.WriteLine(dt.ToShortTimeString() + "," + room.CurrentDrybulbTemperature + ", " +
                        room.CurrentSensibleHeatLoad + "," + room.CurrentHumidityRatio + ", " + room.CurrentLatentHeatLoad + "," + room.CurrentMeanRadiantTemperature);

                    dt = dt.AddSeconds(TIME_STEP);
                    if (i == 24 * 60 * 60 / TIME_STEP)
                    {
                        if (IS_SUMMER) dt = new DateTime(1999, 7, 21);
                        else dt = new DateTime(1999, 1, 21);
                    }

                }
            }
        }
コード例 #21
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <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();
        }