Title: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting
1Approaches for Modeling Complex Processes through
Integration of GoldSim and Specialized Supporting
Models
- Ted Eary
- MWH Americas, Inc.
- Fort Collins, Colorado
- (ted.eary_at_mwhglobal.com)
GoldSim 2007 User Conference, San Francisco
2Integration Approaches
- Submodel Abstraction Incorporation
- Independent Models linked through inputs and/or
outputs - Direct Linkage
3Approach 1Submodel 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
4ExampleWater Treatment Plant
Neutralizers, flocculants, polishing agents,
filtration, aeration, etc.
Acid Water
Clean Water
Sludge
Problem How much sludge will be produced?
5Know 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).
Approach for Submodel Incorporation
Zinc
Gypsum
Aluminum
Iron
Create Lookup Table elements for GoldSim
6GoldSim Model of Water Treatment System
Solubilities are defined in the fluid properties
element as Lookup Table functions, i.e.,
individual submodels.
7SomeResults
Total Sludge
Tonnes
Lime Added
Time, days
Lime Tank
Aeration Tank
Influent
Concentration, mg/L
Effluent pH
Time, days
8Submodel 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
9Approach 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
Input from Excel
Supporting Model (e.g., Geochemistry, Hydrology,
Limnology, etc)
GoldSim Model
Output
Output (Excel)
10ExampleSolution 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?
11Approach
- 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 99alkaline, 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)
GoldSim (Water Balance)
Input from Excel
Output (Excel)
12GoldSim Model
(Details in next slide)
13Chemistry Lookup Table (TableOfMixFractionChemistr
ies)
Species across
Mixing Index down
14Mixing Only
Some Results
Mixing and Reaction
Al Mixing
Fe Mixing
Al Mixing and Reaction
Fe Mixing and Reaction
15Independent 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
16Approach 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
17DLL 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
18Same ExampleSolution 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.
19GoldSim Model
DLL Element
20Inside the DLL Interface tab
Inputs to external DLL
Outputs from external DLL
21Mixing Only
Some Results
Mixing and Reaction
Al Mixing
Fe Mixing
Al Mixing and Reaction
Fe Mixing and Reaction
22Direct 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
23Relative Speed(Solution Mixing, 5-year, 1-day
time step)
24Summary
- 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.
25Thanks
Examples available for downloads http//www.gold
sim.com/ModuleSiteMap.asp Model ID 57 Linking
Geochemical Codes to GoldSim Model ID69 -
Simulation of Water Treatment for Acid Mine
Drainage Model ID70 - Calculating the
Solubility Using Equilibrium Chemistry
Early geochemists describe the first dirt molecule
(Go Rockies Beat Red Sox)