Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WaterContent"/> class.
        /// </summary>
        /// <param name="solidWeight">W_s in w=W_w/W_s.</param>
        /// <param name="waterWeight">W_w in w=W_w/W_s.</param>
        public WaterContent(WeightOfSolidMatter solidWeight, WeightOfWater waterWeight)
        {
            this.Symbol = "w";
            var converted = BaseWeightScalar.ConvertToUnits(solidWeight, waterWeight.UnitOfMeasure);

            this.NumericValue = waterWeight.NumericValue / converted.NumericValue;
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TotalWeight"/> class.
 /// </summary>
 /// <param name="solidWeight">W_s in W=W_s+W_w.</param>
 /// <param name="waterWeight">W_w in W=W_s+W_w.</param>
 /// <param name="units">Measurement unit to hold value after initial calculation (ie kg). </param>
 public TotalWeight(WeightOfSolidMatter solidWeight, WeightOfWater waterWeight, WeightUnits units)
     : this(ConvertToUnits(solidWeight, units).NumericValue + ConvertToUnits(waterWeight, units).NumericValue, units)
 {
 }