ggplot_simpleshear_dilation: Plot simple shear element with dilating soil

View source: R/contraction_dilation.R

ggplot_simpleshear_dilationR Documentation

Plot simple shear element with dilating soil

Description

Function returns a plot with a simple shear-deformed element filled with soil particles, starting off in a dense state and dilating with deformation

Usage

ggplot_simpleshear_dilation(
  u = 1,
  width = 1,
  n = 4,
  nc = 91,
  crop = TRUE,
  marg = 0.02,
  color_water = "#2a7fff",
  color_soil = "#d3bc5f",
  size_water = 1,
  size_soil = 0.5
)

Arguments

u

relative shear displacement, between 0 (no deformation, dense) and 1 (max deformation, loose)

width

width of the sample relative to its height

n

number of grains to use over the sample height

nc

number of vertices for plotting circles for grains

crop

if 'TRUE', only parts of particles that are present within the element of soil are plotted. If 'FALSE', also the parts of the particles that are sticking out are plotted

marg

plot margins, relative to the height of the soil sample

color_water

color for soil particles

color_soil

color for water

size_water

line thickness for water/soil element

size_soil

line thickness for soil particles

Value

a ggplot object

Examples

ggplot_simpleshear_dilation(u = 0, n = 3)
ggplot_simpleshear_dilation(u = 1, n = 3)

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