flownet_interpolate_quadrilateral: Interpolate quadrilateral flownet solution on rectangular...

View source: R/flownet_quadrilateral_old.R View source: R/flownet_quadrilateral.R

flownet_interpolate_quadrilateralR Documentation

Interpolate quadrilateral flownet solution on rectangular grid

Description

Take a flow net solution calculated on a quadrilateral grid, and interpolate the results on a regular grid. This grid can be used to calculate contour lines (flow lines etc)

Take a flow net solution calculated on a quadrilateral grid, and interpolate the results on a regular grid. This grid can be used to calculate contour lines (flow lines etc)

Usage

flownet_interpolate_quadrilateral(df, dp, grid_size = NULL)

flownet_interpolate_quadrilateral(df, dp, grid_size = NULL)

Arguments

df

list with geometry and boundary conditions of the problem. See function 'flownet_geometry_quadrilateral()' for more information

dp

tibble with solution, see function 'flownet_solve_quadrilateral()'

grid_size

grid size to use for rectangular interpolation grid. If not defined, it is chosen roughly in line with the smallest quadrilateral grid cell

Value

a tibble with flow net results at an rectangular grid

a tibble with flow net results at an rectangular grid

Examples

df <- flownet_geometry_quadrilateral(grid_size = 0.25)
dp <- flownet_solve_quadrilateral(df)
di <- flownet_interpolate_quadrilateral(df, dp)

ggplot2::ggplot() +
  ggplot2::geom_tile(
    data = di,
    ggplot2::aes(x = x, y = y, fill = h)
  ) +
  ggplot2::geom_point(
    data = dp,
    ggplot2::aes(x = x, y = y, fill = h),
    color = "black",
    pch = 21
  ) +
  ggplot2::scale_fill_distiller(palette = "RdYlBu")
df <- flownet_geometry_quadrilateral(grid_size = 0.25)
dp <- flownet_solve_quadrilateral(df)
di <- flownet_interpolate_quadrilateral(df, dp)

ggplot2::ggplot() +
  ggplot2::geom_tile(
    data = di,
    ggplot2::aes(x = x, y = y, fill = h)
  ) +
  ggplot2::geom_point(
    data = dp,
    ggplot2::aes(x = x, y = y, fill = h),
    color = "black",
    pch = 21
  ) +
  ggplot2::scale_fill_distiller(palette = "RdYlBu")

GJMeijer/soilmech documentation built on May 22, 2022, 10:39 a.m.