imod.prepare.linestring_to_trapezoid_zpolygons#

imod.prepare.linestring_to_trapezoid_zpolygons(barrier_x: List[float], barrier_y: List[float], barrier_ztop: List[float], barrier_zbottom: List[float]) List[PolygonType][source]#

Create trapezoid vertical polygons from linestrings, with a varying ztop and zbottom over the line. These are shaped as follows:

xy0,zt0              xy2,zt2
   |    \          /    |
   |     \        /     |
   |      xy1,zt1       |
   |         |          |
   |         |          |
   |      xy1,zb1 -- xy2,zb2
   |     /
   |    /
xy0,zb0
Parameters:
  • barrier_x (list of floats) – x-locations of barrier, length N

  • barrier_y (list of floats) – y-locations of barrier, length N

  • barrier_ztop (list of floats) – top of barrier, length N

  • barrier_zbot (list of floats) – bottom of barrier, length N

Return type:

List of polygons with z dimension.

Examples

>>> x = [-10.0, 0.0, 10.0]
>>> y = [10.0, 0.0, -10.0]
>>> ztop = [10.0, 20.0, 15.0]
>>> zbot = [-10.0, -20.0, 0.0]
>>> polygons = linestring_to_trapezoid_zpolygons(x, y, ztop, zbot)

You can use these polygons to construct horizontal flow barriers:

>>> geometry = gpd.GeoDataFrame(geometry=polygons, data={
>>>         "resistance": [1e3, 1e3],
>>>     },
>>> )
>>> hfb = imod.mf6.HorizontalFlowBarrierResistance(geometry, print_input)