Skip to content

Conversation

@JoerivanEngelen
Copy link
Contributor

Fixes #598

Description

There was some confusion (also by me) about the use of the LayeredHorizontalFlowBarrier classes, so @HendrikKok explained me they were intended for single layers. I therefore changed the following to clarify:

  • Rename to SingleLayerHorizontalFlowBarrier classes
  • Throw ValidationError if multiple layers are added to dataset
  • Added missing test for SingleLayerHorizontalFlowBarrier class

This means multiple SingleLayerHorizontalFlowBarrier need to be added to GroundwaterFlowModel object, whereas MODFLOW 6 only accepts one single HFB. So these have to be merged together. I think the best opportunity for this is to merge the low level Mf6HorizontalFlowBarrier objects.

Checklist

  • Links to correct issue
  • Update changelog, if changes affect users
  • PR title starts with Issue #nr, e.g. Issue #737
  • Unit tests were added
  • If feature added: Added/extended example

@JoerivanEngelen JoerivanEngelen changed the base branch from master to imod5_converter_feature_branch June 27, 2024 14:41
Copy link
Contributor

@luitjansl luitjansl left a comment

Choose a reason for hiding this comment

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

looks good, some comments

imod/mf6/hfb.py Outdated
compound_dataframe = pd.concat(dataframe_ls, ignore_index=True)

return LayeredHorizontalFlowBarrierResistance(compound_dataframe)
return cls(compound_dataframe)
Copy link
Contributor

Choose a reason for hiding this comment

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

there is also a "LayeredHorizontalFlowBarrierHydraulicCharacteristic".
Should the changes in this PR also be applied there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think not. The hydraulic characteristic is a MODFLOW 6 concept: it is the inverse of the resistance. In the end, both the Resistance as well as the HydraulicCharacteristic variant are converted to a hydraulic characteristic for the Modflow6 HFB package. iMOD5 only allows you to specify a hfb with a resistance, so I don't see a real use case for adding a from_imod5_data method to the HydraulicCharacteristic class.

@JoerivanEngelen JoerivanEngelen merged commit 0da466a into imod5_converter_feature_branch Jun 28, 2024
@JoerivanEngelen JoerivanEngelen deleted the issue_#598_layered_hfb_error branch June 28, 2024 14:30
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.

Support multiple layers in the HFB layered HFB-classes

3 participants