From d9d60921d0bd426614aa6ed81be0f5edae22def1 Mon Sep 17 00:00:00 2001 From: Eric Morway Date: Wed, 28 Aug 2024 09:03:27 -0700 Subject: [PATCH] refactor(gwe-est): rename variables rhos and cps to density_solid and heat_capacity_solid (#2001) * refactor(gwe-est): rename variables rhos and cps to density_solid and heat_capacity_solid * update release notes * duh * 1 oversight and 1 spelling mistake * ruff * fix spelling mistake --- autotest/test_gwe_cnd.py | 6 ++++-- autotest/test_gwe_drycell_cnd0.py | 7 +++++-- autotest/test_gwe_drycell_cnd1.py | 6 ++++-- autotest/test_gwe_drycell_cnd2.py | 4 ++-- autotest/test_gwe_drycell_cnd4.py | 4 ++-- autotest/test_gwe_esl01.py | 4 ++-- autotest/test_gwe_esl02.py | 4 ++-- autotest/test_gwe_esl_analyt_sln.py | 4 ++-- autotest/test_gwe_lke_conduction.py | 4 ++-- autotest/test_gwe_mve.py | 4 ++-- autotest/test_gwe_mwe_conduction.py | 4 ++-- autotest/test_gwe_obs.py | 6 ++++-- autotest/test_gwe_sfe_strmbedcond.py | 4 ++-- autotest/test_gwe_split_analyt.py | 4 ++-- autotest/test_gwe_stallman.py | 4 ++-- autotest/test_gwe_uze00.py | 12 +++++++----- autotest/test_gwe_vs_gwt.py | 4 ++-- autotest/test_gwegwe_exchng_with_comp2gwt.py | 8 ++++---- doc/ReleaseNotes/develop.tex | 2 +- doc/mf6io/mf6ivar/dfn/gwe-est.dfn | 7 ++++--- doc/mf6io/mf6ivar/examples/gwe-est-example.dat | 4 ++-- src/Model/GroundWaterEnergy/gwe-est.f90 | 8 ++++---- 22 files changed, 63 insertions(+), 51 deletions(-) diff --git a/autotest/test_gwe_cnd.py b/autotest/test_gwe_cnd.py index 5993627e3e9..9df4584912c 100644 --- a/autotest/test_gwe_cnd.py +++ b/autotest/test_gwe_cnd.py @@ -93,6 +93,8 @@ cpw = 4183.0 rhow = 1000.0 lhv = 2454.0 +cps = 760.0 +rhos = 1500.0 # Set solver parameter values (and related) nouter, ninner = 100, 300 @@ -307,8 +309,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, porosity=prsity, - cps=760.0, - rhos=1500.0, + heat_capacity_solid=cps, + density_solid=rhos, filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_drycell_cnd0.py b/autotest/test_gwe_drycell_cnd0.py index 115f7736461..eca5fcbcc85 100644 --- a/autotest/test_gwe_drycell_cnd0.py +++ b/autotest/test_gwe_drycell_cnd0.py @@ -76,6 +76,9 @@ rhow = 1000.0 cpw = 4183.0 lhv = 2454.0 +cps = 760.0 +rhos = 1500.0 + # Head input left_hd = 15.0 @@ -291,8 +294,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=760.0, - rhos=1500.0, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST-2", filename=f"{gwename1}.est", ) diff --git a/autotest/test_gwe_drycell_cnd1.py b/autotest/test_gwe_drycell_cnd1.py index 308e261791a..b450d011695 100644 --- a/autotest/test_gwe_drycell_cnd1.py +++ b/autotest/test_gwe_drycell_cnd1.py @@ -133,6 +133,8 @@ def isMonotonic(A): rhow = 1000.0 cpw = 4183.0 lhv = 2454.0 +cps = 760.0 +rhos = 1500.0 # Set solver parameter values (and related) nouter, ninner = 100, 300 @@ -332,8 +334,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=760.0, - rhos=1500.0, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST-2", filename=f"{gwename1}.est", ) diff --git a/autotest/test_gwe_drycell_cnd2.py b/autotest/test_gwe_drycell_cnd2.py index 8c9eb6d427f..97c36cdbced 100644 --- a/autotest/test_gwe_drycell_cnd2.py +++ b/autotest/test_gwe_drycell_cnd2.py @@ -489,8 +489,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=cps, - rhos=rhos, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST-3", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_drycell_cnd4.py b/autotest/test_gwe_drycell_cnd4.py index 4c0db0a3477..9c45ed0ce5e 100644 --- a/autotest/test_gwe_drycell_cnd4.py +++ b/autotest/test_gwe_drycell_cnd4.py @@ -349,8 +349,8 @@ def add_gwe_model(sim, gwename): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=cps, - rhos=rhos, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_esl01.py b/autotest/test_gwe_esl01.py index 3a441216e6c..b930e54bda2 100644 --- a/autotest/test_gwe_esl01.py +++ b/autotest/test_gwe_esl01.py @@ -271,8 +271,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=cps, - rhos=rhos, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST-2", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_esl02.py b/autotest/test_gwe_esl02.py index cd82dad0a38..34d72c8072c 100644 --- a/autotest/test_gwe_esl02.py +++ b/autotest/test_gwe_esl02.py @@ -270,8 +270,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=cps, - rhos=rhos, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST-1", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_esl_analyt_sln.py b/autotest/test_gwe_esl_analyt_sln.py index d0167a9ba64..402a134a0a9 100644 --- a/autotest/test_gwe_esl_analyt_sln.py +++ b/autotest/test_gwe_esl_analyt_sln.py @@ -336,8 +336,8 @@ def build_models(idx, test, ener_input): heat_capacity_water=Cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=Cps, - rhos=rhos, + heat_capacity_solid=Cps, + density_solid=rhos, pname="EST-1", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_lke_conduction.py b/autotest/test_gwe_lke_conduction.py index 9b8b1123f79..5d5ff84f8bc 100644 --- a/autotest/test_gwe_lke_conduction.py +++ b/autotest/test_gwe_lke_conduction.py @@ -576,8 +576,8 @@ def build_models(idx, test): heat_capacity_water=Cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=Cps, - rhos=rhos, + heat_capacity_solid=Cps, + density_solid=rhos, pname="MST-1", filename=f"{gwename}.mst", ) diff --git a/autotest/test_gwe_mve.py b/autotest/test_gwe_mve.py index a31689ad8c6..3ba96bcf181 100644 --- a/autotest/test_gwe_mve.py +++ b/autotest/test_gwe_mve.py @@ -568,8 +568,8 @@ def build_mf6_model(idx, ws): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=cps, - rhos=rhos, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_mwe_conduction.py b/autotest/test_gwe_mwe_conduction.py index aa790ceec66..59fc35706de 100644 --- a/autotest/test_gwe_mwe_conduction.py +++ b/autotest/test_gwe_mwe_conduction.py @@ -361,8 +361,8 @@ def build_models(idx, test): heat_capacity_water=Cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=Cps, - rhos=rhos, + heat_capacity_solid=Cps, + density_solid=rhos, pname="MST-1", filename=f"{gwename}.mst", ) diff --git a/autotest/test_gwe_obs.py b/autotest/test_gwe_obs.py index c9dacd1a992..5c6f0b2bd89 100644 --- a/autotest/test_gwe_obs.py +++ b/autotest/test_gwe_obs.py @@ -135,6 +135,8 @@ def isMonotonic(A): # GWE related parameters rhow = 1000.0 cpw = 4183.0 +cps = 760.0 +rhos = 1500.0 lhv = 2454.0 # Set solver parameter values (and related) @@ -343,8 +345,8 @@ def build_gwe_model(sim, gwename, idx): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=760.0, - rhos=1500.0, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_sfe_strmbedcond.py b/autotest/test_gwe_sfe_strmbedcond.py index 323147db78e..6b25ca91096 100644 --- a/autotest/test_gwe_sfe_strmbedcond.py +++ b/autotest/test_gwe_sfe_strmbedcond.py @@ -505,8 +505,8 @@ def build_models(idx, test): heat_capacity_water=Cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=Cps, - rhos=rhos, + heat_capacity_solid=Cps, + density_solid=rhos, pname="EST", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_split_analyt.py b/autotest/test_gwe_split_analyt.py index 27ff54fd945..8c77b03ad2b 100644 --- a/autotest/test_gwe_split_analyt.py +++ b/autotest/test_gwe_split_analyt.py @@ -270,8 +270,8 @@ def get_gwe_model(idx, sim, gwename, gwepath, ener_input, side="right"): heat_capacity_water=Cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=Cps, - rhos=rhos, + heat_capacity_solid=Cps, + density_solid=rhos, ) # Constant temperature goes on the left side of the left model diff --git a/autotest/test_gwe_stallman.py b/autotest/test_gwe_stallman.py index 8e2241fe97f..f8504b47748 100644 --- a/autotest/test_gwe_stallman.py +++ b/autotest/test_gwe_stallman.py @@ -290,8 +290,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=cps, - rhos=rhos, + heat_capacity_solid=cps, + density_solid=rhos, filename=f"{gwename}.mst", ) diff --git a/autotest/test_gwe_uze00.py b/autotest/test_gwe_uze00.py index 20de8f2ba0b..80b438ff079 100644 --- a/autotest/test_gwe_uze00.py +++ b/autotest/test_gwe_uze00.py @@ -104,6 +104,11 @@ def temp_analyt(t, z, t0, tinfil, v, d): scheme = "UPSTREAM" dispersivity = 0.0 prsity = 0.2 +rhow = 1000.0 +cpw = 4183.0 +lhv = 2500.0 +cps = 760.0 +rhos = 1500.0 # transient uzf info # iuzno cellid landflg ivertcn surfdp vks thtr thts thti eps [bndnm] @@ -340,9 +345,6 @@ def build_models(idx, test): ) # Instantiating MODFLOW 6 transport mass storage package - rhow = 1000.0 - cpw = 4183.0 - lhv = 2500.0 flopy.mf6.ModflowGweest( gwe, save_flows=True, @@ -350,8 +352,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=760.0, - rhos=1500.0, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST", filename=f"{gwename}.est", ) diff --git a/autotest/test_gwe_vs_gwt.py b/autotest/test_gwe_vs_gwt.py index 6667ca02d72..8972f34d60d 100644 --- a/autotest/test_gwe_vs_gwt.py +++ b/autotest/test_gwe_vs_gwt.py @@ -322,8 +322,8 @@ def build_models(idx, test): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=760.0, - rhos=1500.0, + heat_capacity_solid=cps, + density_solid=rhos, filename=f"{gwename}.est", ) diff --git a/autotest/test_gwegwe_exchng_with_comp2gwt.py b/autotest/test_gwegwe_exchng_with_comp2gwt.py index ce53f7320fd..40153223eb3 100644 --- a/autotest/test_gwegwe_exchng_with_comp2gwt.py +++ b/autotest/test_gwegwe_exchng_with_comp2gwt.py @@ -582,8 +582,8 @@ def add_upper_gwemodel(sim, scheme): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=cps, - rhos=rhos, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST-UP", filename=f"{mname}.est", ) @@ -660,8 +660,8 @@ def add_lower_gwemodel(sim, scheme): heat_capacity_water=cpw, density_water=rhow, latent_heat_vaporization=lhv, - cps=cps, - rhos=rhos, + heat_capacity_solid=cps, + density_solid=rhos, pname="EST-LO", filename=f"{mname}.est", ) diff --git a/doc/ReleaseNotes/develop.tex b/doc/ReleaseNotes/develop.tex index 8ad0400698a..e9cd8590a3f 100644 --- a/doc/ReleaseNotes/develop.tex +++ b/doc/ReleaseNotes/develop.tex @@ -25,7 +25,7 @@ \item Entangled with the previous issue, the ternary method could erroneously terminate a particle and report no exit face (before now this would hang) due to precision error in the exit time/position calculation. This could happen when two conditions are both met: the particle enters the subcell very close to one of its vertices, and flow very nearly parallels one of the subcell's faces. We have encountered similar situations before, solved by nudging the particle a small distance into the interior of the subcell before applying the tracking method. This particular case is resolved by increasing the padding distance from $\sisetup{input-digits = 0123456789\epsilon} \num{\epsilon e+2}$ to $\sisetup{input-digits = 0123456789\epsilon} \num{\epsilon e+5}$, where $\epsilon$ is machine precision. \item For ASCII input files erroneously containing a mix of line endings, MODFLOW would sometimes proceed with unexpected results. The program was corrected to stop with an error message if an input line contained both carriage returns and line feeds. \item Previously the PRT model's default behavior was to track particles until termination, beyond the specified simulation end time if necessary, as with MODPATH 7 stop time option 2 (extend). Under extended tracking, a particle entrained in a cyclic flow pattern, as can occur in variable-density flow, might cycle indefinitely and never terminate. The PRT model's default behavior has been changed to the equivalent of MP7 stop time option 1 (final), terminating any active particles at the specified simulation end time. If a new particle release point (PRP) package keyword option EXTEND\_TRACKING is provided, tracking is extended until particle termination. - \item A refactor of the energy storage and transfer (EST) package associated with the GWE model type results in different input requirements that breaks backward compatibility with what was required in version 6.5.0. The PACKAGEDATA block was removed from the EST package input. In its place, the heat capabity of water, the specified density of water, and the latent heat of vaporization are instead given default values that can be overridden by specifying alternative values in the OPTIONS block. + \item A refactor of the energy storage and transfer (EST) package associated with the GWE model type results in different input requirements that breaks backward compatibility with what was required in version 6.5.0. The PACKAGEDATA block was removed from the EST package input. In its place, the heat capacity of water, the specified density of water, and the latent heat of vaporization are instead given default values that can be overridden by specifying alternative values in the OPTIONS block. Additionally, the following variable names in the EST package input have been updated as follows: ``rhow'' changed to ``DENSITY\_WATER''; ``rhos'' changed to ``DENSITY\_SOLID''; ``cpw'' changed to ``HEAT\_CAPACITY\_WATER''; and ``cps'' changed to ``HEAT\_CAPACITY\_SOLID''. \item The PRT model's cell face flows were improperly combined with boundary flows; for cell faces with active neighbors, the face flow replaced any boundary flows (likely a rare situation because IFLOWFACE is typically applied to faces on the boundary of the active domain). The face flow calculation has been corrected. \item A bad pointer reference has been fixed in the PRT model. Depending on the combination of platform and compiler used to build the program, this could result in crashes (e.g. divide by zero errors) or in silent failures to properly pass particles downward between vertically adjacent cells, leading to early termination. The latter could occur as a consequence of undefined behavior which prevented detection of situations when a particle should exit a cell through its bottom face. \item For a UZF setup with multiple UZF objects in a cell, the auxmultname option would cause the program to issue an unnecessary error. The program was corrected to remove the unnecessary error. The revised program was tested to ensure that the assignment of multiple UZF objects per cell works when it should and fails when the cumulative area of the UZF objects within a cell exceed the total area for the cell. diff --git a/doc/mf6io/mf6ivar/dfn/gwe-est.dfn b/doc/mf6io/mf6ivar/dfn/gwe-est.dfn index aad4cdd944e..311d1e76bcc 100644 --- a/doc/mf6io/mf6ivar/dfn/gwe-est.dfn +++ b/doc/mf6io/mf6ivar/dfn/gwe-est.dfn @@ -68,20 +68,21 @@ longname aqueous phase decay rate coefficient description is the rate coefficient for zero-order decay for the aqueous phase of the mobile domain. A negative value indicates heat (energy) production. The dimensions of decay for zero-order decay is energy per length cubed per time. Zero-order decay will have no effect on simulation results unless zero-order decay is specified in the options block. block griddata -name cps +name heat_capacity_solid type double precision shape (nodes) reader readarray layered true longname heat capacity of the aquifer material description is the mass-based heat capacity of dry solids (aquifer material). For example, units of J/kg/C may be used (or equivalent). +mf6internal cps block griddata -name rhos +name density_solid type double precision shape (nodes) reader readarray layered true longname density of aquifer material description is a user-specified value of the density of aquifer material not considering the voids. Value will remain fixed for the entire simulation. For example, if working in SI units, values may be entered as kilograms per cubic meter. - +mf6internal rhos diff --git a/doc/mf6io/mf6ivar/examples/gwe-est-example.dat b/doc/mf6io/mf6ivar/examples/gwe-est-example.dat index 1c38f1e5b4b..bf3e113968b 100644 --- a/doc/mf6io/mf6ivar/examples/gwe-est-example.dat +++ b/doc/mf6io/mf6ivar/examples/gwe-est-example.dat @@ -7,9 +7,9 @@ END OPTIONS BEGIN GRIDDATA POROSITY CONSTANT 0.1 - CPS + HEAT_CAPACITY_SOLID CONSTANT 880.0 - RHOS + DENSITY_SOLID CONSTANT 2650.0 END GRIDDATA diff --git a/src/Model/GroundWaterEnergy/gwe-est.f90 b/src/Model/GroundWaterEnergy/gwe-est.f90 index 39fbf9dbdd7..6f0f8a9493f 100644 --- a/src/Model/GroundWaterEnergy/gwe-est.f90 +++ b/src/Model/GroundWaterEnergy/gwe-est.f90 @@ -772,12 +772,12 @@ subroutine read_data(this) this%parser%iuactive, this%decay, & aname(2)) lname(2) = .true. - case ('CPS') + case ('HEAT_CAPACITY_SOLID') call this%dis%read_grid_array(line, lloc, istart, istop, this%iout, & this%parser%iuactive, this%cps, & aname(3)) lname(3) = .true. - case ('RHOS') + case ('DENSITY_SOLID') call this%dis%read_grid_array(line, lloc, istart, istop, this%iout, & this%parser%iuactive, this%rhos, & aname(4)) @@ -801,11 +801,11 @@ subroutine read_data(this) call store_error(errmsg) end if if (.not. lname(3)) then - write (errmsg, '(a)') 'CPS not specified in griddata block.' + write (errmsg, '(a)') 'HEAT_CAPACITY_SOLID not specified in griddata block.' call store_error(errmsg) end if if (.not. lname(4)) then - write (errmsg, '(a)') 'RHOS not specified in griddata block.' + write (errmsg, '(a)') 'DENSITY_SOLID not specified in griddata block.' call store_error(errmsg) end if !