示例#1
0
        private double CalculateDensity(double tempValue)
        {
            double densityValue = Constants.NO_VALUE;

            if (DryingMaterial.MaterialType == MaterialType.GenericFood)
            {
                densityValue = GenericFoodPropCalculator.GetDensity(materialComponents.Components, tempValue);
            }
            else if (DryingMaterial.MaterialType == MaterialType.SpecialFood)
            {
                densityValue = SpecialFoodPropCalculator.GetDensity(DryingMaterial.Name, massConcentration.Value, tempValue);
            }
            else
            {
                if (density.IsSpecifiedAndHasValue)
                {
                    densityValue = density.Value;
                }
                else if (massConcentration.Value <= TOLERANCE && pressure.HasValue)
                {
                    densityValue = MoistureProperties.GetDensity(pressure.Value, tempValue);
                }
            }
            return(densityValue);
        }
示例#2
0
        private void CalculateDensity()
        {
            double densityValue = Constants.NO_VALUE;

            if (materialStateType == MaterialStateType.Liquid && pressure.HasValue && massConcentration.Value < 1.0e-3)
            {
                double tempValue = temperature.Value;
                if (vaporFraction.HasValue && vaporFraction.Value >= 0.999999)
                {
                    tempValue += TOLERANCE;
                }
                else if (vaporFraction.HasValue && vaporFraction.Value <= TOLERANCE)
                {
                    tempValue -= TOLERANCE;
                }
                densityValue = MoistureProperties.GetDensity(pressure.Value, tempValue);
            }
            else
            {
                densityValue = CalculateDensity(temperature.Value);
            }

            if (densityValue != Constants.NO_VALUE)
            {
                Calculate(density, densityValue);
            }
        }
示例#3
0
        internal override double GetGasDensity(double temperature, double pressure)
        {
            //DryingMaterialStreamComponents dmsc = streamComponents as DryingMaterialStreamComponents;
            //Substance s = dmsc.Moisture.Substance;
            //double molarWt = s.MolarWeight;
            //double density = (molarWt * pressure/1000)/(8.314*tempValue);
            double density = MoistureProperties.GetDensity(pressure, temperature + 0.001);

            return(density);
        }
示例#4
0
        internal override double GetLiquidDensity(double temperature)
        {
            DryingMaterialComponents dmc = MaterialComponents;
            Substance s            = dmc.Moisture.Substance;
            double    molarWt      = s.MolarWeight;
            double    densityValue = Constants.NO_VALUE;

            if (density.IsSpecifiedAndHasValue)
            {
                densityValue = density.Value;
            }
            else if (massConcentration.Value <= TOLERANCE && pressure.HasValue)
            {
                densityValue = MoistureProperties.GetDensity(pressure.Value, temperature);
            }
            return(densityValue);
        }
示例#5
0
 internal override double GetGasDensity(double temperature, double pressure)
 {
     return(MoistureProperties.GetDensity(pressure, temperature + 0.001));
 }
示例#6
0
 internal override double GetLiquidDensity(double temperature)
 {
     return(MoistureProperties.GetDensity(pressure.Value, temperature));
 }