Beispiel #1
0
        public void Ventilation(int controlledVent)
        {
            /*  these values should be read as parameters
             *  these values should be read as daily inputs
             */
            double Ameantemp         = 10.0;
            double Aradiation        = 600.0; //W per square metre
            double ArelativeHumidity = 1.0;
            double Awindspeed        = 3.0;

            double heatOp = dummyAnimal.GetHeatProduction();
            double waterVapourPressure = ArelativeHumidity * utilities.GetsaturatedWaterVapourPressure(Ameantemp);

            /*  !calculate the air velocity, using the appropriate functions for controlled or freely ventilated systems
             */
            if (controlledVent > 0)
            {
                double supplementaryHeat = 0.0;
                airVelocity = ventilationForced.Control(heatOp, Ameantemp, 0.0, Aradiation, waterVapourPressure, ref supplementaryHeat);
            }
            else
            {
                //uncontrolled(heatOp, Ameantemp, Awindspeed, Aradiation, ArelativeHumidity);
            }
        }
        public void ControlShouldReturnVelocity()
        {
            double supplementaryHeat = 0.0;

            vent = new ForcedVentilation(6.0, 22.0, 1.5, 5.0, 0.8, 0.04, 0.8, 293.0, 2.0, 4.0, 10000.0);
            anim = new DummyAnimal(1, 50, 650.0, 25.0, 0, 40.0);
            util = new Utility();
            Assert.AreEqual(0.0041322314049586778, vent.Control(anim.HeatProduction(), 10.0, 0.0, 600.0, 1.0 * util.GetsaturatedWaterVapourPressure(10.0), ref supplementaryHeat));
        }