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

public class equilibrium3
{
  public static void main(String arg[])
  {   chemicalReaction r[]=new chemicalReaction[2];
      String s[]={"co2","o2","n2","co","no"};
      double N1[][]={{1.0,0.0},{0,0.5},{0,0},{0.0,1.0},{0.0,0.0}};
      r[0]=new chemicalReaction("r0",s,N1);
      double N2[][]={{0.0,0.0},{0.5,0.0},{0.5,0.0},{0,0},{0,1}};
      r[1]=new chemicalReaction("r1",s,N2);
      double Tproduct=3000.0;//degree K
      double Treactant=3000.0;//degree K
      double n0[]={1.0,0.5,0.5,0.0,0.0};
      double P=1.01325;//bar
	  f_equilibrium fe=new f_equilibrium(n0,s,r,Treactant,Tproduct,P);  
	  double n[]={0.5,0.5,0.5,0.5,0.5};  
	  double [] r1= continuity.newton_continuationRK6(fe,n);
	  fe.equilibrium_print(r1);
  }
}
