approaches for modeling complex processes through integration of goldsim and specialized supporting...

25
Approaches for Modeling Approaches for Modeling Complex Processes through Complex Processes through Integration of GoldSim and Integration of GoldSim and Specialized Supporting Specialized Supporting Models Models Ted Eary Ted Eary MWH Americas, Inc. MWH Americas, Inc. Fort Collins, Colorado Fort Collins, Colorado ([email protected]) ([email protected]) GoldSim 2007 User Conference, San Francisco

Upload: kory-scott

Post on 05-Jan-2016

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Approaches for Modeling Approaches for Modeling Complex Processes through Complex Processes through Integration of GoldSim and Integration of GoldSim and

Specialized Supporting Specialized Supporting ModelsModelsTed EaryTed Eary

MWH Americas, Inc.MWH Americas, Inc.Fort Collins, ColoradoFort Collins, Colorado

([email protected])([email protected])

GoldSim 2007 User Conference, San Francisco

Page 2: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

1.1. Submodel Abstraction & Submodel Abstraction & Incorporation Incorporation

2.2. Independent Models linked Independent Models linked through inputs and/or outputs through inputs and/or outputs

3.3. Direct LinkageDirect Linkage

Integration ApproachesIntegration Approaches

Page 3: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Approach 1:Approach 1:Submodel Abstraction & IncorporationSubmodel Abstraction & Incorporation

Output

Input

GoldSim Model

Simplified Submodel

(Specific Process: solubility, reaction

kinetics, runoff, infiltration, evaporation, …)

• Geochemistry• Hydrology• Limnology• Climate• etc…

Specialized Supporting Models

Data or abstracted submodel

Page 4: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Example:Example:Water Treatment PlantWater Treatment Plant

Acid Water

Neutralizers, flocculants, polishing agents, filtration, aeration, etc.

Sludge

Clean Water

Problem: How much sludge will be produced?

Page 5: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

KnowKnow:: Sludge mass Sludge mass ≈≈ function(amount of chemicals function(amount of chemicals added, time, pH, etc.) added, time, pH, etc.) SolutionSolution:: Develop submodels of specific processes Develop submodels of specific processes from a combination of experimental data and from a combination of experimental data and theoretical calculations (e.g., supporting models). theoretical calculations (e.g., supporting models).

Solubilities calculated with PHREEQC

1.0E-04

1.0E-03

1.0E-02

1.0E-01

1.0E+00

1.0E+01

1.0E+02

1.0E+03

3 4 5 6 7 8 9 10 11

pH

Co

nce

ntr

atio

n, m

g/L

Ferrihydrite - Fe(OH)3

Al(OH)3(am)

Zincite

Create Lookup Table elements for GoldSim

Approach for Submodel Incorporation

pH Fe mg/L Al, mg/L Zn, mg/L

5.0 3.6E-02 8.6E-01  ---

5.5 1.1E-02 3.0E-02   ---

6.0 3.4E-03 1.3E-03   ---6.5 1.2E-03 2.0E-04 3.6E+04

7.0 4.9E-04 2.4E-04 3.0E+03

7.5 2.8E-04 6.7E-04 2.3E+02

8.0 2.2E-04 2.1E-03 2.3E+01

8.5 2.2E-04 6.6E-03 2.9E+00

9.0 3.0E-04 2.1E-02 8.5E-01

9.5 5.5E-04 6.6E-02 6.4E-01

10.0 1.4E-03 2.1E-01 6.3E-01

Gypsum

Zinc

Aluminum

Iron

Page 6: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Solubilities are defined in the fluid properties element as Lookup Table functions, i.e., individual submodels.

GoldSim Model of Water Treatment System

Page 7: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

0

1000

2000

3000

0 200 400 600 800 1000 1200 1400 1600

ton

ne

s

Time (d)

Sludge Produced and Lime Added

0

2

4

6

8

10

0 200 400 600 800 1000 1200 1400 1600

(mg

/L)

Time (d)

pH Time Trends

SomeSomeResultsResults

Total Sludge

Lime Added

Influent

Effluent pH

Lime Tank Aeration Tank

Con

cent

ratio

n, m

g/L

Time, days

Time, days

Ton

nes

Page 8: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Submodel Abstraction & Submodel Abstraction & IncorporationIncorporation

AdvantagesAdvantages Simple relationships focused on the Simple relationships focused on the

most important processesmost important processes Can use a combination of empirical and Can use a combination of empirical and

theoretical approachestheoretical approaches DisadvantagesDisadvantages

Potentially limited range of applicabilityPotentially limited range of applicability Abstraction may make it difficult to Abstraction may make it difficult to

understand relationshipsunderstand relationships

Page 9: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Approach 2:Approach 2: Independent Models Sequentially Linked through Inputs Independent Models Sequentially Linked through Inputs

and/or Outputsand/or Outputs

Supporting Model(e.g., Geochemistry, Hydrology,

Limnology, etc…)

Input

Output to Excel

GoldSim Model

Output (Excel)

Input from Excel

GoldSim Model

Output (Excel)

Input

Supporting Model(e.g., Geochemistry, Hydrology,

Limnology, etc…)

