-
Notifications
You must be signed in to change notification settings - Fork 1
/
inflowslab.tcl
executable file
·367 lines (277 loc) · 14 KB
/
inflowslab.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# This runs the tilted-v catchment problem
# similar to that in Kollet and Maxwell (2006) AWR
#
# Import the ParFlow TCL package
#
lappend auto_path $env(PARFLOW_DIR)/bin
package require parflow
namespace import Parflow::*
pfset FileVersion 4
pfset Process.Topology.P 1
pfset Process.Topology.Q 1
pfset Process.Topology.R 1
#---------------------------------------------------------
# Computational Grid
#---------------------------------------------------------
pfset ComputationalGrid.Lower.X 0.0
pfset ComputationalGrid.Lower.Y 0.0
pfset ComputationalGrid.Lower.Z 0.0
pfset ComputationalGrid.NX 100
pfset ComputationalGrid.NY 1
pfset ComputationalGrid.NZ 300
pfset ComputationalGrid.DX 1.0
pfset ComputationalGrid.DY 1.0
pfset ComputationalGrid.DZ .05
#---------------------------------------------------------
# Domain Geometry
#---------------------------------------------------------
pfset GeomInput.Names "solidinput1 slabin clayin"
pfset GeomInput.solidinput1.InputType SolidFile
pfset GeomInput.solidinput1.GeomNames domain
pfset GeomInput.solidinput1.FileName domain.pfsol
pfset Geom.domain.Patches "z-upper x-lower y-lower \
x-upper y-upper z-lower"
# slab 2
pfset GeomInput.slabin.InputType SolidFile
pfset GeomInput.slabin.GeomNames slab
pfset GeomInput.slabin.FileName slab.pfsol
pfset Geom.slab.Patches "z-upper x-lower y-lower \
x-upper y-upper z-lower"
pfset GeomInput.clayin.InputType Box
pfset GeomInput.clayin.GeomName clay
#-----------------------------------------------------------------------------
# slab 1
#-----------------------------------------------------------------------------
pfset Geom.clay.Lower.X 8.0
pfset Geom.clay.Lower.Y 0.0
pfset Geom.clay.Lower.Z 5.8
pfset Geom.clay.Upper.X 50.0
pfset Geom.clay.Upper.Y 1.0
pfset Geom.clay.Upper.Z 6.2
#-----------------------------------------------------------------------------
# Perm
#-----------------------------------------------------------------------------
pfset Geom.Perm.Names "domain slab clay"
# Values in m/hour
# hydraulic conductivity is very low, but not zero, top node will have to saturate
# before overland flow can begin and will be driven by hortonian flow
# comment out the left and right settings to make the subsurface heterogeneous using
# turning bands above. Run time increases quite a bit with a heterogeneous
# subsurface
#
pfset Geom.domain.Perm.Type Constant
pfset Geom.domain.Perm.Value 100.
pfset Geom.clay.Perm.Type Constant
pfset Geom.clay.Perm.Value 0.025
pfset Geom.slab.Perm.Type Constant
pfset Geom.slab.Perm.Value 0.001
pfset Perm.TensorType TensorByGeom
pfset Geom.Perm.TensorByGeom.Names "domain"
pfset Geom.domain.Perm.TensorValX 1.0d0
pfset Geom.domain.Perm.TensorValY 1.0d0
pfset Geom.domain.Perm.TensorValZ 1.0d0
#-----------------------------------------------------------------------------
# Specific Storage
#-----------------------------------------------------------------------------
pfset SpecificStorage.Type Constant
pfset SpecificStorage.GeomNames "domain"
#pfset Geom.domain.SpecificStorage.Value 1.0e-5
pfset Geom.domain.SpecificStorage.Value 0.0
#-----------------------------------------------------------------------------
# Phases
#-----------------------------------------------------------------------------
pfset Phase.Names "water"
pfset Phase.water.Density.Type Constant
pfset Phase.water.Density.Value 1.0
pfset Phase.water.Viscosity.Type Constant
pfset Phase.water.Viscosity.Value 1.0
#-----------------------------------------------------------------------------
# Contaminants
#-----------------------------------------------------------------------------
pfset Contaminants.Names ""
#-----------------------------------------------------------------------------
# Retardation
#-----------------------------------------------------------------------------
pfset Geom.Retardation.GeomNames ""
#-----------------------------------------------------------------------------
# Gravity
#-----------------------------------------------------------------------------
pfset Gravity 1.0
#-----------------------------------------------------------------------------
# Setup timing info
#-----------------------------------------------------------------------------
# run for 2 hours @ 6min timesteps
#
pfset TimingInfo.BaseUnit 0.1
pfset TimingInfo.StartCount 0
pfset TimingInfo.StartTime 0.0
pfset TimingInfo.StopTime 12.0
pfset TimingInfo.DumpInterval 0.1
pfset TimeStep.Type Constant
pfset TimeStep.Value 0.1
#-----------------------------------------------------------------------------
# Porosity
#-----------------------------------------------------------------------------
pfset Geom.Porosity.GeomNames "domain"
pfset Geom.domain.Porosity.Type Constant
pfset Geom.domain.Porosity.Value 0.1
#-----------------------------------------------------------------------------
# Domain
#-----------------------------------------------------------------------------
pfset Domain.GeomName domain
#-----------------------------------------------------------------------------
# Relative Permeability
#-----------------------------------------------------------------------------
pfset Phase.RelPerm.Type VanGenuchten
#pfset Phase.RelPerm.GeomNames "domain slab clay"
pfset Phase.RelPerm.GeomNames domain
#pfset Geom.domain.RelPerm.Alpha 6.0
#pfset Geom.domain.RelPerm.N 2.
pfset Geom.domain.RelPerm.Alpha 2.0
pfset Geom.domain.RelPerm.N 2.
pfset Geom.slab.RelPerm.Alpha 1.0
pfset Geom.slab.RelPerm.N 3.
pfset Geom.clay.RelPerm.Alpha 1.0
pfset Geom.clay.RelPerm.N 3.
#---------------------------------------------------------
# Saturation
#---------------------------------------------------------
pfset Phase.Saturation.Type VanGenuchten
#pfset Phase.Saturation.GeomNames "domain slab clay"
pfset Phase.Saturation.GeomNames domain
#pfset Geom.domain.Saturation.Alpha 6.0
#pfset Geom.domain.Saturation.N 2.
pfset Geom.domain.Saturation.Alpha 2.0
pfset Geom.domain.Saturation.N 2.
pfset Geom.domain.Saturation.SRes 0.2
pfset Geom.domain.Saturation.SSat 1.0
pfset Geom.slab.Saturation.Alpha 1.0
pfset Geom.slab.Saturation.N 3.
pfset Geom.slab.Saturation.SRes 0.3
pfset Geom.slab.Saturation.SSat 1.0
pfset Geom.clay.Saturation.Alpha 1.0
pfset Geom.clay.Saturation.N 3.
pfset Geom.clay.Saturation.SRes 0.3
pfset Geom.clay.Saturation.SSat 1.0
#-----------------------------------------------------------------------------
# Wells
#-----------------------------------------------------------------------------
pfset Wells.Names ""
#-----------------------------------------------------------------------------
# Time Cycles
#-----------------------------------------------------------------------------
pfset Cycle.Names "constant rainrec"
pfset Cycle.constant.Names "alltime"
pfset Cycle.constant.alltime.Length 1
pfset Cycle.constant.Repeat -1
# rainfall and recession time periods are defined here
# rain for 1 hour, recession for 2 hours
pfset Cycle.rainrec.Names "rain rec"
pfset Cycle.rainrec.rain.Length 20
pfset Cycle.rainrec.rec.Length 100
pfset Cycle.rainrec.Repeat -1
#-----------------------------------------------------------------------------
# Boundary Conditions: Pressure
#-----------------------------------------------------------------------------
pfset BCPressure.PatchNames [pfget Geom.domain.Patches]
pfset Patch.x-lower.BCPressure.Type FluxConst
pfset Patch.x-lower.BCPressure.Cycle "constant"
pfset Patch.x-lower.BCPressure.alltime.Value 0.0
pfset Patch.y-lower.BCPressure.Type FluxConst
pfset Patch.y-lower.BCPressure.Cycle "constant"
pfset Patch.y-lower.BCPressure.alltime.Value 0.0
pfset Patch.z-lower.BCPressure.Type FluxConst
pfset Patch.z-lower.BCPressure.Cycle "constant"
pfset Patch.z-lower.BCPressure.alltime.Value 0.0
pfset Patch.x-upper.BCPressure.Type FluxConst
pfset Patch.x-upper.BCPressure.Cycle "constant"
pfset Patch.x-upper.BCPressure.alltime.Value -0.001
pfset Patch.y-upper.BCPressure.Type FluxConst
pfset Patch.y-upper.BCPressure.Cycle "constant"
pfset Patch.y-upper.BCPressure.alltime.Value 0.0
## overland flow boundary condition with very heavy rainfall then slight ET
pfset Patch.z-upper.BCPressure.Type OverlandFlow
pfset Patch.z-upper.BCPressure.Cycle "rainrec"
pfset Patch.z-upper.BCPressure.rain.Value -0.05
pfset Patch.z-upper.BCPressure.rec.Value 0.00
#---------------------------------------------------------
# Topo slopes in x-direction
#---------------------------------------------------------
pfset TopoSlopesX.Type "Constant"
pfset TopoSlopesX.GeomNames "domain"
pfset TopoSlopesX.Geom.domain.Value 0.1
#---------------------------------------------------------
# Topo slopes in y-direction
#---------------------------------------------------------
pfset TopoSlopesY.Type "Constant"
pfset TopoSlopesY.GeomNames "domain"
pfset TopoSlopesY.Geom.domain.Value 0.00
#---------------------------------------------------------
# Mannings coefficient
#---------------------------------------------------------
pfset Mannings.Type "Constant"
pfset Mannings.GeomNames "domain"
pfset Mannings.Geom.domain.Value 1.e-6
#-----------------------------------------------------------------------------
# Phase sources:
#-----------------------------------------------------------------------------
pfset PhaseSources.water.Type Constant
pfset PhaseSources.water.GeomNames domain
pfset PhaseSources.water.Geom.domain.Value 0.0
#-----------------------------------------------------------------------------
# Exact solution specification for error calculations
#-----------------------------------------------------------------------------
pfset KnownSolution NoKnownSolution
#-----------------------------------------------------------------------------
# Set solver parameters
#-----------------------------------------------------------------------------
pfset Solver Richards
pfset Solver.MaxIter 2500
pfset Solver.Drop 1E-20
pfset Solver.AbsTol 1E-9
pfset Solver.Nonlinear.MaxIter 300
pfset Solver.Nonlinear.ResidualTol 1e-7
pfset Solver.Nonlinear.EtaChoice Walker1
pfset Solver.Nonlinear.EtaChoice EtaConstant
pfset Solver.Nonlinear.EtaValue 0.001
pfset Solver.Nonlinear.UseJacobian True
pfset Solver.Nonlinear.DerivativeEpsilon 1e-16
pfset Solver.Nonlinear.StepTol 1e-20
pfset Solver.Nonlinear.Globalization LineSearch
pfset Solver.Linear.KrylovDimension 20
pfset Solver.Linear.MaxRestart 2
pfset Solver.Linear.Preconditioner PFMGOctree
pfset Solver.Linear.Preconditioner.PFMGOctree.MaxIter 1
pfset Solver.Linear.Preconditioner.PFMGOctree.MaxLevels 10
pfset Solver.Linear.Preconditioner.PFMGOctree.MaxPreRelax 1
pfset Solver.Linear.Preconditioner.PFMGOctree.MaxPostRelax 1
pfset Solver.Linear.Preconditioner.PFMGOctree.BoxSizePowerOf2 1
#pfset Solver.Linear.Preconditioner PFMG
#pfset Solver.Linear.Preconditioner.PCMatrixType FullJacobian
pfset Solver.PrintSubsurf True
pfset Solver.PrintMask True
pfset Solver.PrintSlopes True
pfset Solver.PrintMannings True
#pfset Solver.WriteSiloSubsurfData True
#pfset Solver.WriteSiloPressure True
#pfset Solver.WriteSiloSaturation True
#pfset Solver.WriteSiloSlopes True
#pfset Solver.WriteSiloMask True
#pfset Solver.WriteSiloEvapTrans True
#pfset Solver.WriteSiloEvapTransSum True
#pfset Solver.WriteSiloOverlandSum True
#pfset Solver.WriteSiloMannings True
#pfset Solver.WriteSiloSpecificStorage True
#---------------------------------------------------------
# Initial conditions: water pressure
#---------------------------------------------------------
# set water table to be at the bottom of the domain, the top layer is initially dry
pfset ICPressure.Type HydroStaticPatch
pfset ICPressure.GeomNames domain
pfset Geom.domain.ICPressure.Value 0.0
pfset Geom.domain.ICPressure.RefGeom domain
pfset Geom.domain.ICPressure.RefPatch z-lower
#-----------------------------------------------------------------------------
# Run and Unload the ParFlow output files
#-----------------------------------------------------------------------------
pfwritedb inflowslab1