Skip to main content

surfaceDistance

Description

The surfaceDistance function object computes the distance to the nearest surface from a given geometry.

Operands

OperandTypeLocation
input--
output file--
output fieldvolScalarField$FOAM_CASE/<time>/surfaceDistance

Usage

Example of the surfaceDistance function object by using functions sub-dictionary in system/controlDict file:

surfaceDistance1
{
// Mandatory entries (unmodifiable)
type surfaceDistance;
libs (fieldFunctionObjects);

// Mandatory entries (runtime modifiable)
geometry
{
motorBike.obj
{
type triSurfaceMesh;
name motorBike;
}
}

// Optional entries (runtime modifiable)
calculateCells true;

// Optional (inherited) entries
region region0;
enabled true;
log true;
timeStart 0;
timeEnd 1000;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval 1;
}

where the entries mean:

PropertyDescriptionTypeRequiredDefault
typeType name: surfaceDistancewordyes-
libsLibrary name: fieldFunctionObjectswordyes-
geometrySurface detailsdictyes-
calculateCellsCalculate distance from cellboolnotrue

The inherited entries are elaborated in:

Usage by the postProcess utility is not available.

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1912