1 / 56

OLI-MSE Data Regression

Learn how to customize the chemistry model and run data regression in OLI-MSE to obtain accurate results and create new model parameters.

pmichele
Download Presentation

OLI-MSE Data Regression

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OLI-MSE Data Regression Additional course materials can be found at: http://support.olisystems.com/ MSE fundamentals: P. Wang, A. Anderko, R. D. Young; Fluid Phase Equilbria, 2002, 203, 141-176 P. Wang, R. D. Spinger, A. Anderko, R. D. Young; Fluid Phase Equilbria, 2004, 222-223, 11-17 P. Wang, A. Anderko, R. D. Spinger, R. D. Young; Journal of Molecular Liquids, 2006, 125,37-44

  2. OLI-MSE Data Regression Objectives • To create new model parameters • To obtain improved model parameters • To reevaluate model parameters using new or proprietary data • To accurately reproduce experimental results

  3. OLI-MSE Data Regression Steps • Collecting relevant literature data • Customizing chemistry model • Preparing regression input file • Running the regression • Reviewing regression output

  4. Types of thermophysical data used in MSE regression • Water activity or osmotic coefficients • Vapor pressure (VLE) • Solubility (SLE) • Solubility (LLE) • Speciation (pH, dissociation degree, etc) • Density • Enthalpy (Hdiland Hmix) • Heat capacity

  5. Model Parameters Chemical & phase equilibriumModel Parameters calculations require Standard state properties Gref, Sref, Cp, and HKF parameters Excess properties Activity coefficient model parameters

  6. MSE Model: Excess Gibbs Energy LR Debye-Hückel theory LC Local composition model (UNIQUAC) for neutral molecule interactions MR Ionic interaction term for ion-ion and ion-molecule interactions

  7. MSE Model:Long-range electrostatic interaction (Debye-Hückel) term A function of ionic strength and solvent properties No interaction parameters

  8. MSE Model:Neutral molecule interaction term – Local composition model (UNIQUAC) • Parameters - • Species specific: R (size) and Q (surface area) • Interaction:aijandaji

  9. MSE Model:Ionic interaction (Middle-Range) term Interaction Parameters - bijandcij

  10. MSE Databank: MSEPUB • Equivalent to PUBLIC for OLI/Aqueous framework • H3OION-based databank • reactions are balanced using H3OION and H2O instead of using HION and H2O

  11. MSE Databank: MSEPUBData items specifically used by MSE modelIn “Aqueous Phase” chapter Pure Liquid Properties (for organic molecules) • LDEN – Coefficients for pure liquid molar density • CP – Heat capacity parameters for pure liquid • DIE0– Coefficients for pure liquid dielectric const.

  12. MSE Databank: MSEPUBData items specifically used by MSE model- In “Aqueous Phase” chapter Other data items: • R_UQ, Q_UQ UNIQUAC size (R) and surface (Q) parameters well-defined group values (Reid et al. 1987) • SOLU (Two values are given) solubility of a species (usually organic component) in water and solubility of water in organic.

  13. MSE Databank: MSEPUBInteractions pertaining to MSE model – In “Interaction” chapter • UNIQ – UNIQUAC parameters (primarily for neutral-neutral interactions) Q0IJ Q1IJ Q2IJ Q3IJ Q4IJ Q0JI Q1JI Q2JI Q3JI Q4JI For most systems, Q3IJ, Q4IJ, Q3JI, and Q4JI are set to zero

  14. MSE Databank: MSEPUBInteractions pertaining to MSE model – In “Interaction” chapter MIDRANGE – Middle-range parameters (primarily for neutral-ion and ion-ion; can be used for neutral-neutral) BMD0 BMD1 BMD2 BMD3 BMD4 CMD0 CMD1 CMD2 CMD3 CMD4

  15. MSE Databank: MSEPUBInteractions pertaining to MSE model – In “Interaction” chapter DENUNIQ – UNIQUAC density parameters D0IJ D1IJ D2IJ D0JI D1JI D2JI

  16. MSE Databank: MSEPUBInteractions pertaining to MSE model – In “Interaction” chapter DENMID – Middle-range density parameters DMD1 DMD2 DMD3 DMD4 DMD5 DMD6 DMD7 DMD8 DMD9 DMD0

  17. Regression Adjustable Parameters Excess Properties • UNIQUAC parameters– Q0IJ Q1IJ Q2IJ Q3IJ Q4IJ Q0JI Q1JI Q2JI Q3JI Q4JI • Middle-range parameters– BMD0 BMD1 BMD2 BMD3 BMD4 CMD0 CMD1 CMD2 CMD3 CMD4 • UNIQUAC density parameters – D0IJ D0JI D1IJ D1JI D2IJ D2JI • Middle-range density parameters– DMD1 DMD2 DMD3 DMD4 DMD5 DMD6 DMD7 DMD8 DMD9 DMD0

  18. Regression Adjustable Parameters Standard state Gibbs energy and entropy (appear in the databank as GREF and SREF) • GRFS – std. state Gibbs energy for solid • SRFS – std. state entropy for solid • GREF – std. state Gibbs energy for aqueous species • SREF – std. state entropy for aqueous species • GRFV – std. state Gibbs energy for vapor species • SRFV – std. state entropy for vapor species

  19. Regression Adjustable Parameters Standard state heat capacities • CPS1, CPS2, CPS3, CPS4, CPS5 – heat capacity equation parameters for solid species HKF EOS parameters (aqueous species) • HA1HA2HA3HA4 (P dependency) • HC1HC2HW (T dependency)

  20. Regression Adjustable Parameters Coefficients for equilibrium constant K: A, B, C, Dcan be adjusted as needed

  21. OLI-MSE Data Regression Steps • Collecting relevant literature data • Customizing chemistry model • Create a private databank, if necessary, with species of interest; create new species if not in DB • Set up chemistry model using OLI/Express or ESP Process, with the private databank • Define variables using OLI internal variables, if necessary, in the -.mod file

  22. Create a Private Databank • Changes can be made to a private databank without affecting MSEPUB (the public MSE databank) • Parameters developed may be based on proprietary data and are not going to be in public domain • How to create a private databank

  23. Set up a chemistry model • Change “current directory” to your working directory • Using OLI Express or OLI/ESP • Include the private databank • Select Mix-Solvent H3OION-based framework • Define variables using OLI internal variables, if necessary, in the -.mod file

  24. List of Some Commonly Used OLI Internal Variables Variable name Description Default units T temperature Kelvin PT pressure atmospheres PH pH -IN inflows moles -AQ, -ION mole-frac in soln H2O mole-frac of H2O L-AQ, L-ION ln (mole-frac in soln) LH2O ln (mole-frac of H2O) -PPT, -.nH2O precipitates and hydrates moles Y- vapor mole-fractions X-O 2nd liquid phase mole-frac V total vapor moles moles A-AQ, A-ION ln (activity coef, x) AH2O ln (activity coef. of H2O,x) K- ln (equilibrium K-values) DENMAS density of solution g/L

  25. Comparison of Variables in OLI/MSE and OLI/Aqueous Framework Aqueous Concentration Units (V6.7 or older) molality (mol/kg H2O); e.g. SO4ION=m(SO4-2) HSO4ION=m(HSO4-) H2SO4AQ=m(H2SO4-aq) H2O=55.5084 for all systems Water activity AH2O=ln awater DEFINE AWATER=EXP(AH2O) MSE Concentration Units mole-fraction; e.g. SO4ION=x(SO4-2) HSO4ION=x(HSO4-) H2SO4AQ=x(H2SO4-aq) H2O=x(H2O) Water activity AH2O=ln γwater DEFINE AWATER=EXP(AH2O+LH2O) where LH2O=ln(xwater)

  26. Comparison of Variables in OLI/MSE and OLI/Aqueous Framework Aqueous Activity coefficients AKION=ln γK+m,∞ Mean activity coefficient: DEFINE GAMMA= EXP((AKION+ACLION)/2.0) MSE Activity coefficients AKION=ln γK+x,∞ γK+m,∞= xw•γK+x,∞ Mean activity coefficient: DEFINE GAMMA= EXP(LH2O+(AKION+ACLION)/2.0) Based on (for 1:1 electrolyte): ln ±,m= ½ • (ln K+,m+ ln Cl-,m)

  27. Comparison of Variables in OLI/MSE and OLI/Aqueous Framework Aqueous Equilibirum Constant KMXAQ=ln KMX∞,m MSE Equilibirum Constant KMXAQ=ln KMX∞,x where ∆n is the change in number of moles in reaction (∆n=1 for MXAQ=MION+XION).

  28. OLI-MSE Data Regression Steps • Collecting relevant literature data • Customizing chemistry model • Preparing regression input file

  29. Regression Input Input file (-.inr) structure: $TITLE A line containing characters to explain the file $CONTROL Has several options $PARAMETERS The heart of the regression $DATA SET X Has a global parameter section and data section; An input file can have a number of data sets.

  30. Regression Input File (-.inr) $TITLE A line containing characters to explain the file $CONTROL Options are: MAXIT xx (Maximum number of iterations, default= 50) QFIT x.x (Convergence tolerance, default= 1.0E-05) METH x (Regression method) 0 - Brown’s algorithm, Uses MARQ parm 1 - Strict Decent (default) 2 – Semi Strict Decent, Uses MARQ and SCALING) MARQ x.x (Marquardt scaling parm – METH=1 or 2 default=1.0) SCALING x.x (Factor for adjusting MARQ – Meth=2 default=1.5) NUMERICAL (Forces numerical derivative calculation) TRACE (Produce ElectroChem output at every iteration) OBJECTIVE x (Change Objective function) 1 - (calc value/exp value – 1) default 2 – (max(calc or exp value)/min(calc or exp value) – 1) 3 – (calc value – exp value) ERROR xxxxx (Error assign to non-converged points, default=0) CSV variable-list (specify variables to be printed for each datumin a CSV file)

  31. Regression Input File (-.inr) $PARAMETERS The heart of the regression Format: P01 1.0 1.023E-2 -1 1. KION CLION BMD0 species1 species2 Alias Initial value regression Lower and upper bound parameter Active=1.0 (not used, only for place holding) Not active=0.0

  32. Regression Input File (-.inr) $PARAMETERS P01 1.0 1.023E-2 -1 1. KION CLION BMD0 ……… P05 1.0 -45035.5 -1 1. NAACETPPT GRFS P06 1.0 38.35 -1 1. NAACETPPT SRFS species Alias Initial value regression Lower and upper bound parameter Active=1.0 (not used, only for place holding) Not active=0.0

  33. Consistency in standard state properties: Using ELEM in input file Values of ∆Gf0 (GREF), ∆Hf0 (HREF), and S0 (SREF) are related by This is done using an ELEM statement in input file —

  34. Consistency in standard state properties: Using ELEM in input file Example: if ∆Gf0 and S0 for NAACETPPT (solid sodium acetate) are adjusted in regression, In input file (at the end of $PARAMETERS section): ELEM NAACETPPT 1.0 12.26 2.0 1.372 1.0 49.0 1.5 31.21 The formation process and the standard state entropy for each of the elements are Na(s) + 2 C(s) + O2(g) + 1.5 H2(g) = CH3COONa (s) 12.26 1.372 49.0 31.21 (in cal/mol.K) Consistent values of ∆Gf0, ∆Hf0, S0 for NAACETPPT

  35. Consistency in standard state properties: Using ELEM in input file Example: NH2CO2ION (carbamate ion) In input file, write: ELEM NH2CO2ION 1.0 1.372 0.5 45.77 1.0 49.005 1.5 31.21 The formation reaction of carbamate ion and the standard state entropies are: C(s) + 0.5 N2(g) + O2(g) + 1.5 H2(g) = NH2CO2-(aq) + H+(aq) 1.372 45.77 49.005 31.21 0.0 Consistent values of ∆Gf0, ∆Hf0 and S0 for NH2CO2ION

  36. Regression Input File (-.inr) $DATA SET X Global parameter section TEMPERATURE 100.0 These lines may be PRESSURE 1.2249 eliminated if values of H2OIN 0.965 variables are given in METHANOLIN 0.035 data section FREE PT PT allowed to be adjusted FIX V 1.0E-9 # of FREE variables = # of FIX variables SC_INDEX list of solids allow calculations under super-saturation Data section independent variables dependent variables DATA T METHANOLIN H2OIN : PT YMETHANOL 100 0.035 0.965 1.2249 0.191 100 0.074 0.926 1.4085 0.313 100 0.163 0.837 1.7419 0.496 ……………

  37. Example: NaCl-H2O Define variables at the end of -.mod file: …….. EQUATIONS DEFINE AW=EXP(AH2O+LH2O) DEFINE PHI=-(AH2O+LH2O)*H2OIN/(2.0*NACLIN) DEFINE DENGCC=0.001*DENMAS END Translation of the 1st and 2nd DEFINE:

  38. Examples – in c:\MSE-Reg SystemsFile Names • NaCl+H2O NaCl.inr • Methanol+H2O Methanol.inr • Methanol+H2O+NaCl MWNaCl.inr • Sulfamic acid+H2O NH3SO3.inr • Phenol+H2O Phenol.inr • Benzene+H2O Benzene.inr • Benzene+H2O+NaCl BzNaCl.inr • MethaneSulfonic Acid+H2O MSA.inr • AlCl3+HCl+H2O, AlCl3.inr AlCl3+NaCl+H2O • ZnCl2+HCl+H2O ZnHCl.inr • Zn(NO3)2+HNO3+H2O ZnHNO3.inr

  39. Example: NaCl-H2O Set up input file: NACL.INR $DATA SET 1 SC_INDEX H2OPPT NACLPPT NACL.2H2O DATA T PT H2OIN NACLIN : PHI AW CP DENGCC variables need to be defined ………. $DATA SET 4 SC_INDEX H2OPPT NACLPPT NACL.2H2O DATA T PT H2OIN NACLIN H2OIN NACLIN : HDILUT heat of dilution initial x final x (cal/mol) This is the fixed format for heat of dilution

  40. Example: NaCl-H2O Two ways to use solubility data in regression: Saturation concentration as dependent variables: $DATA SET 10 FREE NACLIN FIX NACLPPT 1.0E-9 SC_INDEX ALL NACLPPT DATA T PT H2OIN : NACLIN 25.0 1.0 0.90021 0.09979 50.0 1.0 0.89812 0.10188 ......... Scaling tendency as dependent variables: $DATA SET 9 SC_INDEX ALL DATA T PT H2OIN NACLIN : SC_NACLPPT 25.0 1.0 0.90021 0.09979 1.0 50.0 1.0 0.89812 0.10188 1.0 ……….. Scaling tendency (SC_solid = IAP/Ksp) must be 1.0 at saturation

  41. Heat of Mixing (DHMIX):MeOH-H2O and MeOH+H2O+NaCl Methanol+H2O (methanol.inr) DATA T PT METHANOLIN H2OIN METHANOLIN H2OIN METHANOLIN H2OIN : DHMIX 25 1 1 0 0 1 0.25 0.75 -210.28 25 1 1 0 0 1 0.3 0.7 -213.96 ……….. ∆Hmix soln 1 (x) soln 2 (x) final mix. (x) (cal/mol) Methanol+H2O+NaCl (MWNaCl.inr) DATA T PT METHANOLIN H2OIN NACLIN METHANOLIN H2OIN NACLIN METHANOLIN H2OIN NACLIN : DHMIX 12.5 1 1 0 0 0 0.9969 0.0031 0.2 0.7975 0.0025 -215.225 12.5 1 1 0 0 0 0.9969 0.0031 0.25 0.7477 0.0023 -226.004 ………… ∆Hmix soln 1 (x) soln 2 (x) final mix. (x) (cal/mol) • The order of components in each of the 3 solutions must be the same

  42. Example:Methanol + NaCl + H2O Define variables at the end of MWNaCl.mod file: …….. DEFINE GTRNA=8.3147*T*(ANAION+LOG(32.0424/18.0152)+LOG(0.997/0.7866)) DEFINE GTRCL=8.3147*T*(ACLION+LOG(32.0424/18.0152)+LOG(0.997/0.7866)) DEFINE GTRE=GTRNA+GTRCL END Based on

  43. Example: Phenol-H2O Set up chemistry model: phenol.mod Define variables at the end of phenol.mod file: …….. EQUATIONS DEFINE PKPA=PT*101.325 END

  44. Example: Phenol-H2O Using LLE data in regression: • Activity ratio as dependent variables DATA T PT C6H5OHIN H2OIN C6H5OHIN H2OIN : LLE_C6H5OHAQ LLE_H2O 25 1 0.0173 0.9827 0.3223 0.6777 1 1 29.6 1 0.0153 0.9847 0.316 0.684 1 1 ……..... equil. x in 1st liq phase equil. x in 2nd liq phase LLE_C6H5OHAQ=aC6H5OHAQ(1st)/aC6H5OHAQ(2nd) LLE_H2O=aH2O(1st)/aH2O(2nd) must be 1.0 at LLE

  45. Example: Phenol-H2O Using LLE data in regression: • Equilibrium concentrationsas dependent variables DATA T PT H2OIN C6H5OHIN : C6H5OHAQ H2O XC6H5OHAQO XH2OO 25 1 4.88928 1.0 0.0173 0.9827 0.3223 0.6777 29.6 1 5.03682 1.0 0.0153 0.9847 0.316 0.684 ……..... initial moles equil. x in equil. x in in mixture aqueous phase organic phase

  46. Other LLE cases: Benzene.inr BzNaCl.inr

  47. Other Example: AlCl3.inr Solubility of AlOOH as a function of pH: $DATA SET 1 SC_INDEX ALL ALOOHPPT H2OIN 55.509 FREE PT FIX V 1.0E-12 FREE HCLIN FIX PH 2.731 FREE ALOOHIN FIX ALOOHPPT 1.0E-12 DATA T NACLIN PH : ALOOHIN 152.4 0.1 2.614 6.442E-06 ; 2001PBW g-AlOOH 152.4 0.1 2.731 3.707E-06 ; 2001PBW g-AlOOH …………

  48. Other Example: MSA.inr Using additional constraint on invariant points for solubility data regression ……. $DATA SET 2 SC_INDEX ALL DATA T PT H2OIN CH4SO3IN : SC_H2OPPT SC_CH4SO3.3H2O WEIGHT -75 1.0 0.8360 0.164 1.0 1.0 5.0 $DATA SET 3 SC_INDEX ALL DATA T PT H2OIN CH4SO3IN : SC_CH4SO3.3H2O SC_CH4SO3.1H2O WEIGHT -54.5 1.0 0.685 0.315 1.0 1.0 5.0 $DATA SET 4 SC_INDEX ALL DATA T PT H2OIN CH4SO3IN : SC_CH4SO3.1H2O SC_CH4SO3PPT WEIGHT -15 1.0 0.220 0.780 1.0 1.0 5.0

  49. Constrains in regression parameters General Format: Pnn=Pmm x y Pnn=x*Pmm+y Example: Let P03=P01 P04=2.5*P02 P07=P05+10.0 $PARAMETERS P01 1 0.1 -1. 1. SPE1 SPE2 BMD0 P02 1 0.001 -1. 1. SPE1 SPE2 BMD1 Examples: P03 0 0. -1. 1. SPE3SPE4 BMD0 ZnHCl.inr P04 0 0. -1. 1. SPE3SPE4 BMD1 ZnHNO3.inr P05 1. 32. -1. 1. SPE5PPT SRFS P06 1. -40000. -1 1. SPE5PPT GRFS P07 0 0. -1. 1. SPE5.H2O SRFS P08 1. -46000. -1 1. SPE5.H2O GRFS P03=P01 P04=P02 2.5 P07=P05 1.0 10.0

  50. OLI-MSE Data Regression Steps • Collecting relevant literature data • Customizing chemistry model • Preparing regression input file • Running the regression

More Related