ggplot_simpleshear_contraction: Plot simple shear element with contractive soil

View source: R/contraction_dilation.R

ggplot_simpleshear_contractionR Documentation

Plot simple shear element with contractive soil

Description

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

Usage

ggplot_simpleshear_contraction(
  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, loose) and 1 (max deformation, dense)

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_contraction(u = 0, n = 3)
ggplot_simpleshear_contraction(u = 1, n = 3)

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