コード例 #1
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void wallOverallHeatTransferCoefTest()
        {
            //多層壁オブジェクトを作成
            WallLayers wLayers = new WallLayers("熱貫流率計算用多層壁");

            //壁層の素材を作成
            WallMaterial[] materials = new WallMaterial[4];
            //第1層:合板
            materials[0] = new WallMaterial(WallMaterial.PredefinedMaterials.Plywood);
            //第2層:非密閉空気層
            materials[1] = new WallMaterial(WallMaterial.PredefinedMaterials.AirGap);
            //第3層:鉄筋コンクリート
            materials[2] = new WallMaterial(WallMaterial.PredefinedMaterials.ReinforcedConcrete);
            //第4層:漆喰
            materials[3] = new WallMaterial("漆喰", 0.7, 1000);

            //壁の各層を作成
            //合板:20mm
            wLayers.AddLayer(new WallLayers.Layer(materials[0], 0.02));
            //空気層:厚みは関係なし
            wLayers.AddLayer(new WallLayers.Layer(materials[1], 0.01));
            //鉄筋コンクリート:150mm
            wLayers.AddLayer(new WallLayers.Layer(materials[2], 0.15));
            //漆喰:10mm
            wLayers.AddLayer(new WallLayers.Layer(materials[3], 0.01));

            //結果書き出し
            Console.WriteLine("壁層の構成");
            for (uint i = 0; i < wLayers.LayerNumber; i++)
            {
                WallLayers.Layer layer = wLayers.GetLayer(i);
                Console.WriteLine("第" + (i + 1) + "層:" + layer.Material.Name + "(" + layer.Thickness + "m)");
            }
            Console.WriteLine("熱貫流率=" + wLayers.GetThermalTransmission().ToString("F1") + " W/(m2-K)");
            Console.WriteLine();

            //軽量コンクリートに変えてみる
            wLayers.ReplaceLayer(2, new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.LightweightConcrete), 0.15));

            //結果書き出し
            Console.WriteLine("壁層の構成");
            for (uint i = 0; i < wLayers.LayerNumber; i++)
            {
                WallLayers.Layer layer = wLayers.GetLayer(i);
                Console.WriteLine("第" + (i + 1) + "層:" + layer.Material.Name + "(" + layer.Thickness + "m)");
            }
            Console.WriteLine("熱貫流率=" + wLayers.GetThermalTransmission().ToString("F1") + " W/(m2-K)");

            Console.Read();
        }
コード例 #2
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();
        }
コード例 #3
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();
        }
コード例 #4
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();
        }
コード例 #5
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();
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: windripple/popolo
        private static void rFactorSample()
        {
            WallLayers wallLayers = new WallLayers();
            wallLayers.AddLayer(new WallLayers.Layer(new WallMaterial("コンクリート", 1.4, 1934), 0.15));
            wallLayers.AddLayer(new WallLayers.Layer(new WallMaterial("ロックウール", 0.042, 84), 0.05));
            wallLayers.AddLayer(new WallLayers.Layer(new WallMaterial("中空層", 11.6, 0), 0.02));
            wallLayers.AddLayer(new WallLayers.Layer(new WallMaterial("アルミ化粧板", 210, 2373), 0.002));

            double[] rfx = new double[8];
            double[] rfy = new double[8];
            double[] rfz = new double[8];
            double commonRatio = 0;
            ResponseFactor.GetResponseFactor(3600, 9.3, 23.0, wallLayers, 8, ref rfx, ref rfy, ref rfz, out commonRatio);

            Console.WriteLine(wallLayers.GetThermalTransmission(9.3, 23));

            double[] temperatures1 = 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 };
            double[] temperatures2 = new double[24];
            for (int i = 0; i < temperatures2.Length; i++) temperatures2[i] = 26.0d;
            double[] qloads = new double[24];
            int hour = 0;
            double kValue = wallLayers.GetThermalTransmission(9.3,23.0);
            double q1 = 0;
            double q2 = 0;
            while (true)
            {
                Console.Write(hour.ToString() + "時: ");

                ResponseFactor.GetHeatFlow(temperatures1, temperatures2, rfx, rfy, rfz, commonRatio, q1, q2, out q1, out q2);
                Console.WriteLine(temperatures1[0].ToString("F1") + " C  " + q2.ToString("F1") + " W/m2  " + (q2 / kValue).ToString("F1") + " C");
                if (Math.Abs(q2 - qloads[hour]) < 0.0001) break;
                else qloads[hour] = q2;

                //温度をずらす
                double tmp = temperatures1[0];
                for (int j = 1; j < temperatures1.Length; j++) temperatures1[j - 1] = temperatures1[j];
                temperatures1[temperatures1.Length - 1] = tmp;

                hour++;
                if (hour == 24) hour = 0;
            }
        }
