Transport.chem.dat File 3 waters –Background, O 2 (solution 1) –Sewage effluent, NH 4 + and Cl - (solution 2) –Rain O 2 (solution 3) NH 4 + oxidation –SOLUTION 1 and 2 contain dissolved oxygen –SOLUTION 2 only NH 4 + –NO 3 - produced where NH 4 + and O 2 mix N 2(aq) and NO 2 - are disabled in.chem.dat Data to be written for Model Viewer 1
Transport.chem.dat 2
Changes for Solute Transport 1. Save As… 2. Set solute transport and transient flow 3. Check dispersivities 4. Check distribution of chemical conditions 5. Initial head distribution 6. Check associated solutions of BC 7. Specify flux of sewage effluent 8. Set time step and simulation length 3
Save As Save model—File|Save As… transport.p4w 4
Enable Solute Transport 5
Enable Transient Flow 6
Transport Calculations Require Dispersivity Parameters MEDIA Retain default of 1 m longitudinal and transverse dispersivity 7
Numerical Dispersion: Upstream-in-space, backward-in-time Grid spacing is 500 m Velocity is 100 m/yr, 1 yr time step 8
IC: Set Chemical Initial Conditions Default CHEMISTRY_IC should have SOLUTION 1 9
IC: Use Steady-State Head Condition: flow.head.dat or ex5.head.200.dat 10
Flux: Solution 3 for Precipitation 11
Flux: Sewage Beds Draw an arbitrary box Flux boundary Flux schedule (next page) Solution 2 Z face 12
Denis LeBlanc’s Flux Estimates (m/d) Beds 1-4Beds 5-8Beds 9-12Beds 13-16Beds
Flux: Copy Zone for 4 More Sewage Beds X to Y to Z 0 to 20 Flux: Modify Box Zone for Sewage Beds 1-4 Click on zone in BC tree Ctrl-c, Ctrl-v Choose “specified flux” 14
Flux: Locations for Sewage Beds X minX maxY minY maxZ minZ max Beds Beds Beds Beds Beds
Flux: Sewage Beds 16
Set Print Frequencies for HDF File Double Click PRINT_FREQUENCY –Select years for HDF chemistry –Print every 2 years –Data to be written are selected in SELECTED_OUTPUT section of transport.chem.dat 17
TIME: Set Time Step and Simulation Length End time 1946 Time step 1 yr Start time 1936 Double Click TIME_CONTROL 18
Running the Model Save Run the model 19
Visualize Results of Conservative Transport –View P at 1946 –Show|Solid –Show|Color Bar –Toolbox|Geometry—Z 20 –Toolbox|Color Bar 1e-10 min Logrithmic –Toolbox|Overlay Model Viewer File|New— c:\student\CapeCodPhast\transport.h5 20
View NH 4 +, NO 3 -, and O 2 –Set to 1946 Toolbox|Crop –X min 0.45 Ctrl-d changes view Toolbox->Data N(5) Toolbox->Animation N(5) = NO 3 - species 21
NH 4 +, NO 3 -, O 2 NH 4 + from effluent NO 3 - from oxidation –Note faster flow at top O 2 consumed 22
To Decrease Numerical Dispersion Refine resolution – Horizontal 250 m – Vertical 2.5 m -20 to 20 m – Time step 0.5 yr 23
Refined Grid Refined resolution – Horizontal 250 m – Vertical 2.5 m -20 to 20 m –0.5 yr time step Original resolution – Horizontal 500 m – Vertical 2.5 m -20 to 20 m –1 yr time step 24
NH 4 + NO 3 - O 2 25
Summary Introduction PHAST for Windows Must always test numerical accuracy –Numerical dispersion for B-I-T, U-I-S –Oscillations for C-I-T, C-I-S Cape Cod –Heads look good –Plume direction problematic –Tiny dispersivity is a killer, working on implicit TVD method 26
My Model Doesn’t Work: What to do when things go wrong Start simple! Add complexity sequentially Check problem definition for completeness and correctness –Properly posed problem that is physically realistic –Shape of region –Spatial property distributions (Model Viewer, prefix.O.probdef) –Boundary condition distributions (Model Viewer, prefix.O.probdef) –Initial conditions (Model Viewer, prefix.O.head and prefix.O.comps) 27
My Model Doesn’t Work: What to do when things go wrong Grid may be too coarse (GRID) –Numerical oscillation –Excessive numerical dispersion Time step may be too long (TIME_CONTROL) –Numerical oscillation –Excessive numerical dispersion –Excessive operator splitting error 28
My Model Doesn’t Work: What to do when things go wrong Check tolerance and controls on iterative solver (SOLUTION_METHOD) Check controls on automatic time-step algorithm for steady-state flow (STEADY_FLOW) Review the simulation history –Time steps (prefix.log) –Maximum changes in head (prefix.log) –Solver iterations (prefix.log) –Global balance tables (prefix.O.bal) 29
My Model Doesn’t Work: What to do when things go wrong Use most robust numerics –Set backwards-in-time and upstream-in- space differencing –Set equal dispersivities in all directions –No cross dispersion Simplify the problem –Flow only –Conservative transport –Simplify the region and boundary conditions 30
My Model Doesn’t Work: What to do when things go wrong Look for errors in chemistry –Run batch chemistry in PHREEQC –Run 1D transport in PHREEQC Most problems with convergence in chemistry –Redox –Small total concentration of element (~1e-14) Lack of chemical convergence may be the result of a poor transport solution (oscillations) 31
My Model Doesn’t Work: What to do when things go wrong Contact me 32
The purpose of computing is insight, not numbers. --R.W. Hamming (1962) --R.W. Hamming (1962) The purpose of computing is insight, not pictures. --L.N. Trefethen (1998) --L.N. Trefethen (1998) 33