예제 #1
0
    public static int region_given_ps(double p, double s)
    {
        int r = IF97.Region_ps(p / 1000000.0, s / 1000.0);

        switch (r)
        {
        case 1:        //liquid
            return(0); //subcooled liquid

        case 2:        //vapor
            return(2); //superheated vapor

        case 3:
        case 4:        //two-phase
        case 5:
            return(1); //two-phase
        }
        return(-1);
    }