コード例 #7
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();
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>HighConductanceWallを作成する</summary>
        /// <returns>HighConductanceWall</returns>
        private static WallLayers makeHighConductanceWall()
        {
            WallLayers hcWall = new WallLayers("HighConductanceWall");
            //外壁構成
            WallLayers.Layer layer;
            layer = new WallLayers.Layer(new WallMaterial("Glass", 1.06, 0.75 * 2500), 3.175 / 1000);
            hcWall.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("Air-gap", 6.297, 0), 0);
            hcWall.AddLayer(layer);
            layer = new WallLayers.Layer(new WallMaterial("Glass", 1.06, 0.75 * 2500), 3.175 / 1000);
            hcWall.AddLayer(layer);

            return hcWall;
        }
コード例 #9
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);
        }
コード例 #10
0
ファイル: Program.cs プロジェクト: windripple/popolo
        static void makeWallLayers(out Dictionary<string, WallLayers> wallLayers)
        {
            bool iDoorEqualToiWall = false;
            bool noIDoor = false;

            WallLayers wl;
            wallLayers = new Dictionary<string, WallLayers>();

            //外部ドア
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.012));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.GlassWoolInsulation_24K), 0.05));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.012));
            wallLayers.Add("外部ドア", wl);

            //室内ドア
            wl = new WallLayers();
            if (iDoorEqualToiWall)
            {
                wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Carpet), 0.012));
                wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.012));
                wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AirGap), 0.02));
                wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.PlasterBoard), 0.012));
            }
            else
            {
                wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.004));
                wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.SealedAirGap), 0.02));
                wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.004));
            }
            if (noIDoor) wl.AddLayer(new WallLayers.Layer(new WallMaterial("完全断熱材", 0.00000001, 0.0001), 10)); //断熱性能完全にしてドアなしを模擬
            wallLayers.Add("室内ドア", wl);

            //屋根1
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AsbestosPlate), 0.012));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.012));
            wallLayers.Add("屋根1", wl);

            //屋根2
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.GlassWoolInsulation_24K), 0.05));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.PlasterBoard), 0.012));
            wallLayers.Add("屋根2", wl);

            //外壁
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Mortar), 0.030));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.009));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AirGap), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.GlassWoolInsulation_24K), 0.05));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.PlasterBoard), 0.012));
            wallLayers.Add("外壁", wl);

            //内壁
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.PlasterBoard), 0.012));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AirGap), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.PlasterBoard), 0.012));
            wallLayers.Add("内壁", wl);

            //2F床
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Carpet), 0.012));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.012));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.AirGap), 0.02));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.PlasterBoard), 0.012));
            wallLayers.Add("2F床", wl);

            //1F床
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.010));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.012));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.GlassWoolInsulation_24K), 0.05));
            wallLayers.Add("1F床", wl);

            //1F和室床
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Tatami), 0.060));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Plywood), 0.012));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.GlassWoolInsulation_24K), 0.05));
            wallLayers.Add("1F和室床", wl);

            //サッシ//熱貫流率5.6W/m2K程度
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Aluminum), 0.005));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial("調整層", 36, 0), 0.005));
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Aluminum), 0.005));
            wallLayers.Add("サッシ", wl);

            //地面
            wl = new WallLayers();
            wl.AddLayer(new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.Soil), 1, 4));
            wallLayers.Add("地面", wl);
        }
