Skip to content

Commit 37a3805

Browse files
refactor(gwe-est): remove packagedata block and put values in options block (#1882)
* refactor(gwe-est): remove packagedata block and put values in options block * spelling mistake * more spelling fixes * addresses #1882 (comment) and #1882 (comment) * right, don't forget the fortran * fix bad unit specification in dfn file * Update doc/ReleaseNotes/develop.tex Co-authored-by: langevin-usgs <[email protected]> * update keywords in mf6io est example tex file. Addresses #1882 (comment) * cleanup latent heat of vaporization; address #1882 (comment) * forgot to run mf6ivar.py * another unit blunder * apparently I biffed develop.tex during a recent rebase --------- Co-authored-by: langevin-usgs <[email protected]>
1 parent 02b605f commit 37a3805

28 files changed

+162
-200
lines changed

autotest/test_gwe_cnd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,11 @@ def build_models(idx, test):
307307
flopy.mf6.ModflowGweest(
308308
gwe,
309309
save_flows=True,
310+
heat_capacity_water=cpw,
311+
density_water=rhow,
310312
porosity=prsity,
311313
cps=760.0,
312314
rhos=1500.0,
313-
packagedata=[cpw, rhow, lhv],
314315
filename="{}.est".format(gwename),
315316
)
316317

autotest/test_gwe_drycell_cnd0.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,11 @@ def build_models(idx, test):
289289
gwe1,
290290
save_flows=True,
291291
porosity=prsity,
292+
heat_capacity_water=cpw,
293+
density_water=rhow,
294+
latent_heat_vaporization=lhv,
292295
cps=760.0,
293296
rhos=1500.0,
294-
packagedata=[cpw, rhow, lhv],
295297
pname="EST-2",
296298
filename="{}.est".format(gwename1),
297299
)
@@ -403,7 +405,9 @@ def check_output(idx, test):
403405
"Pass through cell should not be as warm as its neighbor to "
404406
"the left"
405407
)
406-
assert np.all(np.round(conc1[:, 0, 0, 3] - conc1[:, 0, 0, 2], 8) <= 0), msg5
408+
assert np.all(
409+
np.round(conc1[:, 0, 0, 3] - conc1[:, 0, 0, 2], 8) <= 0
410+
), msg5
407411

408412

409413
# - No need to change any code below

autotest/test_gwe_drycell_cnd1.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,11 @@ def build_models(idx, test):
329329
gwe1,
330330
save_flows=True,
331331
porosity=prsity,
332+
heat_capacity_water=cpw,
333+
density_water=rhow,
334+
latent_heat_vaporization=lhv,
332335
cps=760.0,
333336
rhos=1500.0,
334-
packagedata=[cpw, rhow, lhv],
335337
pname="EST-2",
336338
filename="{}.est".format(gwename1),
337339
)

autotest/test_gwe_drycell_cnd2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,11 @@ def build_models(idx, test):
487487
gwe,
488488
save_flows=True,
489489
porosity=prsity,
490+
heat_capacity_water=cpw,
491+
density_water=rhow,
492+
latent_heat_vaporization=lhv,
490493
cps=cps,
491494
rhos=rhos,
492-
packagedata=[cpw, rhow, lhv],
493495
pname="EST-3",
494496
filename="{}.est".format(gwename),
495497
)

autotest/test_gwe_drycell_cnd4.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,11 @@ def add_gwe_model(sim, gwename):
348348
gwe,
349349
save_flows=True,
350350
porosity=prsity,
351+
heat_capacity_water=cpw,
352+
density_water=rhow,
353+
latent_heat_vaporization=lhv,
351354
cps=cps,
352355
rhos=rhos,
353-
packagedata=[cpw, rhow, lhv],
354356
pname="EST",
355357
filename="{}.est".format(gwename),
356358
)

autotest/test_gwe_esl01.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,11 @@ def build_models(idx, test):
269269
gwe,
270270
save_flows=True,
271271
porosity=prsity,
272+
heat_capacity_water=cpw,
273+
density_water=rhow,
274+
latent_heat_vaporization=lhv,
272275
cps=cps,
273276
rhos=rhos,
274-
packagedata=[cpw, rhow, lhv],
275277
pname="EST-2",
276278
filename="{}.est".format(gwename),
277279
)

autotest/test_gwe_esl02.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ def build_models(idx, test):
268268
gwe,
269269
save_flows=True,
270270
porosity=prsity,
271+
heat_capacity_water=cpw,
272+
density_water=rhow,
273+
latent_heat_vaporization=lhv,
271274
cps=cps,
272275
rhos=rhos,
273-
packagedata=[cpw, rhow, lhv],
274276
pname="EST-1",
275277
filename="{}.est".format(gwename),
276278
)

autotest/test_gwe_esl_analyt_sln.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
# Eqn 7-3: Bulk thermal diffusivity
145145
D = K_t_bulk / rho_C_bulk
146146

