ggplot_stresselement: ggplot to plot rotated stress element

View source: R/mohr_circles.R

ggplot_stresselementR Documentation

ggplot to plot rotated stress element

Description

Function plots a rotated stress elements and stress arrows. Magnitude of the arrows scales with magnitude of stress. Normal stress arrows scale by the major principle stress, shear arrows scale by radius of Mohr circle.

Unit cube of soil has side 1 by 1, and its centre is centred on x=0, y=0

Usage

ggplot_stresselement(
  sigz = 40,
  sigx = 20,
  tau = 10,
  theta = 0/180 * pi,
  rotation_label = "theta",
  face_label = c("X", "Z"),
  arrow_offset = 0.1,
  arrow_length = 0.5,
  palette = "Set1",
  fill_soil = "#d3bc5f",
  color_soil = "#65571d",
  coordinate_system = TRUE,
  coordinate_arrow_length = 0.5,
  stress_label = TRUE,
  stress_unit = "kPa",
  stress_label_size = 3,
  stress_nround = 1,
  effective_stress = FALSE,
  clockwise_shear = FALSE
)

Arguments

sigz

normal stress on z-plane (scalar)

sigx

normal stress on x-plane (scalar)

tau

shear stress

theta

rotation, in radians (scalar)

rotation_label

label to use for rotation

face_label

labels for x- and z-faces

arrow_offset

distance between shear arrow and cube

arrow_length

maximum length of arrow

palette

RColorBrewer color palette to use

fill_soil

color of fill of soil cube

color_soil

color of outline of soil cube

coordinate_system

if 'TRUE', show arrows with the coordinate system used

coordinate_arrow_length

length or coordinate system arrows. Defined as fraction of 'arrow_length'

stress_label

if 'TRUE', plot magnitude of (rotated) stresses in top right-hand corner

stress_unit

unit for stresses, e.g. 'stress_unit = "kPa"'

stress_label_size

size of stress labels

stress_nround

number of decimals in stress labels

effective_stress

if 'TRUE', stresses are assumed effective and 'primes' are added to the stress labels to indicate so

clockwise_shear

if 'TRUE', shear stresses are positive on positive faces of the element and when pointing in the positive direction. When 'FALSE', the default structural mechanics notation (right-hand rule for moments) is used instead, resulting in positive shear stresses pointing in the opposite direction. Function calculations assume ('clockwise_shear = TRUE')

Value

ggplot object

Examples

ggplot_stresselement(sigz = 40, sigx = 20, tau = 5, theta = pi/8)

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