コード例 #1
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();
        }
コード例 #2
0
ファイル: Wall.cs プロジェクト: windripple/popolo
 /// <summary>潜熱蓄熱材料を設定する</summary>
 /// <param name="layerIndex">潜熱蓄熱材料を設定する壁層番号</param>
 /// <param name="lMaterial">潜熱蓄熱材料</param>
 public void SetLatentHeatStorageMaterial(uint layerIndex, LatentHeatStorageMaterial lMaterial)
 {
     //壁層の数以下の場合は設定
     if (layerIndex < cap.Length - 2)
     {
         lMaterials[layerIndex] = lMaterial;
         lMaterialIndex[layerIndex] = lMaterial.CurrentMaterialIndex;
     }
     //初期化
     initialize();
 }
コード例 #3
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();
        }
コード例 #4
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();
        }