Пример #1
0
        // We do not use the Vapor Pressure curve capability, and will not, until we see a stronger need.
//		/// <summary>
//		/// Sets the X and Y data points associated with a vapor pressure versus temperature curve.
//		/// </summary>
//		/// <param name="vaporPressureTemperaturesInCelsius">The vapor pressure temperatures associated with material of this type.
//		/// This is an array of temperatures that correlate to the pressures in the following argument, and are used to create
//		/// an object that performs linear interpolation between the two to provide service of vapor pressure at a given temperature.</param>
//		/// <param name="vaporPressuresInPascals">The vapor pressures associated with material of this type.
//		/// This is an array of pressures that correlate to the temperatures in the preceding argument, and are used to create
//		/// an object that performs linear interpolation between the two to provide service of vapor pressure at a given temperature.</param>
//		public void SetVaporPressureCurveData(double[] vaporPressureTemperaturesInCelsius, double[] vaporPressuresInPascals){
//			m_vaporPressure = new SmallDoubleInterpolable(vaporPressureTemperaturesInCelsius,vaporPressuresInPascals);
//		}

        /// <summary>
        /// Returns the vapor pressure of this material when at the specified temperature - irrespective of the mixture in which it is contained.
        /// </summary>
        /// <param name="tempInCelsius">The temperature, in celsius, of the mixture.</param>
        /// <returns>The vapor pressure of this material.</returns>
        public double GetVaporPressure(double tempInCelsius)
        {
            double vp = VaporPressureCalculator.ComputeVaporPressure(this, tempInCelsius, TemperatureUnits.Celsius, PressureUnits.Pascals);

//			if ( double.IsNaN(vp) && m_vaporPressure != null ) {
//				vp = m_vaporPressure.GetYValue(tempInCelsius);
//			}
            return(vp);
        }
Пример #2
0
 /// <summary>
 /// Estimates a boiling point for the substance.
 /// </summary>
 /// <param name="atPressureInPascals">The pressure at which the boiling point is desired.</param>
 /// <returns>The estimated boiling point, in degrees celsius.</returns>
 public double GetEstimatedBoilingPoint(double atPressureInPascals)
 {
     return(VaporPressureCalculator.ComputeBoilingPoint(this, atPressureInPascals));
 }
Пример #3
0
 /// <summary>
 /// Returns the vapor pressure of this material (in mmHg) when at the specified temperature and in the specified mixture.
 /// </summary>
 /// <param name="tempInCelsius">The temperature, in celsius, of the mixture.</param>
 /// <param name="hostMixture">The mixture in which this material type is contained.</param>
 /// <returns>The vapor pressure of this material in mmHg.</returns>
 public double GetVaporPressure(double tempInCelsius, Mixture hostMixture)
 {
     return(VaporPressureCalculator.ComputeVaporPressure(this, hostMixture));
 }