コード例 #11
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>土中の壁構成を作成する</summary>
        private static void makeGroundWallLayer(out  WallLayers floorWallLayer, out WallLayers groundWallLayer)
        {
            const double GROUND_THICKNESS = 1.3;

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

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

            //床
            layer = new WallLayers.Layer(new WallMaterial("Concrete Slab", 1.130, 1400d * 1000d / 1000d), 0.08, 3);
            floorWallLayer.AddLayer(layer);
            //土の厚み
            layer = new WallLayers.Layer(new WallMaterial("Ground", 1.3, 800d * 1500d / 1000d), GROUND_THICKNESS, 6);
            floorWallLayer.AddLayer(layer);
        }
コード例 #12
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>Sample program calculating the thermal transimission of the wall layers</summary>
        private static void wallLayersTest()
        {
            //Create an instance of WallLayers
            WallLayers wLayers = new WallLayers("Sample wall layer");

            //Make an array of materials
            WallMaterial[] materials = new WallMaterial[4];
            //The first layer : plywood
            materials[0] = new WallMaterial(WallMaterial.PredefinedMaterials.Plywood);
            //The second layer : air gap
            materials[1] = new WallMaterial(WallMaterial.PredefinedMaterials.AirGap);
            //The thirg layer : concrete
            materials[2] = new WallMaterial(WallMaterial.PredefinedMaterials.ReinforcedConcrete);
            //The fourth layer : white Wash
            materials[3] = new WallMaterial("White Wash", 0.7, 1000);

            //Add a layer to WallLayers object
            //plywood : 20mm
            wLayers.AddLayer(new WallLayers.Layer(materials[0], 0.02));
            //air gap : heat conductance doesn't depend on thickness
            wLayers.AddLayer(new WallLayers.Layer(materials[1], 0.01));
            //concrete : 150mm
            wLayers.AddLayer(new WallLayers.Layer(materials[2], 0.15));
            //white Wash : 10mm
            wLayers.AddLayer(new WallLayers.Layer(materials[3], 0.01));

            //output result
            Console.WriteLine("Wall composition");
            for (uint i = 0; i < wLayers.LayerNumber; i++)
            {
                WallLayers.Layer layer = wLayers.GetLayer(i);
                Console.WriteLine("Layer " + (i + 1) + ":" + layer.Material.Name + "(" + layer.Thickness + "m)");
            }
            Console.WriteLine("Thermal transmission = " + wLayers.GetThermalTransmission().ToString("F1") + " W/(m2-K)");
            Console.WriteLine();

            //Replace concrete to light weight concrete
            wLayers.ReplaceLayer(2, new WallLayers.Layer(new WallMaterial(WallMaterial.PredefinedMaterials.LightweightConcrete), 0.15));

            //output result
            Console.WriteLine("Wall composition");
            for (uint i = 0; i < wLayers.LayerNumber; i++)
            {
                WallLayers.Layer layer = wLayers.GetLayer(i);
                Console.WriteLine("Layer " + (i + 1) + ":" + layer.Material.Name + "(" + layer.Thickness + "m)");
            }
            Console.WriteLine("Thermal transmission = " + wLayers.GetThermalTransmission().ToString("F1") + " W/(m2-K)");
            Console.WriteLine();

            Console.Read();
        }
コード例 #13
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();
        }
コード例 #14
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();
        }
コード例 #15
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);
        }
