Exemple #1
0
        /// <summary>
        /// THE PROPERTIES OF GASES AND LIQUIDS, Section 10.6
        /// </summary>
        /// <param name="temperature"></param>
        /// <param name="humidity"></param>
        /// <returns></returns>
        private double CalculateHumidGasConductivity(double temperature, double humidity)
        {
            ThermalPropCalculator propCalculator = ThermalPropCalculator.Instance;
            double gasK      = propCalculator.CalculateGasThermalConductivity(temperature, gas);
            double moistureK = propCalculator.CalculateGasThermalConductivity(temperature, moisture);

            double gasMole      = 1 / gasMolarMass;
            double moistureMole = humidity / moistureMolarMass;

            double totalMole = gasMole + moistureMole;

            double gasMoleFraction      = gasMole / totalMole;
            double moistureMoleFraction = moistureMole / totalMole;

            double gasPc = gas.CriticalPropsAndAcentricFactor.CriticalPressure / 1.0e5;
            double gasTc = gas.CriticalPropsAndAcentricFactor.CriticalTemperature;

            double gasTr = temperature / gasTc;
            double gasReducedInverseK   = 210 * Math.Pow(gasTc * Math.Pow(gasMolarMass, 3) / Math.Pow(gasPc, 4), 1.0 / 6.0);
            double monatomicValueOfGasK = gasReducedInverseK * (Math.Exp(0.0464 * gasTr) - Math.Exp(-0.2412 * gasTr));

            double moisturePc = moisture.CriticalPropsAndAcentricFactor.CriticalPressure / 1.0e5;
            double moistureTc = moisture.CriticalPropsAndAcentricFactor.CriticalTemperature;
            double moistureTr = temperature / moistureTc;
            double moistureReducedInverseK   = 210 * Math.Pow(moistureTc * Math.Pow(moistureMolarMass, 3) / Math.Pow(moisturePc, 4), 1.0 / 6.0);
            double monatomicValueOfMoistureK = moistureReducedInverseK * (Math.Exp(0.0464 * moistureTr) - Math.Exp(-0.2412 * moistureTr));

            double gasMoistureMolarMassRatio = 1 / moistureGasMolarMassRatio;
            double temp         = 1 + Math.Sqrt(monatomicValueOfGasK / monatomicValueOfMoistureK) * Math.Pow(gasMoistureMolarMassRatio, 0.25);
            double aGasMoisture = temp * temp / Math.Sqrt(8.0 * (1.0 + gasMoistureMolarMassRatio));

            temp = 1 + Math.Sqrt(monatomicValueOfMoistureK / monatomicValueOfGasK) * Math.Pow(moistureGasMolarMassRatio, 0.25);
            double aMoistureGas = temp * temp / Math.Sqrt(8.0 * (1.0 + moistureGasMolarMassRatio));
            double mixtureK     = gasMoleFraction * gasK / (gasMoleFraction + aGasMoisture * moistureMoleFraction) +
                                  moistureMoleFraction * moistureK / (aMoistureGas * gasMoleFraction + moistureMoleFraction);

            return(mixtureK);
        }
Exemple #2
0
        private static double CalculateThermalConductivity(ArrayList materialComponents, double temperature, SubstanceState state)
        {
            double thermalCond = 0.0;
            double k           = 0;
            double massFrac;

            foreach (MaterialComponent mc in materialComponents)
            {
                Substance             s   = mc.Substance;
                ThermalPropsAndCoeffs tpc = s.ThermalPropsAndCoeffs;
                massFrac = mc.GetMassFractionValue();
                if (state == SubstanceState.Gas)
                {
                    if (s.Name == "Air")
                    {
                        k = ThermalPropCalculator.CalculateAirGasThermalConductivity(temperature);
                    }
                    else
                    {
                        k = ThermalPropCalculator.CalculateGasThermalConductivity(temperature, tpc.GasKCoeffs);
                    }
                }
                else if (state == SubstanceState.Liquid)
                {
                    if (s.SubstanceType == SubstanceType.Inorganic)
                    {
                        k = ThermalPropCalculator.CalculateLiquidInorganicThermalConductivity(temperature, tpc.LiqKCoeffs);
                    }
                    else if (s.SubstanceType == SubstanceType.Organic)
                    {
                        k = ThermalPropCalculator.CalculateLiquidOrganicThermalConductivity(temperature, tpc.LiqKCoeffs);
                    }
                }
                thermalCond += k * massFrac;
            }

            return(thermalCond);
        }