% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/openfoam_docker.R
\name{add_flow_vectors}
\alias{add_flow_vectors}
\title{Add wind / flow vector arrows to a foam map plot}
\usage{
add_flow_vectors(
  p,
  r,
  spacing = 20,
  scale = 1,
  colour = "black",
  alpha = 0.6,
  linewidth = 0.25,
  arrow_size = 0.07,
  u_ref = NULL,
  quiet = FALSE
)
}
\arguments{
\item{p}{A \code{ggplot} object (output of \code{plot_foam_map}).}

\item{r}{A \code{SpatRaster} that contains layers named \code{Ux} and
\code{Uy}.}

\item{spacing}{Numeric. Arrow sub-grid spacing in the same units as the
raster coordinates (usually metres).  Default 20.}

\item{scale}{Numeric. Arrow length multiplier.  Default 1.}

\item{colour}{Character. Arrow colour.  Default \code{"black"}.}

\item{alpha}{Numeric.  Arrow opacity (0-1).  Default 0.6.}

\item{linewidth}{Numeric.  Line thickness in mm.  Default 0.25 (thin).}

\item{arrow_size}{Numeric.  Arrowhead length in cm.  Default 0.07 (tiny).}

\item{u_ref}{Numeric.  Speed (m/s) the longest arrow represents.  The
default, \code{NULL}, normalises to the field's own maximum, which makes
a near-stagnant field look as vigorous as a strong one; pass a fixed value
to put several maps on one scale.}

\item{quiet}{Logical.  Suppress the message reporting the arrow scale.}
}
\value{
The same \code{ggplot} object with arrows added.
}
\description{
Takes a \code{ggplot} object produced by \code{\link{plot_foam_map}} and
overlays velocity arrows sampled on a regular sub-grid.
}