147+
147148
# Energy input to boundary (q_x term in the documentation)
148149
def calc_ener_input(primer_val):
149150
ener_add_rate = delr * delc * delz * rho_C_bulk * primer_val
@@ -334,9 +335,11 @@ def build_models(idx, test, ener_input):
334335
flopy.mf6.ModflowGweest(
335336
gwe,
336337
porosity=theta,
338+
heat_capacity_water=Cpw,
339+
density_water=rhow,
340+
latent_heat_vaporization=lhv,
337341
cps=Cps,
338342
rhos=rhos,
339-
packagedata=[Cpw, rhow, lhv],
340343
pname="EST-1",
341344
filename="{}.est".format(gwename),
342345
)
@@ -412,18 +415,18 @@ def eq7_24(x, t, l, D, T_0, ener_add_rate):
412415
x_hat = x / l # Dimensionless distance
413416

414417
# Compute corresponding t_hat term
415-
t_hat = D * t / l ** 2 # Dimensionless time
418+
t_hat = D * t / l**2 # Dimensionless time
416419

417420
# Solve equation 7-24
418-
term1 = (1 / 2) * (x_hat ** 2 - 1 / 3)
421+
term1 = (1 / 2) * (x_hat**2 - 1 / 3)
419422
summation_terms = [
420423
((-1) ** n)
421-
/ n ** 2
422-
* math.exp(-1 * n ** 2 * math.pi ** 2 * t_hat)
424+
/ n**2
425+
* math.exp(-1 * n**2 * math.pi**2 * t_hat)
423426
* math.cos(n * math.pi * x_hat)
424427
for n in np.arange(1, 1000)
425428
]
426-
term2 = 2 / (math.pi ** 2) * np.sum(summation_terms)
429+
term2 = 2 / (math.pi**2) * np.sum(summation_terms)
427430
T = T_0 + ener_add_rate * l / K_t_bulk * (t_hat + term1 - term2)
428431

429432
return T
@@ -434,17 +437,17 @@ def eq7_25(x, t, l, D, T_0, ener_add_rate):
434437
x_hat = x / l # Dimensionless distance
435438

436439
# Compute corresponding t_hat term
437-
t_hat = D * t / l ** 2 # Dimensionless time
440+
t_hat = D * t / l**2 # Dimensionless time
438441

439442
# Solve equation 7-25
440443
summation_terms = [
441444
((-1) ** n)
442445
/ (2 * n + 1) ** 2
443-
* math.exp(-1 * (2 * n + 1) ** 2 * math.pi ** 2 * t_hat / 4)
446+
* math.exp(-1 * (2 * n + 1) ** 2 * math.pi**2 * t_hat / 4)
444447
* math.sin((2 * n + 1) * math.pi * x_hat / 2)
445448
for n in np.arange(0, 1000)
446449
]
447-
term1 = (8 / math.pi ** 2) * np.sum(summation_terms)
450+
term1 = (8 / math.pi**2) * np.sum(summation_terms)
448451

449452
T = T_0 + ener_add_rate * l / K_t_bulk * (x_hat - term1)
450453

@@ -456,19 +459,19 @@ def eq7_26(x, t, el, D, T_0, ener_add_rate):
456459
x_hat = x / el # Dimensionless distance
457460

458461
# Compute corresponding t_hat term
459-
t_hat = D * t / el ** 2 # Dimensionless time
462+
t_hat = D * t / el**2 # Dimensionless time
460463

461464
# Solve equation 7-26
462465
term1 = x_hat * (1 - x_hat)
463466
summation_terms = [
464467
1
465468
/ (2 * n + 1) ** 3
466-
* math.exp(-1 * (2 * n + 1) ** 2 * math.pi ** 2 * t_hat)
469+
* math.exp(-1 * (2 * n + 1) ** 2 * math.pi**2 * t_hat)
467470
* math.sin((2 * n + 1) * math.pi * x_hat)
468471
for n in np.arange(0, 1000)
469472
]
470-
term2 = (8 / math.pi ** 3) * np.sum(summation_terms)
471-
T = T_0 + 0.5 * ener_add_rate * el ** 2 / K_t_bulk * (term1 - term2)
473+
term2 = (8 / math.pi**3) * np.sum(summation_terms)
474+
T = T_0 + 0.5 * ener_add_rate * el**2 / K_t_bulk * (term1 - term2)
472475

473476
return T
474477

autotest/test_gwe_lke_conduction.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,9 +575,11 @@ def build_models(idx, test):
575575
flopy.mf6.ModflowGweest(
576576
gwe,
577577
porosity=porosity,
578+
heat_capacity_water=Cpw,
579+
density_water=rhow,
580+
latent_heat_vaporization=lhv,
578581
cps=Cps,
579582
rhos=rhos,
580-
packagedata=[Cpw, rhow, lhv],
581583
pname="MST-1",
582584
filename=f"{gwename}.mst",
583585
)

autotest/test_gwe_mve.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,11 @@ def build_mf6_model(idx, ws):
567567
gwe,
568568
save_flows=True,
569569
porosity=prsity,
570+
heat_capacity_water=cpw,
571+
density_water=rhow,
572+
latent_heat_vaporization=lhv,
570573
cps=cps,
571574
rhos=rhos,
572-
packagedata=[cpw, rhow, lhv],
573575
pname="EST",
574576
filename=f"{gwename}.est",
575577
)

0 commit comments

Comments
 (0)