コード例 #1
0
        public double GetSpecificHeatOfVapor(double temperature)
        {
            //return 1880.0;
            double cp = thermalPropCalculator.CalculateGasHeatCapacity(temperature, moisture);

            //return cp / molarWeight;
            return(cp);
        }
コード例 #2
0
        public double GetSpecificHeatRatio(ArrayList materialComponents, double temperature)
        {
            double heatCapacity = 0.0;
            double cp           = 0;
            //double molarWeight = 0.0;
            double w;
            double molarFrac;
            double totalMole = 0.0;

            foreach (MaterialComponent mc in materialComponents)
            {
                Substance s = mc.Substance;
                if (s.Name == "Generic Dry Material" || s is CompositeSubstance)
                {
                    continue;
                }
                w          = s.MolarWeight;
                molarFrac  = mc.GetMassFractionValue() / w;
                totalMole += molarFrac;
            }

            foreach (MaterialComponent mc in materialComponents)
            {
                Substance s = mc.Substance;
                if (s.Name == "Generic Dry Material" || s is CompositeSubstance)
                {
                    continue;
                }
                w = s.MolarWeight;
                //ThermalPropsAndCoeffs tpc = s.ThermalPropsAndCoeffs;
                molarFrac = mc.GetMassFractionValue() / w / totalMole;
                //heatCapacity = ThermalPropCalculator.CalculateGasHeatCapacity1(temperature, tpc.GasCpCoeffs);
                //unit from CalculateGasHeatCapacity(temperature, s) is J/kg.K
                //need to convert to kJ/kmol.K to be aligned with universal gas constant R.
                heatCapacity = thermalPropCalculator.CalculateGasHeatCapacity(temperature, s);
                cp          += heatCapacity * molarFrac * w / 1000;
            }

            return(cp / (cp - Constants.R));
        }