Input

Output

Page 10: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Example:Example:Solution Mixing ChemistrySolution Mixing Chemistry

Mixing and Reactions

Alkaline pH, Clean water, Constant flow rate

Acidic pH, High metal water, Runoff (variable flow rate)

Problem: How to calculate solution chemistry after mixing and reactions?

Page 11: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

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.

Approach

Specialized Supporting Model Main Model

GoldSim (Water Balance)

PHREEQC(chemistry) Output

(Excel)

Input from Excel

Page 12: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

GoldSim Model

(Details in next slide)

Page 13: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Chemistry Lookup Table Chemistry Lookup Table (TableOfMixFractionChemistries)(TableOfMixFractionChemistries)

Species across

Mix

ing

Inde

x do

wn

Page 14: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

0

2

4

6

8

10

0 1 2 3 4 5

pH

Time (yr)

Mixed Solution Chemistry (pH)

1.0e-04

1.0e-03

1.0e-02

1.0e-01

1.0e00

1.0e01

1.0e02

0 1 2 3 4 5

Con

cent

ratio

n (m

g/l)

Time (yr)

Mixed Solution Chemistry (Iron and Aluminum)

Some Results

Mixing Only

Mixing and Reaction

Al: MixingFe: Mixing

Al: Mixing and Reaction

Fe: Mixing and Reaction

Page 15: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Independent ModelsIndependent Models

AdvantagesAdvantages• Easy to set up and run Easy to set up and run • Leverage most of the capabilities of the Leverage most of the capabilities of the

independent supporting models with careful independent supporting models with careful designdesign

DisadvantagesDisadvantages• Limited to representing either the starting Limited to representing either the starting

point or ending pointpoint or ending point• Need to understand the system very well to Need to understand the system very well to

make sure that the supporting model make sure that the supporting model represents all possible inputs or outcomesrepresents all possible inputs or outcomes

Page 16: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Approach 3: Direct LinkageApproach 3: Direct Linkage

Input

GoldSim Model

Supporting Model(e.g., Geochemistry, Hydrology, GIS, Chemical Processing,…)

InputOutput

Output

Data transfer for every time step. Two approaches:• Excel (Spreadsheet Element)• Dynamic Link Library (External DLL Element)

Page 17: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

DLL Data Flow Between GoldSim DLL Data Flow Between GoldSim and the External Modeland the External Model

GoldSim Model

Supporting Model

Output

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

External DLL Program

Page 18: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Same Example:Solution Mixing Chemistry

Mixing and Reactions

Alkaline pH, Clean water, Constant flow rate

Acidic pH, High metal water, Runoff (variable flow rate)

Problem: How to calculate solution chemistry after mixing and reactions?Solution: Use DLL to link to the PHREEQC geochemical model.

Page 19: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

GoldSim GoldSim ModelModel

DLL Element

Page 20: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Inside the DLL Interface tabInside the DLL Interface tab

Inputs to external DLL

Outputs from external DLL

Page 21: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

0

2

4

6

8

10

0 1 2 3 4 5

pH

Time (yr)

Mixed Solution Chemistry (pH)

1.0e-04

1.0e-03

1.0e-02

1.0e-01

1.0e00

1.0e01

1.0e02

0 1 2 3 4 5

Con

cent

ratio

n (m

g/l)

Time (yr)

Mixed Solution Chemistry (Iron and Aluminum)

Some Results

Mixing Only

Mixing and Reaction

Al: MixingFe: Mixing

Al: Mixing and Reaction

Fe: Mixing and Reaction

Page 22: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Direct Linkage through Dynamic Link Direct Linkage through Dynamic Link Libraries (DLLs)Libraries (DLLs)

AdvantagesAdvantages• Supporting model used each time step Supporting model used each time step • Leverage most of the capabilities of the Leverage most of the capabilities of the

independent supporting models independent supporting models DisadvantagesDisadvantages

• Execution time increasedExecution time increased• Custom software code needed to Custom software code needed to

construct the correct interface to the construct the correct interface to the supporting modelsupporting model

Page 23: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

Relative SpeedRelative Speed(Solution Mixing, 5-year, 1-day time step)(Solution Mixing, 5-year, 1-day time step)

MechanismMechanismGoldSim GoldSim

Execution TimeExecution Time

Lookup TableLookup Table 1-2 sec1-2 sec

DLL – External ElementDLL – External Element 5 min 9 sec5 min 9 sec

Excel-Spreadsheet ElementExcel-Spreadsheet Element 25 min 59 sec25 min 59 sec

Page 24: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

SummarySummary

Many ways to model complex Many ways to model complex processes;processes;

Advantages and disadvantages for Advantages and disadvantages for each approach; andeach approach; and

Choice of approach depends on the Choice of approach depends on the system simulated and goals of the system simulated and goals of the model. model.

Page 25: Approaches for Modeling Complex Processes through Integration of GoldSim and Specialized Supporting Models Ted Eary MWH Americas, Inc. Fort Collins, Colorado

ThanksThanks

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

(Go RockiesBeat Red Sox)

Early geochemists describe the first dirt molecule