Skip to main content

norm

Overview

The norm function object normalises an input field with a chosen norm, and writes a new normalised field.

Usage

Example of function object specification:

norm1
{
// Mandatory entries
type norm;
libs (fieldFunctionObjects);
field <word>;
norm <word>;

// Conditional entries

// When norm = Lp
p <scalar>;

// When norm = composite
divisor <Function1<scalar>>;

// When norm = divisorField
divisorField <word>;

// Inherited entries
...
}

where the entries mean:

PropertyDescriptionTypeRequiredDefault
typeType name: normwordyes-
libsLibrary name: fieldFunctionObjectswordyes-
fieldName of the operand fieldwordyes-
normName of normalisation operationwordyes-
pNorm exponent for the p-normscalarconditional-
divisorNorm divisor for the composite normFunction1<scalar>conditional-
divisorFieldDivisor scalar field for the field normwordconditional-

Options for the norm entry:

PropertyDescriptionExpression
L1L1/Taxicab normy=xΣi=1nxi\vec{y} = \frac{\vec{x}}{\Sigma_{i=1}^n \vert x_i \vert}
L2L2/Euclidean normy=xx12+...+xn2\vec{y} = \frac{\vec{x}}{\sqrt{x_1^2 + ... + x_n^2}}
Lpp normy=x(Σi=1nxip)1/p\vec{y} = \frac{\vec{x}}{(\Sigma_{i=1}^n \vert x_i \vert^p)^{1/p}}
maxMaximum normy=xmaxxi\vec{y} = \frac{\vec{x}}{\max\vert x_i \vert}
compositeComposite norm with Function1 divisory=xf(t)\vec{y} = \frac{\vec{x}}{f(t)}
divisorFieldNormalise by fieldy=xz\vec{y} = \frac{\vec{x}}{\vec{z}}

The inherited entries are elaborated in:

Divisor quantity is perturbed by SMALL value to prevent any divisions by zero irrespective of whether the quantity is close to zero or not.

Operands

OperandTypeLocation
Input{vol,surface,polySurface}<Type>Field<case>/<time>/
Output file--
Output field{vol,surface,polySurface}<Type>Field<case>/<time>/

where <Type>={Scalar,Vector,SphericalTensor,SymmTensor,Tensor}.

Further information

Tutorial:

Source code:

API:

History: Introduced in version v2206