public class GasData extends Object
{
//this file reads and store
public String gasName;
public int natom;
public String aName[];
public double aN[];
public int n_equation;
public double xa[],xb[],xc[],xd[],tl[],th[];
public int n_vis;
public double xvis[];
public int n_k;
public double xk[];
public double h0; // enthalpy at T=298 K
public double s0; // enthrophy at 298 K
public double hf; // enthalpy of formation
public double sf; // entropy of formation    kJ/kmol K

public GasData(String igasName,String ianame[],double ia[],
double ih0,double iso,double ihf,double isf,
double ixa[][],double ixvis[],double ixk[])
{
gasName=igasName;
natom=ianame.length;
aName=new String[natom];
aN=new double[natom];
for(int i=0;i<natom;i++) {aName[i]=ianame[i];aN[i]=ia[i];} 
n_equation=ixa[0].length;h0=ih0;s0=iso;hf=ihf;sf=isf;
xa=new double[n_equation];
xb=new double[n_equation];
xc=new double[n_equation];
xd=new double[n_equation];
tl=new double[n_equation];
th=new double[n_equation];
for(int i=0;i<n_equation;i++) 
{xa[i]=ixa[i][0];
 xb[i]=ixa[i][1];
 xc[i]=ixa[i][2];
 xd[i]=ixa[i][3];
 tl[i]=ixa[i][4];
 th[i]=ixa[i][5];
}

n_vis=ixvis.length;
xvis=new double[n_vis];
for(int i=0;i<n_vis;i++)
{xvis[i]=ixvis[i];}

n_k=ixk.length;;
xk=new double[n_k];
for(int i=0;i<n_vis;i++)
{xk[i]=ixk[i];}
}

public GasData(String igasName,
           int inatom,
           String ianame1,double ia1,
           String ianame2,double ia2,
           String ianame3,double ia3,
           String ianame4,double ia4,
           String ianame5,double ia5,
           int inequation, double ih0,double iso,double ihf,double isf,
           double ixa1,double ixb1,double ixc1,double ixd1, double itl1, double ith1,
           double ixa2,double ixb2,double ixc2,double ixd2, double itl2, double ith2,
           double ixa3,double ixb3,double ixc3,double ixd3, double itl3, double ith3,
           double ixa4,double ixb4,double ixc4,double ixd4, double itl4, double ith4,
           double ixa5,double ixb5,double ixc5,double ixd5, double itl5, double ith5,
           double ixa6,double ixb6,double ixc6,double ixd6, double itl6, double ith6,
           int invis,
           double ixvis1,double ixvis2,double ixvis3,double ixvis4,double ixvis5,double ixvis6,
           double ixvis7,double ixvis8,double ixvis9,double ixvis10,
           int ink,
           double ixk1,double ixk2,double ixk3,double ixk4,double ixk5,double ixk6,
           double ixk7,double ixk8,double ixk9,double ixk10)
{
gasName=igasName;
natom=inatom;
aName=new String[5];
aN=new double[5];
aName[0]=ianame1;
aN[0]=ia1;
aName[1]=ianame2;
aN[1]=ia2;
aName[2]=ianame3;
aN[2]=ia3;
aName[3]=ianame4;
aN[3]=ia4;
aName[4]=ianame5;
aN[4]=ia5;
n_equation=inequation;h0=ih0;s0=iso;hf=ihf;sf=isf;
xa=new double[6];
xb=new double[6];
xc=new double[6];
xd=new double[6];
tl=new double[6];
th=new double[6];
xa[0]=ixa1;xa[1]=ixa2;xa[2]=ixa3;xa[3]=ixa4;xa[4]=ixa5;xa[5]=ixa6;
xb[0]=ixb1;xb[1]=ixb2;xb[2]=ixb3;xb[3]=ixb4;xb[4]=ixb5;xb[5]=ixb6;
xc[0]=ixc1;xc[1]=ixc2;xc[2]=ixc3;xc[3]=ixc4;xc[4]=ixc5;xc[5]=ixc6;
xd[0]=ixd1;xd[1]=ixd2;xd[2]=ixd3;xd[3]=ixd4;xd[4]=ixd5;xd[5]=ixd6;
tl[0]=itl1;tl[1]=itl2;tl[2]=itl3;tl[3]=itl4;tl[4]=itl5;tl[5]=itl6;
th[0]=ith1;th[1]=ith2;th[2]=ith3;th[3]=ith4;th[4]=ith5;th[5]=ith6;
n_vis=invis;
xvis=new double[10];
xvis[0]=ixvis1;xvis[1]=ixvis2;xvis[2]=ixvis3;xvis[3]=ixvis4;xvis[4]=ixvis5;
xvis[5]=ixvis6;xvis[6]=ixvis7;xvis[7]=ixvis8;xvis[8]=ixvis9;xvis[9]=ixvis10;
n_k=ink;
xk=new double[10];
xk[0]=ixk1;xk[1]=ixk2;xk[2]=ixk3;xk[3]=ixk4;xk[4]=ixk5;
xk[5]=ixk6;xk[6]=ixk7;xk[7]=ixk8;xk[8]=ixk9;xk[9]=ixk10;
}
public String k_toString()
{String s=gasName+" ";
n_k=xk.length;;
for(int i=0;i<n_k;i++)
{s+=xk[i]+" ";}
return s;
}
public String vis_toString()
{String s=gasName+" ";
n_vis=xvis.length;;
for(int i=0;i<n_vis;i++)
{s+=xvis[i]+" ";}
return s;
}


} 
