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. \(\phi_1\) and \(\phi_2\), using a weight field, i.e. \(w\), such that the effective scheme value, i.e. \(\phi_\eff\), is computed as follows:
\[\phi_\eff = w \phi_1 + (1 - w) \phi_2\]It follows that when \(w = 1\), the scheme reduces to \(\phi_\eff = \phi_1\); similarly, when \(w = 0\), the scheme reduces to \(\phi_\eff = \phi_2\).
The weight field, i.e. \(w\), 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:
\[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🔗
Operand | Type | Location |
---|---|---|
input | - | - |
output file | dat | $FOAM_CASE/postProcessing/<FO>/<time>/<file> |
output field | volScalarField | $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:
Property | Description | Type | Required | Default |
---|---|---|---|---|
type | Type name: blendingFactor | word | yes | - |
libs | Library name: fieldFunctionObjects | word | yes | - |
field | Name of the operand field | word | yes | - |
phi | Name of flux field | word | no | phi |
tolerance | Tolerance for number of blended cells | scalar | no | 0.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+