Skip to content

Commit f6f7259

Browse files
authored
Merge pull request #159 from kallejahn/2025
comments on packages in GWT notebook
2 parents 440d774 + 4f4c3a5 commit f6f7259

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

notebooks/part1_flopy/09-gwt-voronoi-demo.ipynb

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"\n",
1010
"MODFLOW 6 includes a Groundwater Transport (GWT) Model for simulation of solute transport through the subsurface. The GWT Model can be used with structured or unstructured model grids. The purpose of this example is to demonstrate the construction, running, and post-processing of a simple solute transport model.\n",
1111
"\n",
12-
"The solute transport model is based on an existing flow model of the Freyberg example. The flow model usesd a voronoi model grid to simulate steady-state conditions. In this notebook, we create a transient solute transport model using the same voronoi grid that was used for flow.\n",
12+
"The solute transport model is based on an existing flow model of the Freyberg example. The flow model uses a voronoi model grid to simulate steady-state conditions. In this notebook, we create a transient solute transport model using the same voronoi grid.\n",
1313
"\n",
14-
"The following steps are used in this notebook.\n",
14+
"The following steps are taken in this notebook:\n",
1515
"* Load the existing flow model into FloPy\n",
1616
"* Plot the model grid\n",
1717
"* Create the solute transport model\n",
@@ -127,7 +127,17 @@
127127
"id": "24a69ac7-9fd0-4dbb-940e-138f7a7493e5",
128128
"metadata": {},
129129
"source": [
130-
"Assign a constant concentration condition to the x, y location of 550, 7900. Use the `modelgrid.intersect` method to determine the cell number for the constant concentration condition."
130+
"We will assign a constant concentration condition to the x, y location of 550, 7900. Use the `modelgrid.intersect` method to determine the cell number for the constant concentration condition."
131+
]
132+
},
133+
{
134+
"cell_type": "code",
135+
"execution_count": null,
136+
"id": "a23b4416",
137+
"metadata": {},
138+
"outputs": [],
139+
"source": [
140+
"x, y = 550, 7900"
131141
]
132142
},
133143
{
@@ -137,7 +147,8 @@
137147
"metadata": {},
138148
"outputs": [],
139149
"source": [
140-
"gwf.modelgrid.intersect(550, 7900)"
150+
"cc_cell = gwf.modelgrid.intersect(x, y)\n",
151+
"cc_cell"
141152
]
142153
},
143154
{
@@ -157,7 +168,7 @@
157168
"source": [
158169
"gwf.modelgrid.plot()\n",
159170
"ax = plt.gca()\n",
160-
"ax.plot(550, 7900, marker=\"o\", lw=0, color=\"red\", )"
171+
"ax.plot(x, y, marker=\"o\", lw=0, color=\"red\", )"
161172
]
162173
},
163174
{
@@ -285,19 +296,22 @@
285296
" cell2d=cell2d,\n",
286297
")\n",
287298
"ic = flopy.mf6.ModflowGwtic(gwt, strt=0.0)\n",
288-
"adv = flopy.mf6.ModflowGwtadv(\n",
289-
" gwt, \n",
290-
" scheme=\"tvd\",\n",
291-
")\n",
299+
"# use the TVD advection solver scheme, upstream is default\n",
300+
"adv = flopy.mf6.ModflowGwtadv(gwt, scheme=\"tvd\")\n",
301+
"# define logitudinal and transverse dispersivity\n",
292302
"dsp = flopy.mf6.ModflowGwtdsp(gwt, alh=50.0, ath1=5)\n",
303+
"# define a uniform porosity in the \"mobile\" portion of the aquifer\n",
293304
"mst = flopy.mf6.ModflowGwtmst(gwt, porosity=0.2)\n",
305+
"# point the transport model to the flow model head and budget outputs\n",
306+
"# these must include outputs from ALL time steps\n",
294307
"pd = [\n",
295308
" (\"GWFHEAD\", f\"../../{model_ws_load}{name_load}.hds\", None),\n",
296309
" (\"GWFBUDGET\", f\"../../{model_ws_load}{name_load}.cbc\", None),\n",
297310
"]\n",
298311
"fmi = flopy.mf6.ModflowGwtfmi(gwt, packagedata=pd)\n",
299312
"ssm = flopy.mf6.ModflowGwtssm(gwt)\n",
300-
"cnc = flopy.mf6.ModflowGwtcnc(gwt, stress_period_data=[(0, 2027, 100.)])\n",
313+
"# this is where we define the constanc concentration\n",
314+
"cnc = flopy.mf6.ModflowGwtcnc(gwt, stress_period_data=[(0, cc_cell, 100.)])\n",
301315
"\n",
302316
"oc = flopy.mf6.ModflowGwtoc(\n",
303317
" gwt,\n",
@@ -457,7 +471,7 @@
457471
],
458472
"metadata": {
459473
"kernelspec": {
460-
"display_name": "Python 3 (ipykernel)",
474+
"display_name": "pyclass",
461475
"language": "python",
462476
"name": "python3"
463477
},
@@ -471,7 +485,7 @@
471485
"name": "python",
472486
"nbconvert_exporter": "python",
473487
"pygments_lexer": "ipython3",
474-
"version": "3.12.1"
488+
"version": "3.12.11"
475489
}
476490
},
477491
"nbformat": 4,

0 commit comments

Comments
 (0)