//XLT.setMassToMole(parse_coefficients(fluid_json, "mass2mole", false));

        /// A function to check coefficients and equation types.
        //XLT.validate();
        double acc = 0.0001;
        double val = 0;
        double res = 0;

        // Prepare the results and compare them to the calculated values
        double T = 273.15+50;
        double p = 10e5;
        double x = 0.0;

        // Compare density
        val = 824.4615702148608;
        res = XLT.rho(T,p,x);
        {
        CAPTURE(T);
        CAPTURE(val);
        CAPTURE(res);
        CHECK( check_abs(val,res,acc) );
        }

        // Compare cp
        val = 1834.7455527670554;
        res = XLT.c(T,p,x);
        {
        CAPTURE(T);
        CAPTURE(val);
        CAPTURE(res);
        CHECK( check_abs(val,res,acc) );
예제 #2
0


		// Prepare the results and compare them to the calculated values
		double acc = 0.0001;
		double T   = 273.15+10;
		double p   = 10e5;
		double x   = 0.25;
		backend.set_mass_fractions(std::vector<long double>(1,x));
		double val = 0;
		double res = 0;

		//CoolProp::set_debug_level(100);

		// Compare density flash
		val = fluid.rho(T,p,x);
		res = backend.DmassP_flash(val, p);
		{
		CAPTURE(T);
		CAPTURE(p);
		CAPTURE(x);
		CAPTURE(val);
		CAPTURE(res);
		CHECK( check_abs(T,res,acc) );
		}

		// Compare h
		val = fluid.h(T, p, x);
		res = backend.HmassP_flash(val, p);
		{
		CAPTURE(T);