Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utils): move channel flow utilities from modflow6 #1668

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Dec 22, 2022

Move open channel flow utility functions from MODFLOW 6 to new file flopy/utils/channel_utils.py. These were originally in modflow6's autotest/scripts/cross_section_functions.py.

Functions are included for

  • calculating wetted perimeter and area from channel geometry and water surface depth
  • computing discharge given channel geometry, flow depth, a roughness coefficient, and slope
  • iteratively approximating flow depth given channel geometry, discharge, a roughness coefficient, and slope

Discharge can be calculated for rectangular channels given width and height, as well as for more complex channel cross sections given a set of contiguous segments making up the channel bed.

This PR follows up on #1621 with a view to moving modeling-related utilities to flopy

@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #1668 (1114c93) into develop (1114c93) will not change coverage.
The diff coverage is n/a.

❗ Current head 1114c93 differs from pull request most recent head 1afdd5c. Consider uploading reports for the commit 1afdd5c to get more accurate results

@@           Coverage Diff           @@
##           develop   #1668   +/-   ##
=======================================
  Coverage     71.4%   71.4%           
=======================================
  Files          253     253           
  Lines        55884   55884           
=======================================
  Hits         39946   39946           
  Misses       15938   15938           

@wpbonelli wpbonelli changed the title feat(utils): move cross section utils from modflow-devtools refactor(deps/utils): miscellaneous Dec 22, 2022
@wpbonelli wpbonelli changed the title refactor(deps/utils): miscellaneous feat(utils): move channel flow utilities from modflow6 Dec 23, 2022
@wpbonelli wpbonelli force-pushed the relocate-utils branch 4 times, most recently from 6d1f8d6 to fea25ad Compare January 6, 2023 04:15
Copy link
Contributor

@jdhughes-usgs jdhughes-usgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure anyone that uses flopy will need channel_utils but at least it is more available in flopy than in the mf6 repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants