VectorFieldCalc v. 1.4

This plugin for Quantum GIS allows to calculate physical parameters (e.g., divergence, curl module, pathlines), given a 2D, steady vector field, such as the velocity field of glacial flows.

In details, the calculated parameters are summarized below:

Vector parameters Magnitude gradients Pathlines
magnitude along x axis pathlines from given start points
orientations along y axis
divergence along flowlines
curl module

Divergence and curl are two vector operators widely used in physics and engineering, for example, for the study of water flows. The nabla differential operator allows to calculate these two operators from a vector field:


Input

The vector field is defined in two input rasters, storing the x-axis and y-axis components of the field. These two rasters must have the same geographical extent and resolution. In addition, the two raster should have no axis rotations, as well as the same cell resolution in x- and y-directions: these are requisites respected by the great majority of raster files.


Derived parameters

Magnitude

The vector magnitudes for each cell of the input rasters.

Orientations

The orientations of the vectors are calculated as decimal degrees (0-360°) from the map top, in a clockwise sense.

Divergence

The divergence is a scalar value derived from the scalar product of nabla and the vector field in the neighborhood of a point (x, y, z):

The divergence indicates the tendency of a flow to diverge (positive values) or converge (negative) at each individual cell.

Curl magnitude

The curl is the vector product of nabla and the vector field:

The curl is in general represented by a vector field. Sice the input vector field is 2D, the resulting field has the resulting vectors constantly vertical, such that it can be represented by a scalar field with values equal to the curl module, positive for anticlockwise rotations, negative for clockwise ones.

With GIS data, we usually consider 2D dimensionality. Therefore, we only consider partial derivatives with respect to x and y axes. For the curl, we will have a vertical vector (parallel to k), whose magnitude is equal to the last component of the curl formula.

Positive values indicate anti-clockwise rotations, negative values clockwise rotations.

Magnitude gradients

The variations of the vector magnitudes can be calculated along two fixed orientations, i.e. the x- and y- axis directions, as well as along the local orientations of the vector field. Positive gradients indicate increase of the vector field magnitude in the analyzed direction, negative gradients the opposite.

To determine the magnitude gradients along flow directions, we use a modified version of the equation for a DEM directional slope (Neteler & Mitasova, 2008, eq. A.27):
  velocity change per unit length = (dz/dx) * sin(alpha) + (dz/dy) * cos(alpha)
where alpha is the local orientation of the flow line.

Pathlines

The pathlines are calculated for a steady vector field, i.e., a field whose components do not vary with time.

The pathlines are calculated using the Runge-Kutta-Fehlenberg 45 method (RKF 45), that allows to estimate the error associated with each step interpolation. The step size is adaptive, i.e. it is changed automatically from the program to accommodate interpolation errors not larger than the provided maximum step error. Values of the vector field are interpolated using a bilinear interpolation, for both lothe x and the y components.

Input parameters are:

The output consists in a point shapefile with the following attribute fields: