imod.evaluate.streamfunction_linestring(frf, fff, linestring)[source]#

Obtain the streamfunction for a linestring cross section through a three-dimensional flow field. The streamfunction is obtained by first projecting the horizontal flow components onto the provided cross-section. The streamfunction can be contoured to visualize stream lines. Stream lines are an efficient way to visualize groundwater flow.

Note, however, that the streamfunction is only defined in 2D, non-diverging, steady-state flow without sources and sinks. These assumption are violated even in a 2D model, but even more so in the approach followed here. Flow perpendicular to the cross-section will not be visualized. It is up to the user to choose cross-sections as perpendicular to the main flow direction as possible.

The 2D streamfunction and stream line visualization is based on work of Em. Prof. Olsthoorn.

  • frf (xarray.DataArray) – Three- (or higher) dimensional dataarray of flow component along the rows (FLOW RIGHT FACE).

  • fff (xarray.DataArray) – Three- (or higher) dimensional dataarray of flow component along the columns (FLOW FRONT FACE).

  • linestring (shapely.geometry.LineString) – Shapely geometry designating the linestring along which to sample the cross section.


The streamfunction projected on the cross-section defined by provided linestring, with new dimension “s” along the cross-section. The cellsizes along “s” are given in the “ds” coordinate.

Return type