public class basitrankine
{
	/*
   s1[0][2]="p bars          ";
   s1[1][2]="t deg C         ";
   s1[2][2]="v  m^3/kg        ";
   s1[3][2]="h KJ/kg         ";
   s1[4][2]="u KJ/kg         ";
   s1[5][2]=" s KJ/kgK         ";
   s1[6][2]="x kg vap/kg mix ";
   s1[7][2]="ro kg/m^3        ";
   s1[8][2]=" faz ";*/
   
public static void main(String arg[])
{
steam st=new steam();
double t1=900.0;
double p1=40.0;
double a[]=st.property("tp",t1,p1);
double h1=a[3];
double s1=a[5];
System.out.println("h1="+h1+"s1="+s1);
double p2=0.08;//bar
double s2i=s1;
double a2i[]=st.property("ps",p2,s2i);
double h2i=a2i[3];
double etai=0.90;
double h2=h1-etai*(h1-h2i);
double a2[]=st.property("ph",p2,h2);
double s2=a2[5];
System.out.println("h2="+h2+"s2="+s2);
}

}