示例#1
0
文件: Room.cs 项目: vijju1608/VRF
        public void DoCalculateByOptionInd(string Opt)
        {
            //double dbcool = Unit.ConvertToSource(Convert.ToDouble(CoolingDryBulb.ToString()), UnitType.TEMPERATURE, CurrentTempUnit);
            //double wbcool = Unit.ConvertToSource(Convert.ToDouble(CoolingWetBulb.ToString()), UnitType.TEMPERATURE, CurrentTempUnit);
            double           dbcool   = Convert.ToDouble(CoolingDryBulb.ToString());
            double           wbcool   = Convert.ToDouble(CoolingWetBulb.ToString());
            double           rhcool   = Convert.ToDouble(CoolingRelativeHumidity);
            FormulaCalculate fc       = new FormulaCalculate();
            decimal          pressure = fc.GetPressure(Convert.ToDecimal(0));

            if (Opt == UnitTemperature.WB.ToString())
            {
                double rh = Convert.ToDouble(fc.GetRH(Convert.ToDecimal(dbcool), Convert.ToDecimal(wbcool), pressure));

                if (this.CoolingRelativeHumidity.ToString() != (rh * 100).ToString("n0"))
                {
                    IsMethordCheck          = true;
                    CoolingRelativeHumidity = Convert.ToDouble((rh * 100).ToString("n0"));
                }
            }
            else if (Opt == UnitTemperature.DB.ToString())
            {
                double wb = Convert.ToDouble(fc.GetWTByDT(Convert.ToDecimal(dbcool), Convert.ToDecimal(rhcool / 100), pressure));

                if (CoolingDryBulb.ToString() != wb.ToString("n1"))
                {
                    if (rhcool != 0)
                    {
                        IsMethordCheck = true;
                        CoolingWetBulb = Convert.ToDouble(wb.ToString("n1"));
                    }
                }
            }
            else if (Opt == UnitTemperature.RH.ToString())
            {
                double wb = Convert.ToDouble(fc.GetWTByDT(Convert.ToDecimal(dbcool), Convert.ToDecimal(rhcool / 100), pressure));

                if (this.CoolingWetBulb.ToString() != wb.ToString("n1"))
                {
                    if (rhcool != 0)
                    {
                        IsMethordCheck      = true;
                        this.CoolingWetBulb = (double)wb;
                    }
                }
            }
        }
示例#2
0
        public void DoCalculateByOptionInd(string Opt)
        {
            double           dbcool   = Convert.ToDouble(HeatingDryBulb.ToString());
            double           wbcool   = Convert.ToDouble(HeatingWetBulb.ToString());
            double           rhcool   = Convert.ToDouble(HeatingRelativeHumidity);
            FormulaCalculate fc       = new FormulaCalculate();
            decimal          pressure = fc.GetPressure(Convert.ToDecimal(0));

            if (Opt == UnitTemperature.WB.ToString())
            {
                double rh = Convert.ToDouble(fc.GetRH(Convert.ToDecimal(dbcool), Convert.ToDecimal(wbcool), pressure));

                if (this.HeatingRelativeHumidity.ToString() != (rh * 100).ToString("n0"))
                {
                    this.HeatingRelativeHumidity = Convert.ToDouble((rh * 100).ToString("n0"));
                }
            }
            else if (Opt == UnitTemperature.DB.ToString())
            {
                double wb = Convert.ToDouble(fc.GetWTByDT(Convert.ToDecimal(dbcool), Convert.ToDecimal(rhcool / 100), pressure));

                if (CoolingDryBulb.ToString() != wb.ToString("n1"))
                {
                    if (rhcool != 0)
                    {
                        HeatingWetBulb = Convert.ToDouble(wb.ToString("n1"));
                    }
                }
            }
            else if (Opt == UnitTemperature.RH.ToString())
            {
                double wb = Convert.ToDouble(fc.GetWTByDT(Convert.ToDecimal(dbcool), Convert.ToDecimal(rhcool / 100), pressure));

                if (this.CoolingDryBulb.ToString() != wb.ToString("n1"))
                {
                    if (rhcool != 0)
                    {
                        this.HeatingWetBulb = (Double)wb;
                    }
                }
            }
        }