determination of the kinetic constants of a chemical reaction in heterogeneous phase...

29
Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions Determination of the kinetic constants of a chemical reaction in heterogeneous phase using parameterized metaheuristics Jos´ e Mat´ ıas Cutillas Lozano and Domingo Gim´ enez Departamento de Inform´ atica y Sistemas, University of Murcia International Conference on Computational Science - Barcelona, June 2013

Upload: others

Post on 04-Feb-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Determination of the kinetic constants of a

    chemical reaction in heterogeneous phase using

    parameterized metaheuristics

    José Mat́ıas Cutillas Lozano and Domingo GiménezDepartamento de Informática y Sistemas, University of Murcia

    International Conference on Computational Science - Barcelona, June 2013

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Contents

    1 Motivation

    2 Determination of kinetic constants

    3 Unified shared-memory scheme

    4 Results

    5 Conclusions

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Kinetic constants of a chemical reaction

    Kinetic parameters of a chemical reaction are determined withmetaheuristic methods.

    The processes occurring in the human stomach whenneutralizing the acid with an antacid tablet are simulated.

    It is a reaction combined with mass transfer of carbonate ionspresent in the solid phase upon contact with an acid solution.

    Solving the problem requires the calculation of the wholechemical system using the Euler numerical method.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Kinetic constants of a chemical reaction

    Kinetic parameters of a chemical reaction are determined withmetaheuristic methods.

    The processes occurring in the human stomach whenneutralizing the acid with an antacid tablet are simulated.

    It is a reaction combined with mass transfer of carbonate ionspresent in the solid phase upon contact with an acid solution.

    Solving the problem requires the calculation of the wholechemical system using the Euler numerical method.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Kinetic constants of a chemical reaction

    Kinetic parameters of a chemical reaction are determined withmetaheuristic methods.

    The processes occurring in the human stomach whenneutralizing the acid with an antacid tablet are simulated.

    It is a reaction combined with mass transfer of carbonate ionspresent in the solid phase upon contact with an acid solution.

    Solving the problem requires the calculation of the wholechemical system using the Euler numerical method.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Kinetic constants of a chemical reaction

    Kinetic parameters of a chemical reaction are determined withmetaheuristic methods.

    The processes occurring in the human stomach whenneutralizing the acid with an antacid tablet are simulated.

    It is a reaction combined with mass transfer of carbonate ionspresent in the solid phase upon contact with an acid solution.

    Solving the problem requires the calculation of the wholechemical system using the Euler numerical method.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Parallel-parameterized metaheuristics

    Metaheuristic calculations are carried out with variousparameters and functions.

    Many experiments are required to select a good metaheuristicand to tune it to the problem.

    A large number of optimization problems will be solved.

    We use a unified parallel-parameterized scheme ofmetaheuristics:Different metaheuristics obtained from the parameterizedscheme are parallelized with the parallel parameters foroptimizing time execution.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Parallel-parameterized metaheuristics

    Metaheuristic calculations are carried out with variousparameters and functions.

    Many experiments are required to select a good metaheuristicand to tune it to the problem.

    A large number of optimization problems will be solved.

    We use a unified parallel-parameterized scheme ofmetaheuristics:Different metaheuristics obtained from the parameterizedscheme are parallelized with the parallel parameters foroptimizing time execution.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Parallel-parameterized metaheuristics

    Metaheuristic calculations are carried out with variousparameters and functions.

    Many experiments are required to select a good metaheuristicand to tune it to the problem.

    A large number of optimization problems will be solved.

    We use a unified parallel-parameterized scheme ofmetaheuristics:Different metaheuristics obtained from the parameterizedscheme are parallelized with the parallel parameters foroptimizing time execution.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Parallel-parameterized metaheuristics

    Metaheuristic calculations are carried out with variousparameters and functions.

    Many experiments are required to select a good metaheuristicand to tune it to the problem.

    A large number of optimization problems will be solved.

    We use a unified parallel-parameterized scheme ofmetaheuristics:Different metaheuristics obtained from the parameterizedscheme are parallelized with the parallel parameters foroptimizing time execution.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Our search of the kinetic parameters of a chemical reactionthat occurs in heterogeneous phase involves the simulation ofthe processes occurring on the human stomach.

    Depending on the value of the pH, there are three main waysin which the dissolution of calcium carbonate occurs:

    By reaction with acetic acid.

    CaCO3 + H3O+↔ Ca2+ + HCO−3 + H2O (1)

    By reaction with carbonic acid.

    CaCO3 + H2CO3 ↔ Ca2+ + 2 · HCO−3 (2)

    And by the hydrolysis reaction.

    CaCO3 + H2O ↔ Ca2+ + HCO−3 + OH

    − (3)

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Our search of the kinetic parameters of a chemical reactionthat occurs in heterogeneous phase involves the simulation ofthe processes occurring on the human stomach.

    Depending on the value of the pH, there are three main waysin which the dissolution of calcium carbonate occurs:

    By reaction with acetic acid.

    CaCO3 + H3O+↔ Ca2+ + HCO−3 + H2O (1)

    By reaction with carbonic acid.

    CaCO3 + H2CO3 ↔ Ca2+ + 2 · HCO−3 (2)

    And by the hydrolysis reaction.

    CaCO3 + H2O ↔ Ca2+ + HCO−3 + OH

    − (3)

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    When reaction occurs in several parallel paths independent ofeach other, the overall rate is simply the sum of all individualrates.

    So, the kinetic of dissolution of calcium carbonate is afunction of the concentration of carbonic acid in the solution,the pH and the mass transfer area:

    1

    V

    dNCa2+

    dt= −k1a

    n1[

    H3O+]n2

    − k2an3 [H2CO3]

    n4− k3 (4)

    k1, k2 and k3 are the combined reaction rate constants.n1, n2, n3 and n4 are the reaction orders.a is the area of the tablet.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    When reaction occurs in several parallel paths independent ofeach other, the overall rate is simply the sum of all individualrates.

    So, the kinetic of dissolution of calcium carbonate is afunction of the concentration of carbonic acid in the solution,the pH and the mass transfer area:

    1

    V

    dNCa2+

    dt= −k1a

    n1[

    H3O+]n2

    − k2an3 [H2CO3]

    n4− k3 (4)

    k1, k2 and k3 are the combined reaction rate constants.n1, n2, n3 and n4 are the reaction orders.a is the area of the tablet.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Using the notation for evolutionary algorithms, an individual isrepresented by a real vector of size seven that is the set ofkinetic constants.

    The ranges of values for the constants are set followingempirical criteria.

    Every time we have to evaluate the fitness of an individual, wemust solve the whole chemical system:for i = 0 → N doCalculate at instant i :[

    Ca2+]

    , a, [H3O+] , [HCO−] , [H2CO3] , pHcal ,∆

    [

    Ca2+]

    ,

    [CH3COOH] , [CH3COO−]

    Fitness = Fitness + (pHexp,i − pHcal ,i )2

    end for

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Using the notation for evolutionary algorithms, an individual isrepresented by a real vector of size seven that is the set ofkinetic constants.

    The ranges of values for the constants are set followingempirical criteria.

    Every time we have to evaluate the fitness of an individual, wemust solve the whole chemical system:for i = 0 → N doCalculate at instant i :[

    Ca2+]

    , a, [H3O+] , [HCO−] , [H2CO3] , pHcal ,∆

    [

    Ca2+]

    ,

    [CH3COOH] , [CH3COO−]

    Fitness = Fitness + (pHexp,i − pHcal ,i )2

    end for

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Using the notation for evolutionary algorithms, an individual isrepresented by a real vector of size seven that is the set ofkinetic constants.

    The ranges of values for the constants are set followingempirical criteria.

    Every time we have to evaluate the fitness of an individual, wemust solve the whole chemical system:for i = 0 → N doCalculate at instant i :[

    Ca2+]

    , a, [H3O+] , [HCO−] , [H2CO3] , pHcal ,∆

    [

    Ca2+]

    ,

    [CH3COOH] , [CH3COO−]

    Fitness = Fitness + (pHexp,i − pHcal ,i )2

    end for

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Parallel-parametrized scheme

    Initialize(S ,ParamIni,ThreadsIni)while (not EndCondition(S ,ParamEnd,ThreadsEnd))

    SS = Select(S ,ParamSel,ThreadsSel)SS1 = Combine(SS ,ParamCom,ThreadsCom)SS2 = Improve(SS1,ParamImp,ThreadsImp)S = Include(SS2,ParamInc,ThreadsInc)

    Independent parallelization of the functions,with parallelism parameters (number of threads) for each function.The optimum value of the parallelism parameters depends on thevalues of the metaheuristic parameters (the metaheuristic orcombination of metaheuristics).

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Metaheuristics

    Four pure metaheuristics: GRASP, Genetic algorithm (GA),Scatter search (SS), Tabu Search (TS)

    Eleven combinations: GRASP+GA, GRASP+SS,GRASP+TS, GA+SS, GA+TS, SS+TS, GRASP+GA+SS,GRASP+GA+TS, GRASP+SS+TS, GA+SS+TS,GRASP+GA+SS+TS

    Total: 15 metaheuristics or combinations of metaheuristics

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Metaheuristic Parameters

    Metaheuristic and metaheuristic combination parameters used inthe experiments

    GR TS SS GA GR+TS GR+SS GR+GA TS+SS TS+GAIni INEIni 50 50 20 20 50 50 50 20 20

    FNEIni 1 1 10 20 1 10 20 10 20PEIIni 100 100 100 0 100 100 100 100 0IIEIni 15 15 15 0 15 15 15 15 0STMIni 0 2 0 0 2 0 0 2 0

    Sel NBESel 0 1 5 20 0 5 20 5 20NWESel 0 0 5 0 0 5 0 5 0

    Com NBBCom 0 0 15 10 0 15 10 15 10NBWCom 0 0 20 0 0 20 0 20 0NWWCom 0 0 15 0 0 15 0 15 0

    Imp PEIImp 0 100 100 0 0 100 0 100 0IIEImp 0 5 5 0 0 5 0 5 0SMIImp 0 2 0 0 0 0 0 2 0PEMImp 0 0 0 20 0 0 20 0 20IMEImp 0 0 0 5 0 0 5 0 2SMMImp 0 0 0 0 0 0 0 0 10

    Inc NBEInc 0 1 5 20 0 5 20 5 20LTMInc 0 3 0 0 0 0 0 3 3

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Metaheuristic Parameters

    SS+GA GR+TS+SS GR+TS+GA GR+SS+GA TS+SS+GA GR+TS+SS+GAINEIni 20 50 50 50 20 50FNEIni 15 10 20 15 15 15PEIIni 100 100 100 100 100 100IIEIni 15 15 15 15 15 15STMIni 0 2 2 0 2 2NBESel 8 5 20 8 8 8NWESel 7 5 0 7 7 7NBBCom 15 15 10 15 15 15NBWCom 20 20 0 20 20 20NWWCom 15 15 0 15 15 15PEIImp 100 100 0 100 100 100IIEImp 5 5 0 5 5 5SMIImp 0 2 0 0 2 2PEMImp 20 0 20 20 20 20IMEImp 5 0 5 5 5 5SMMImp 0 0 2 0 2 2NBEInc 8 5 20 8 8 8LTMInc 0 3 3 0 3 3

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Problem variables

    Values of the problem variables considered in the experiments:

    Series S1 S2 S3 S4 S5 S6N 70 50 34 77 81 69MT 1.33 1.33 1.31 1.32 1.32 1.30

    [HAc]0 · 102 3.98 3.31 2.39 2.18 3.01 1.99

    V 250 250 250 100 150 200

    N: number of experimental points of time and pH to be integrated.MT (g): total mass of the tablet that is dissolving in acid.[HAc]0 (mol/L): initial concentration of acetic acid in each series.V (mL): volume of the solution.

    Other variables common to all series of experiments:MA (g) = 0.68 is the active mass of calcium carbonate in the tablet.a0 (cm

    2) = 7.11 is the initial area of the tablet.[

    H2CO∗

    3

    ]

    (mol/L) = 10−5 is the total concentration of carbonate species in thesolution.

    Equilibria constants involved have values: Ka = 10−4.76, K′

    a = 10−6.35, KH = 10

    −1.5.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Fitness for different metaheuristics and problem sizes

    In most cases the final value of the objective function is very similar. The lowerthis value, the better the result.

    Combinations of metaheuristics produce good fitness values, highlighting GAmetaheuristic and its combinations.

    0

    1

    2

    3

    4

    5

    6

    7

    8

    S1 S2 S3 S4 S5 S6 average

    Fitn

    ess

    GRTSSSGA

    GR+TSGR+SSGR+GATS+SSTS+GASS+GA

    GR+TS+SSGR+TS+GAGR+SS+GATS+SS+GA

    GR+TS+SS+GA

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Iterations to optimum fitness for S5 series

    Metaheuristics including GA have lower fitness values and generally moreiterations to the optimum.

    GRASP, TS, SS and their combinations, have higher fitness values.

    3.8

    4

    4.2

    4.4

    4.6

    4.8

    5

    5.2

    0 10 20 30 40 50 60

    Fitn

    ess

    Iterations

    GRTSSSGA

    GR+TSGR+SSGR+GATS+SSTS+GASS+GA

    GR+TS+SSGR+TS+GAGR+SS+GATS+SS+GA

    GR+TS+SS+GA

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    pH and hydronium concentration over time

    The pH calculated in the simulation is not far from the experimental, and theprediction made by the kinetic model is acceptable.

    Stomach acid simulated by acetic acid is gradually reduced.

    3

    3.5

    4

    4.5

    5

    5.5

    6

    0 5 10 15 20 25 30 35 40

    pH

    Time (min)

    pHexp pHcal

    0

    0.0001

    0.0002

    0.0003

    0.0004

    0.0005

    0.0006

    0.0007

    0.0008

    0 5 10 15 20 25 30 35 40

    Con

    cent

    ratio

    n (m

    ol/L

    )

    Time (min)

    [H3O+]exp

    [H3O+]cal

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Concentration of carbonate and acetic species and calcium over time

    The concentration of HCO−3 remains at all times below H2CO3, which wasexpected in the pH range considered.

    Calcium concentration increases as the tablet is dissolving.

    [CH3COOH] decreases at the same rate as[

    CH3COO−

    ]

    increases, which isexpected if the model is correct.

    0

    2e-06

    4e-06

    6e-06

    8e-06

    1e-05

    1.2e-05

    1.4e-05

    0 5 10 15 20 25 30 35 40

    Con

    cent

    ratio

    n (m

    ol/L

    )

    Time (min)

    [H2CO3]

    [HCO3-]

    0

    0.005

    0.01

    0.015

    0.02

    0.025

    0.03

    0 5 10 15 20 25 30 35 40

    Con

    cent

    ratio

    n (m

    ol/L

    )

    Time (min)

    [Ca2+][CH3COOH]

    [CH3COO-]

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Optimum values of the kinetic constants

    The final values are:

    k1 = 6.41 · 10−5 n1 = 0.749

    k2 = 9.68 · 10−2 n2 = 1.59 · 10

    −2

    k3 = 8.87 · 10−7 n3 = 3.25

    n4 = 1.10

    We can see the effect that an antacid tablet can have on thehuman stomach.

    The simulation times give us a rough idea of the speed withwhich carbonate acts in the reaction medium, helping topredict the effects against heartburn.

    This can be used to design more efficient pills and withrelatively low experimental costs.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Conclusions

    The kinetic constants of a chemical reaction have beendetermined satisfactorily using a unified parameterized schemefor metaheuristics.

    The dissolution process of an antacid tablet has beensatisfactorily simulated.

    The best results in terms of fitness function are obtained bycombining metaheuristics: specifically the quaternarycombination GR+GA+SS+TS and, in general, metaheuristicsincluding GA.

  • Motivation Determination of kinetic constants Unified shared-memory scheme Results Conclusions

    Future research

    Application of hyperheuristics to obtain the best combinationof parameters for the kinetic problem so as to facilitate thecollection of the best metaheuristic or combination.

    Application of the same methodology to other optimizationproblems of chemical parameters and processes.

    For problems with a high computational cost it is convenientto develop unified parameterized schemes in parallel systems:shared memory, message passing and GPUs.

    MotivationDetermination of kinetic constantsUnified shared-memory schemeResultsConclusions