コード例 #16
0
ファイル: Program.cs プロジェクト: windripple/popolo
        /// <summary>壁構成作成処理</summary>
        /// <param name="isLightWeight">軽い壁構成か否か</param>
        /// <param name="exteriorWallLayer">外壁構成</param>
        /// <param name="floorWallLayer">床構成</param>
        /// <param name="roofWallLayer">天井構成</param>
        private static void makeWallLayer(bool isLightWeight,
            out WallLayers exteriorWallLayer, out WallLayers floorWallLayer, out WallLayers roofWallLayer)
        {
            WallLayers.Layer layer;

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

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

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

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

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

                //天井構成
                layer = new WallLayers.Layer(new WallMaterial("Plasterboard", 0.160, 950d * 840d / 1000d), 0.010);
                roofWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Fibreglas quilt", 0.04, 12d * 840d / 1000d), 0.1118);
                roofWallLayer.AddLayer(layer);
                layer = new WallLayers.Layer(new WallMaterial("Roofdeck", 0.140, 530d * 900d / 1000d), 0.019);
                roofWallLayer.AddLayer(layer);
            }
        }
コード例 #17
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();
        }
コード例 #18
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();
        }
コード例 #19
0
ファイル: ResponseFactor.cs プロジェクト: windripple/popolo
        /// <summary>共通比Cを用いた応答係数を計算する</summary>
        /// <param name="timeStep">タイムステップ[sec]</param>
        /// <param name="filmCoefficient1">1側総合熱伝達率[W/m2K]</param>
        /// <param name="filmCoefficient2">2側総合熱伝達率[W/m2K]</param>
        /// <param name="wallLayers">壁層</param>
        /// <param name="rfNumber">応答係数の数</param>
        /// <param name="rFactorX">1側吸熱応答係数</param>
        /// <param name="rFactorY">貫流応答係数</param>
        /// <param name="rFactorZ">2側吸熱応答係数</param>
        /// <param name="commonRatio">共通比</param>
        public static void GetResponseFactor(double timeStep, double filmCoefficient1, double filmCoefficient2, WallLayers wallLayers, uint rfNumber,
            ref double[] rFactorX, ref double[] rFactorY, ref double[] rFactorZ, out double commonRatio)
        {
            const int G_NUMBER = 8;

            double[] beta = new double[G_NUMBER];
            double[,] g_xyz = new double[3, G_NUMBER];
            double[,] rf = new double[3, rfNumber];
            double[] g_xyz_0 = new double[3];

            //熱抵抗リストと熱容量リストを初期化
            double[] res = new double[wallLayers.LayerNumber + 2];
            double[] cap = new double[wallLayers.LayerNumber + 2];
            res[0] = 1.0d / filmCoefficient1;
            res[res.Length - 1] = 1.0d / filmCoefficient2;
            for (uint i = 0; i < wallLayers.LayerNumber; i++)
            {
                WallLayers.Layer wl = wallLayers.GetLayer(i);
                res[i + 1] = wl.Resistance;
                cap[i + 1] = wl.HeatCapacityPerUnitArea;
            }

            for (int i = 0; i < G_NUMBER; i++)
            {
                uint iter = 0;  //反復計算回数
                double bm = 0;  //初期値は0

                //Beta(i)を収束計算
                while (true)
                {
                    //各壁層の行列Pを計算する
                    for (uint j = 0; j < res.Length; j++)
                    {
                        double rCap = cap[j] * res[j];
                        double w = rCap * bm;
                        if (0 < w)
                        {
                            w = Math.Sqrt(w);
                            double cw = Math.Cos(w);
                            double sw = Math.Sin(w);
                            matPi[0, 0] = matPi[1, 1] = cw;
                            matPi[0, 1] = res[j] * sw / w;
                            matPi[1, 0] = -w * sw / res[j];
                            matPid[0, 0] = matPid[1, 1] = 0.5 * rCap * sw / w;
                            matPid[0, 1] = 0.5 * res[j] * (sw / w - cw) / bm;
                            matPid[1, 0] = 0.5 * cap[j] * (sw / w + cw);
                        }
                        else
                        {
                            matPi[0, 0] = 1.0;
                            matPi[0, 1] = res[j];
                            matPi[1, 0] = 0.0;
                            matPi[1, 1] = 1.0;
                            if (cap[j] == 0) initMatrix(matPid, 0.0);
                            else
                            {
                                matPid[0, 0] = matPid[1, 1] = 0.5 * rCap;
                                matPid[0, 1] = res[j] * rCap / 6.0d;
                                matPid[1, 0] = cap[j];
                            }
                        }
                        if (j == 0)
                        {
                            copyMatrix(matPi, matP);
                            copyMatrix(matPid, matPd);
                        }
                        else
                        {
                            copyMatrix(matP, matPo);
                            copyMatrix(matPd, matPod);
                            multiplicateMatrix(matPo, matPi, ref matP);
                            multiplicateMatrix(matPod, matPi, ref matPd);
                            multiplicateMatrix(matPo, matPid, ref matPd2);
                            addMatrix(matPd, matPd2, ref matPd);
                        }
                    }
                    if (i == 0 && iter == 0)
                    {
                        double p2 = matP[0, 1] * matP[0, 1];
                        g_xyz_0[0] = (matPd[0, 0] * matP[0, 1] - matP[0, 0] * matPd[0, 1]) / p2;
                        g_xyz_0[1] = -matPd[0, 1] / p2;
                        g_xyz_0[2] = (matPd[1, 1] * matP[0, 1] - matP[1, 1] * matPd[0, 1]) / p2;
                    }

                    //収束判定
                    if (Math.Abs(matP[0, 1]) < 1.0e-10d) break;

                    //Nラプソン法でbetaを更新
                    double bmm = 0;
                    if (0 < i)
                    {
                        for (int j = 0; j < i; j++)
                        {
                            bmm += 1.0d / (beta[j] - bm);
                        }
                    }
                    bm += matP[0, 1] / (matPd[0, 1] - matP[0, 1] * bmm);
                    iter++;
                    if (20 < iter) throw new Exception("Iteration Error");
                }

                //betaを設定
                beta[i] = bm;
                g_xyz[1, i] = 1.0d / (bm * bm * matPd[0, 1]);
                g_xyz[0, i] = matP[0, 0] * g_xyz[1, i];
                g_xyz[2, i] = matP[1, 1] * g_xyz[1, i];
            }

            for (int xyz = 0; xyz < 3; xyz++)
            {
                rf[xyz, 0] = g_xyz_0[xyz];
                rf[xyz, 1] = -g_xyz_0[xyz];
                for (int i = 2; i < rfNumber; i++) rf[xyz, i] = 0;
            }

            for (int i = 0; i < G_NUMBER; i++)
            {
                double eb = Math.Exp(-beta[i] * timeStep);
                for (int xyz = 0; xyz < 3; xyz++)
                {
                    rf[xyz, 0] += g_xyz[xyz, i] * eb;
                    rf[xyz, 1] += g_xyz[xyz, i] * (eb - 2.0d) * eb;
                    for (int j = 2; j < rfNumber; j++) rf[xyz, j] += g_xyz[xyz, i] * (1.0d - eb) * (1.0d - eb) * Math.Exp(-beta[i] * (j - 1) * timeStep);
                }
            }
            double kValue = wallLayers.GetThermalTransmission(filmCoefficient1, filmCoefficient2);
            for (int xyz = 0; xyz < 3; xyz++)
            {
                rf[xyz, 0] = kValue + rf[xyz, 0] / timeStep;
                for (int i = 1; i < rfNumber; i++) rf[xyz, i] /= timeStep;
            }

            //公比
            commonRatio = Math.Exp(-beta[0] * timeStep);
            rFactorX[0] = rf[0, 0];
            rFactorY[0] = rf[1, 0];
            rFactorZ[0] = rf[2, 0];

            for (int i = 1; i < rfNumber; i++)
            {
                rFactorX[i] = rf[0, i] - commonRatio * rf[0, i - 1];
                rFactorY[i] = rf[1, i] - commonRatio * rf[1, i - 1];
                rFactorZ[i] = rf[2, i] - commonRatio * rf[2, i - 1];
            }
        }
コード例 #20
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();
        }