Skip to main content

blendingFactor

Description

The blendingFactor function object computes and stores the blending coefficient employed by blended divergence schemes, giving an indicator as to which of the schemes is active across the domain.

Blended schemes combine contributions from two schemes, i.e. ϕ1\phi_1 and ϕ2\phi_2, using a weight field, i.e. ww, such that the effective scheme value, i.e. ϕeff\phi_\eff, is computed as follows:

ϕeff=wϕ1+(1w)ϕ2 \phi_\eff = w \phi_1 + (1 - w) \phi_2

It follows that when w=1w = 1, the scheme reduces to ϕeff=ϕ1\phi_\eff = \phi_1; similarly, when w=0w = 0, the scheme reduces to ϕeff=ϕ2\phi_\eff = \phi_2.

The weight field, i.e. ww, is surface field and converted to a volume field for easier post-processing by setting the cell value to one minus the minimum of the face values:

wc=1minifaces(wf,i) w_c = 1 - \min_{\forall i \in \mathrm{faces}}\left(w_{f,i}\right)

This conversion leads to blending indicator field whose values mean:

0 = scheme 0
1 = scheme 1
0-1 = a blend between scheme 0 and scheme 1

Operands

OperandTypeLocation
input--
output filedat$FOAM_CASE/postProcessing/<FO>/<time>/<file>
output fieldvolScalarField$FOAM_CASE/<time>/<outField>

Usage

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

blendingFactor1
{
// Mandatory entries (unmodifiable)
type blendingFactor;
libs (fieldFunctionObjects);

// Mandatory (inherited) entry (runtime modifiable)
field <field>;

// Optional entries (runtime modifiable)
phi phi;
tolerance 0.001;

// Optional (inherited) entries
result <fieldResult>;
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: blendingFactorwordyes-
libsLibrary name: fieldFunctionObjectswordyes-
fieldName of the operand fieldwordyes-
phiName of flux fieldwordnophi
toleranceTolerance for number of blended cellsscalarno0.001

The inherited entries are elaborated in:

Usage by the postProcess utility is not available.

Notes on entries

The field and phi entries are used to construct the scheme name to lookup from the fvSchemes dictionary, as:

div(phi,U)

The tolerance entry is used as a threshold when computing the number of cells identified as using each scheme. The tolerance entry must be in the range 0 to 1, excluding the endpoints.

Stored properties

Fields

The blending factor is stored on the mesh database, using the default name:

blendingFactor(<field>)

The name can be overridden by using the result entry.

Further information

Related:

Tutorial:

Source code:

API:

History: Introduced in version v1606+