import java.util.*;
import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
import javax.swing.*;

public class equilibrium1
{
  public static void main(String arg[])
  {   chemicalReaction r[]=new chemicalReaction[2];
      String s[]={"co","h2o","co2","h2","o2"};
      double N1[][]={{1.0,0.0},{0,0},{0,1},{0.0,0.0},{0.5,0.0}};
      r[0]=new chemicalReaction("r0",s,N1);
      double N2[][]={{1.0,0.0},{1.0,0.0},{0.0,1.0},{0.0,1.0},{0,0}};
      r[1]=new chemicalReaction("r1",s,N2);
      double Tproduct=3000.0;//degree K
      double Treactant=3000.0;//degree K
      double n0[]={1.0,1.0,0.0,0.0,0.0};
      double P=1.01325;//bar
	  f_equilibrium fe=new f_equilibrium(n0,s,r,Treactant,Tproduct,P);  
	  double n[]={0.2,0.2,0.2,0.2,0.2};  
	  double [] r1= continuity.continuationRK6(fe,n,20);
	  String ss[]={"nCO","nH2O","nCO2","nH2","nO2"};
	  String ss1="Equilibrium reaction CO+"+'\u00BD'+"O2"+'\u21C4'+" CO2 \n";
	  ss1+="CO+"+"at T="+Tproduct+" K ";
	  fe.equilibrium_print(r1);
  }
}
