Beispiel #1
0
        //cp unit is J/kg.k
        private static double CalculateCp(ArrayList materialComponents, double temperature, SubstanceState state)
        {
            double heatCapacity = 0.0;
            double cp           = 0;
            double molarWeight;
            double massFrac;

            foreach (MaterialComponent mc in materialComponents)
            {
                Substance s = mc.Substance;
                molarWeight = s.MolarWeight;
                ThermalPropsAndCoeffs tpc = s.ThermalPropsAndCoeffs;
                massFrac = mc.GetMassFractionValue();
                if (state == SubstanceState.Gas)
                {
                    cp = ThermalPropCalculator.CalculateGasHeatCapacity1(temperature, tpc.GasCpCoeffs) / molarWeight;
                }
                else if (state == SubstanceState.Liquid)
                {
                    cp = ThermalPropCalculator.CalculateLiquidHeatCapacity1(temperature, tpc.LiqCpCoeffs) / molarWeight;
                }
                heatCapacity += cp * massFrac;
            }

            return(heatCapacity);
        }
Beispiel #2
0
        public double GetSpecificHeatOfLiquid(double temperature)
        {
            //this correlation comes from Perry's Chemical Engineers Handbook
            //double cp = 2.7637e5 - 2.0901e3 * temperature + 8.125 * temperature * temperature
            //            -1.4116e-2 * Math.Pow(temperature, 3) + 9.3701e-6 * Math.Pow(temperature, 4);
            double cp = ThermalPropCalculator.CalculateLiquidHeatCapacity1(temperature, liqCpCoeffs);

            return(cp / molarWeight);
        }