Exemple #1
0
 @Test
 public void degreesKelvinShouldBeUnchanged() {
   assertEquals(786, temperature.inKelvin(), 0.00001);
 }
Exemple #2
0
 /**
  * @param pressure
  * @param mass
  * @param temperature
  * @return Returns the calculated volume in cubic metres
  */
 public static Volume volume(Pressure pressure, Mass mass, Temperature temperature) {
   return cubicMetres(mass.inMolesOfWater() * gasConstant * temperature.inKelvin());
 }
Exemple #3
0
 /**
  * @param pressure
  * @param volume
  * @param temperature
  * @return Returns mass of water in moles
  */
 public static Mass mass(Pressure pressure, Volume volume, Temperature temperature) {
   return molesOfWater(
       (pressure.inPascals() * volume.inCubicMetres()) / (gasConstant * temperature.inKelvin()));
 }
Exemple #4
0
 /**
  * @param volume
  * @param mass
  * @param temperature
  * @return Returns the pressure which is calculated in Pascals
  */
 public static Pressure pressure(Volume volume, Mass mass, Temperature temperature) {
   return pascals(
       (mass.inMolesOfWater() * gasConstant * temperature.inKelvin()) / volume.inCubicMetres());
 }