public class refISO17584MixData extends Object
{
//this class reads and store refrigerant  data
String refrigerantName;       // name of the refrigerant
String refcName[];            // name(s) of the refrigerant mixture component
refISO17584 refcd[];          // refrigerant component data
// mixture coefficients
public double F[][];     //equation 21 interaction coefficcients
public double fi19[][];  //equation 19 T* eqaution
public double fi20[][];  //equation 20 ro* eqaution
public double R;
double x[];     // Refrigerant componenets mole fractions
//N_mix[0] 1-2 pair
//N_mix[1] 1-3 pair
//N_mix[2] 2-3 pair
double N_mix[][]; // table 33 table 36 table 39 table 42  
double t_mix[][]; // table 33 table 36 table 39 table 42 
double d_mix[][]; // table 33 table 36 table 39 table 42 
double l_mix[][]; // table 33 table 36 table 39 table 42 
double M;       // Mixture mole number
double f3;      // equation 17
double f4;      // equation 17
// ideal gas coefficients
double a_id[];
double b_id[];
double c_id[];
double t_id[];
//real gas coefficient
double N[];
double t[];
int d[];
int l[];
int alpha[];
double m[];
double beta[];
double gamma[];
int eps[];
//Reducing parameters
double Ts;    // derece K
double ros;   // kmol/m^3
double Tc;    // derece K
double Vc;    // kmol/m^3
double Pc;    // kPa
// Reference state parameters
double Tref;  // derece K
double Pref;  // kPa
double href;  // kJ/kmol
double sref;  // kJ/(kmolK)
double f1;
double f2;
public refISO17584MixData(String refrigerantNamei,String refcNamei[],double Fi[][],double fi19i[][],double fi20i[][],double xi[],double f3i,double f4i,double Mi)
{
refrigerantName=refrigerantNamei;
int nc=refcNamei.length;
refcd=new refISO17584[nc];
refcName=new String[nc];
for(int i=0;i<nc;i++)
{ refcName[i]=refcNamei[i];
  refcd[i]=new refISO17584(refcName[i]);
}
F=Fi;
x=xi;
fi19=fi19i;
fi20=fi20i;
f3=f3i;
f4=f4i;
M=Mi;
R=0;
for(int i=0;i<x.length;i++)
{R+=x[i]*refcd[i].rd.R;}
}

public void input_mix(double Ni_mix[][],double ti_mix[][],double di_mix[][],double li_mix[][],double xi[])
{
int n1=refcName.length;
int n=Ni_mix.length;
int m=Ni_mix[0].length;
N_mix=new double [n][m];
t_mix=new double [n][m];
d_mix=new double [n][m];
l_mix=new double [n][m];
for(int i=0;i<n;i++)
{  for(int j=0;j<m;j++)
   {N_mix[i][j]=Ni_mix[i][j];
    t_mix[i][j]=ti_mix[i][j];
    d_mix[i][j]=di_mix[i][j];
    l_mix[i][j]=li_mix[i][j];
   }
}
}

public String  toString()
{
int n1=refcName.length;
int n=N_mix.length;
int m=N_mix[0].length;
System.out.println("n1="+n1+"n="+n+"m="+m);
String s="Gas Name = "+refrigerantName+"\n";
for(int i=0;i<n1;i++)
{s+="Component gas name = "+refcName[i]+" x = "+x[i]+"\n1";}
s+="M = "+M+"\n";
for(int i=0;i<F.length;i++)
{for(int j=0;j<F[0].length;j++)
 {s+="F["+i+"]["+j+"] = "+F[i][j]+" ";}
 s+="\n";
}
for(int i=0;i<fi19.length;i++)
{for(int j=0;j<fi19[0].length;j++)
 {s+="fi19["+i+"]["+j+"] = "+fi19[i][j]+" ";}
 s+="\n";
}
for(int i=0;i<fi20.length;i++)
{for(int j=0;j<fi20[0].length;j++)
 {s+="fi20["+i+"]["+j+"] = "+fi20[i][j]+" ";}
 s+="\n";
}
int ik=0;
for(int i=0;i<n;i++)
{ for(int j=0;j<m;j++)
  { s+="i = "+i+"j="+j+"\n";
	s+=" N_mix["+i+"]["+j+"] = "+N_mix[i][j]+" tmix["+j+"] = "+t_mix[ik][j]+" dmix["+j+"] = "+d_mix[ik][j]+" lmix["+j+"] = "+l_mix[ik][j]+"\n";
  }
}
return s;
}

}