示例#1
0
def equilibrium_inverse_with_h_o_na_cl_ca_c_calcite_ph_and_fixed_amounts():
    """
    Build a problem with H, O, Na, Cl, Ca, C and Calcite with defined pH 
    and fixed species amount  
    """
    database = Database("supcrt98.xml")

    editor = ChemicalEditor(database)
    editor.addAqueousPhase("H O Na Cl Ca C")
    editor.addMineralPhase("Calcite")

    system = ChemicalSystem(editor)

    problem = EquilibriumInverseProblem(system)
    problem.add("H2O", 1, "kg")
    problem.add("NaCl", 0.1, "mol")
    problem.pH(8.0, "HCl", "NaOH")
    problem.fixSpeciesAmount("Calcite", 1, "mol")

    return (system, problem)
示例#2
0
def equilibrium_inverse_with_h_o_na_cl_ca_mg_c_defined_ph():
    """
    Build a problem with H, Na, Cl, Ca, Mg, C with defined pH  
    """
    database = Database("supcrt98.xml")

    editor = ChemicalEditor(database)
    editor.addAqueousPhase("H O Na Cl Ca Mg C")
    editor.addGaseousPhase("H O C")

    system = ChemicalSystem(editor)

    problem = EquilibriumInverseProblem(system)
    problem.add("H2O", 1, "kg")
    problem.add("NaCl", 0.1, "mol")
    problem.add("CaCl2", 2, "mmol")
    problem.add("MgCl2", 4, "mmol")
    problem.pH(4.0, "CO2")

    return (system, problem)
示例#3
0
def equilibrium_inverse_with_h_o_na_cl_ca_mg_c_fixed_amount_and_activity():
    """
    Build a problem with H, Na, Cl, Ca, Mg, C with fixed
    species amount, activity and defined pH  
    """

    database = Database("supcrt98.xml")

    editor = ChemicalEditor(database)
    editor.addAqueousPhase("H O Na Cl Ca Mg C")
    editor.addGaseousPhase("H O C")

    system = ChemicalSystem(editor)

    problem = EquilibriumInverseProblem(system)
    problem.add("H2O", 1, "kg")
    problem.add("NaCl", 0.1, "mol")
    problem.add("CaCl2", 2, "mmol")
    problem.add("MgCl2", 4, "mmol")
    problem.pH(3.0, "HCl")
    problem.fixSpeciesAmount("CO2(g)", 1.0, "mol")
    problem.fixSpeciesActivity("O2(g)", 0.20)

    return (system, problem)