Exemple #1
0
        public double GetDensity(double pressure, double temperature)
        {
            double density = 1;

            if (moisture.Name.Equals("Water"))
            {
                density = ThermalPropCalculator.CalculateWaterDensity(pressure, temperature);
            }
            else
            {
                double satTemperature = GetSaturationTemperature(pressure);
                if (temperature < satTemperature)
                {
                    density = ThermalPropCalculator.CalculateLiquidDensity(temperature, liqDensityCoeffs);
                }
                else if (temperature > satTemperature)
                {
                    //density = ThermalPropCalculator.CalculateLiquidDensity(temperature);
                    //need to use state equation to calculate state
                }
            }
            return(density);
        }