示例#1
0
 @Test
 public void testPartialDerivativePT() throws OutOfRangeException {
   double tol = 1e-5;
   System.out.println(getClass().getSimpleName() + " tolerance: " + tol);
   double[][] X = new double[][] {};
   for (double[] x : X) {
     System.out.println("region: " + Region.getRegionPT(x[1], x[2]).getName());
     assertEquals(
         x[0],
         if97.partialDerivativePT(x[1], x[2], IF97.Quantity.p, IF97.Quantity.nu, IF97.Quantity.u),
         tol);
   }
 }
示例#2
0
 @Test
 public void testSpecificEnthalpyPT() throws OutOfRangeException {
   double tol = 1e-5;
   System.out.println(getClass().getSimpleName() + " tolerance: " + tol);
   double[][] X =
       new double[][] {
         {0.115331273e3, 3, 300}, // region 1
         {0.184142828e3, 80, 300},
         {0.975542239e3, 3, 500},
         // meta {0.254991145e4, 0.0035, 300}, // region 2
         // meta {0.333568375e4, 0.0035, 700},
         {0.263149474e4, 30, 700},
         // {0.276881115e4, 1, 450}, // region 2 metastable-vapour
         // {0.274015123e4, 1, 440},
         // {0.272134539e4, 1.5, 450},
         {0.521976855e4, 0.5, 1500}, // region 5
         {0.516723514e4, 30, 1500},
         {0.657122604e4, 30, 2000}
       };
   for (double[] x : X) {
     System.out.println("region: " + Region.getRegionPT(x[1], x[2]).getName());
     assertEquals(x[0], if97.specificEnthalpyPT(x[1], x[2]), tol);
   }
 }