Exemple #1
0
  // ## operation writeChemkinReactions(ReactionModel)
  // 10/26/07 gmagoon: changed to take temperature as parameter (it doesn't seem like this method is
  // currently used anywhere)
  public static String writeChemkinReactions(
      ReactionModel p_reactionModel, Temperature p_temperature) {
    // #[ operation writeChemkinReactions(ReactionModel)
    StringBuilder result = new StringBuilder();
    result.append("REACTIONS	KCAL/MOLE\n");
    CoreEdgeReactionModel cerm = (CoreEdgeReactionModel) p_reactionModel;

    LinkedHashSet all = cerm.getReactedReactionSet();

    HashSet hs = new HashSet();
    int numfor = 0;
    int numrev = 0;
    int numdup = 0;
    int numnorev = 0;
    for (Iterator iter = all.iterator(); iter.hasNext(); ) {
      Reaction rxn = (Reaction) iter.next();
      if (rxn.isForward()) {
        result.append(
            " "
                + rxn.toChemkinString(p_temperature)
                + "\n"); // 10/26/07 gmagoon: changed to avoid use of Global.temperature
        //	result.append(" " + rxn.toChemkinString(Global.temperature) + "\n");

      }
    }

    result.append("END\n");

    return result.toString();

    // #]
  }