Example #1
0
        /// <summary>人体モデル計算の例</summary>
        private static void humanBodyTest()
        {
            //標準体躯の場合は引数不要
            //HumanBody body = new HumanBody();

            //人体モデルを作成:体重70kg,身長1.6m,年齢35歳,女性,心係数2.58,体脂肪率20%
            HumanBody body = new HumanBody(70, 1.6, 35, false, 2.58, 20);

            //着衣量[clo]を設定
            body.SetClothingIndex(0);
            //乾球温度[C]を設定
            body.SetDrybulbTemperature(42);
            //放射温度[C]を設定
            body.SetMeanRadiantTemperature(42);
            //気流速度[m/s]を設定
            body.SetVelocity(1.0);
            //相対湿度[%]を設定
            body.SetRelativeHumidity(50);

            //特定の部位の条件のみを設定したい場合(右手先のみ乾球温度20Cとした)
            body.SetDrybulbTemperature(HumanBody.Nodes.RightHand, 20);

            //時間を経過させ、状態を書き出す
            Console.WriteLine("時刻  |  右肩コア温度  |  右肩皮膚温度  |  左肩コア温度  |  左肩皮膚温度");
            for (int i = 0; i < 15; i++)
            {
                body.Update(120);
                ImmutableBodyPart rightShoulder = body.GetBodyPart(HumanBody.Nodes.RightShoulder);
                ImmutableBodyPart leftShoulder = body.GetBodyPart(HumanBody.Nodes.LeftShoulder);
                Console.Write(((i + 1) * 120) + "sec | ");
                Console.Write(rightShoulder.GetTemperature(BodyPart.Segments.Core).ToString("F2") + " | ");
                Console.Write(rightShoulder.GetTemperature(BodyPart.Segments.Skin).ToString("F2") + " | ");
                Console.Write(leftShoulder.GetTemperature(BodyPart.Segments.Core).ToString("F2") + " | ");
                Console.Write(leftShoulder.GetTemperature(BodyPart.Segments.Skin).ToString("F2") + " | ");
                Console.WriteLine();
            }

            Console.Read();
        }
Example #2
0
        /// <summary>Sample program calculating human body</summary>
        private static void humanBodyTest()
        {
            //This is constructor to make standard human body.
            //HumanBody body = new HumanBody();

            //Make human body model : Weight 70kg, Height 1.6m, Age 35, Female, Cardiac index 2.58, Fat 20%
            HumanBody body = new HumanBody(70, 1.6, 35, false, 2.58, 20);

            //Set clothing index [clo]
            body.SetClothingIndex(0);
            //Set dry-bulb temperature [C]
            body.SetDrybulbTemperature(42);
            //Set mean radiant temperature [C]
            body.SetMeanRadiantTemperature(42);
            //Set velocity [m/s]
            body.SetVelocity(1.0);
            //Set relative humidity [%]
            body.SetRelativeHumidity(50);

            //Use Nodes enumarator to set bouncary condition to particular position
            body.SetDrybulbTemperature(HumanBody.Nodes.RightHand, 20);

            //Updating body state
            Console.WriteLine("Time     |  R.Shoulder C temp  |  R.Shoulder S temp  |  L.Shoulder C temp  |  L.Shoulder S temp");
            for (int i = 0; i < 15; i++)
            {
                body.Update(120);
                ImmutableBodyPart rightShoulder = body.GetBodyPart(HumanBody.Nodes.RightShoulder);
                ImmutableBodyPart leftShoulder = body.GetBodyPart(HumanBody.Nodes.LeftShoulder);
                Console.Write(((i + 1) * 120) + "sec | ");
                Console.Write(rightShoulder.GetTemperature(BodyPart.Segments.Core).ToString("F2") + " | ");
                Console.Write(rightShoulder.GetTemperature(BodyPart.Segments.Skin).ToString("F2") + " | ");
                Console.Write(leftShoulder.GetTemperature(BodyPart.Segments.Core).ToString("F2") + " | ");
                Console.Write(leftShoulder.GetTemperature(BodyPart.Segments.Skin).ToString("F2") + " | ");
                Console.WriteLine();
            }

            Console.Read();
        }