def kinetic_problem_with_h2o_hcl_caco3_mgco3_co2_calcite(): """ Build a kinetic problem with 1 kg of H2O, 1mmol of HCl which has calcite as a kinetic reaction """ database = Database("supcrt98.xml") editor = ChemicalEditor(database) editor.addAqueousPhaseWithElementsOf("H2O HCl CaCO3 MgCO3") editor.addGaseousPhase(["H2O(g)", "CO2(g)"]) editor.addMineralPhase("Calcite") calcite_reaction = editor.addMineralReaction("Calcite") calcite_reaction.setEquation("Calcite = Ca++ + CO3--") calcite_reaction.addMechanism("logk = -5.81 mol/(m2*s); Ea = 23.5 kJ/mol") calcite_reaction.addMechanism( "logk = -0.30 mol/(m2*s); Ea = 14.4 kJ/mol; a[H+] = 1.0") calcite_reaction.setSpecificSurfaceArea(10, "cm2/g") system = ChemicalSystem(editor) reactions = ReactionSystem(editor) partition = Partition(system) partition.setKineticPhases(["Calcite"]) problem = EquilibriumProblem(system) problem.setPartition(partition) problem.add("H2O", 1, "kg") problem.add("HCl", 1, "mmol") return (problem, reactions, partition)
def kinect_problem_with_h2o_hcl_caco3_mgco3_co2_calcite(): database = Database("supcrt98.xml") editor = ChemicalEditor(database) editor.addAqueousPhase("H2O HCl CaCO3 MgCO3") editor.addGaseousPhase(["H2O(g)", "CO2(g)"]) editor.addMineralPhase("Calcite") calciteReaction = editor.addMineralReaction("Calcite") calciteReaction.setEquation("Calcite = Ca++ + CO3--") calciteReaction.addMechanism("logk = -5.81 mol/(m2*s); Ea = 23.5 kJ/mol") calciteReaction.addMechanism( "logk = -0.30 mol/(m2*s); Ea = 14.4 kJ/mol; a[H+] = 1.0" ) calciteReaction.setSpecificSurfaceArea(10, "cm2/g") system = ChemicalSystem(editor) reactions = ReactionSystem(editor) partition = Partition(system) partition.setKineticPhases(["Calcite"]) problem = EquilibriumProblem(system) problem.setPartition(partition) problem.add("H2O", 1, "kg") problem.add("HCl", 1, "mmol") state = equilibrate(problem) state.setSpeciesMass("Calcite", 100, "g") return (state, reactions, partition)