250 likes | 261 Views
Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models. Ted Eary MWH Americas, Inc. Fort Collins, Colorado (ted.eary@mwhglobal.com). GoldSim 2007 User Conference, San Francisco. Integration Approaches. Submodel Abstraction & Incorporation
E N D
Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado (ted.eary@mwhglobal.com) GoldSim 2007 User Conference, San Francisco
Integration Approaches • Submodel Abstraction & Incorporation • Independent Models linked through inputs and/or outputs • Direct Linkage
Approach 1:Submodel Abstraction & Incorporation Input Specialized Supporting Models GoldSim Model • Geochemistry • Hydrology • Limnology • Climate • etc… Data or abstracted submodel Simplified Submodel (Specific Process:solubility, reaction kinetics, runoff, infiltration, evaporation, …) Output
Example:Water Treatment Plant Neutralizers, flocculants, polishing agents, filtration, aeration, etc. Acid Water Clean Water Sludge Problem: How much sludge will be produced?
Approach for Submodel Incorporation Know: Sludge mass ≈ function(amount of chemicals added, time, pH, etc.) Solution: Develop submodels of specific processes from a combination of experimental data and theoretical calculations (e.g., supporting models). Zinc Gypsum Aluminum Iron Create Lookup Table elements for GoldSim
GoldSim Model of Water Treatment System Solubilities are defined in the fluid properties element as Lookup Table functions, i.e., individual submodels.
SomeResults Total Sludge Tonnes Lime Added Time, days Lime Tank Aeration Tank Influent Concentration, mg/L Effluent pH Time, days
Submodel Abstraction & Incorporation • Advantages • Simple relationships focused on the most important processes • Can use a combination of empirical and theoretical approaches • Disadvantages • Potentially limited range of applicability • Abstraction may make it difficult to understand relationships
Approach 2: Independent Models Sequentially Linked through Inputs and/or Outputs Input Input Supporting Model (e.g., Geochemistry, Hydrology, Limnology, etc…) GoldSim Model Output (Excel) Output to Excel Input InputfromExcel Supporting Model (e.g., Geochemistry, Hydrology, Limnology, etc…) GoldSim Model Output Output (Excel)
Example:Solution Mixing Chemistry Acidic pH, High metal water, Runoff (variable flow rate) Alkaline pH, Clean water, Constant flow rate Mixing and Reactions Problem: How to calculate solution chemistry after mixing and reactions?
Approach • Know: Mixed solution chemistry is a function(mixing proportions of two solutions – one acidic and one alkaline). • Solution: • Use the independent supporting model to calculate all possible outcomes and put the results in an Excel worksheet • ( e.g., 1% acidic + 99%alkaline, 2% acidic + 98% alkaline, 3% acidic + 97% alkaline, etc……) • Import the data from Excel into a Lookup Table element. • Define an index in GoldSim to retrieve the appropriate mixed solution composition. Specialized Supporting Model Main Model PHREEQC (chemistry) Input from Excel GoldSim (Water Balance) Output (Excel)
GoldSim Model (Details in next slide)
Chemistry Lookup Table (TableOfMixFractionChemistries) Species across Mixing Index down
Mixing Only Some Results Mixing and Reaction Al: Mixing Fe: Mixing Al: Mixing and Reaction Fe: Mixing and Reaction
Independent Models • Advantages • Easy to set up and run • Leverage most of the capabilities of the independent supporting models with careful design • Disadvantages • Limited to representing either the starting point or ending point • Need to understand the system very well to make sure that the supporting model represents all possible inputs or outcomes
Approach 3: Direct Linkage Input GoldSim Model • Data transfer for every time step. Two approaches: • Excel (Spreadsheet Element) • Dynamic Link Library (External DLL Element) Input Output Supporting Model (e.g., Geochemistry, Hydrology, GIS, Chemical Processing,…) Output
DLL Data Flow Between GoldSim and the External Model GoldSim Model External DLL Program External DLL Element DLL Functions • Receive and format input data • Run Supporting Model • Get Output from Supporting Model • Return output to GoldSim Each time step Supporting Model Output
Same Example:Solution Mixing Chemistry Acidic pH, High metal water, Runoff (variable flow rate) Alkaline pH, Clean water, Constant flow rate Mixing and Reactions Problem: How to calculate solution chemistry after mixing and reactions? Solution: Use DLL to link to the PHREEQC geochemical model.
GoldSim Model DLL Element
Inside the DLL Interface tab Inputs to external DLL Outputs from external DLL
Mixing Only Some Results Mixing and Reaction Al: Mixing Fe: Mixing Al: Mixing and Reaction Fe: Mixing and Reaction
Direct Linkage through Dynamic Link Libraries (DLLs) • Advantages • Supporting model used each time step • Leverage most of the capabilities of the independent supporting models • Disadvantages • Execution time increased • Custom software code needed to construct the correct interface to the supporting model
Summary • Many ways to model complex processes; • Advantages and disadvantages for each approach; and • Choice of approach depends on the system simulated and goals of the model.
Thanks Examples available for downloads: http://www.goldsim.com/ModuleSiteMap.asp Model ID: 57 – Linking Geochemical Codes to GoldSim Model ID:69 - Simulation of Water Treatment for Acid Mine Drainage Model ID:70 -Calculating the Solubility Using Equilibrium Chemistry Early geochemists describe the first dirt molecule (Go Rockies Beat Red Sox)