public class water_lithiumbromide_mixtest1 
{
public static void main(String arg[])
{
water_lithiumbromide_mix wlb=new water_lithiumbromide_mix();
double w1,w2,w3,w4,w5;//mass flow rates
double x1=wlb.X(30,10);
double x2=wlb.X(100,40);
System.out.println("x1="+x1);
System.out.println("x2="+x2);
double h1=wlb.h_ltw(30.0,x1);
double t1m=wlb.t_l(30.0,x1);
double h2=wlb.h_ltw(100.0,x2);
double t2m=wlb.t_l(100.0,x2);
double st[]=wlb.steam_property("tx",100.0,1.0);
double h3=st[3];
double st1[]=wlb.steam_property("tx",40.0,0.0);
double h4=st1[3];
double st2[]=wlb.steam_property("tx",10.0,1.0);
double h5=st2[3];
w1=0.6;                        // kg/s
w2=0.452;                      // kg/s
w3=w4=w5=w1-w2;                // kg/s
double qg=w3*h3+w2*h2-w1*h1;   // heat transfer in generator
double qc=w3*h3-w4*h4;         // condenser hat transfer
double qa=w2*h2+w5*h5-w1*h1;   // absorber heat transfer
double qe=w5*h5-w4*h4;         // evaporator heat trasfer
double COP=qe/qg;              // Coefficient of performance
System.out.println("t1_mix = "+t1m+"derece C");
System.out.println("t2_mix = "+t2m+"derece C");
System.out.println("qg = "+qg+"kW");
System.out.println("qc = "+qc+"kW");
System.out.println("qa = "+qa+"kW");
System.out.println("qe = "+qe+"kW");
System.out.println("COP = "+COP);
}}