import pipe;

class pipemain
{
public static void main()
{
  String name1=new String("airhe2KWchanel");
  pipe p1(name1);
  cout<<"enter local pressure drop factor KL (bends,entries,exits)\n";
  double lkl;
  cin>>lkl;
  p1.change_KL(lkl); 
  cout<<"please see file out.dat for output \n";
  ofstream fout("out.dat",ios::out);
  double t=300.0;
  cout<<"pipe gas name : "<<p1.gasName<<endl;
  cout<<"pipe hydraulic diameter : "<<p1.dh<<" m "<<endl;
  cout<<"mass flow rate: "<<p1.mass_flow_rate<<" kg/s "<<endl;
  cout<<"gas molar mass: "<<p1.g1.M<<endl;
  cout<<"local pressure drop factor KL : "<<p1.KL<<endl;
  cout<<"ngas = "<<p1.g1.ngas<<endl;
  cout<<"length = "<<p1.l<<endl;
  for(int i=0;i<p1.g1.ngas;i++)
  {
  cout<<p1.g1.gasList[i].gasName<<" "<<p1.g1.gasList[i].N<<endl;
  }
  for( i=0;i<32;i++)
  {
  t+=20.0;
  cout<<"p.d. = "<<p1.dP(t)<<" bars/m T : "<<t<<"K"<<endl;
  cout<<"h ("<<t<<") ="<<p1.hc(t)<<endl;
  }
}
}