The reference function object computes a field whose values are offset to a reference value obtained by sampling the field at a user-specified location.
The field values are calculated using:
| \( \text_c \) | = | Field values at cell |
| \( s \) | = | Optional scale factor (default = 1) |
| \( f_(t) \) | = | Current field values at cell at this time |
| \( f_p \) | = | Field value at position |
| \( f_ \) | = | Offset field value (default = 0) |
| Operand | Type | Location |
|---|---|---|
| input | Field | $FOAM_CASE// |
| output file | - | - |
| output field | Field | $FOAM_CASE// |
Example of the reference function object by using functions sub-dictionary in system/controlDict file:
reference1 < // Mandatory entries (unmodifiable) type reference; libs (fieldFunctionObjects); // Mandatory (inherited) entries (runtime modifiable) field ; // Optional entries (runtime modifiable) position (0 0 0); scale 1.0; offset 0.0; interpolationScheme cell; // Optional (inherited) entries result ; 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: reference | word | yes | - |
| libs | Library name: fieldFunctionObjects | word | yes | - |
| field | Name of the operand field | word | yes | - |
| position | Position to sample | vector | no | |
| scale | Scale value | scalar | no | 1.0 |
| offset | Offset value | scalar | no | 0.0 |
| interpolationScheme | Sampling scheme | word | no | cell |
The inherited entries are elaborated in:
Example by using the postProcess utility:
postProcess -func "reference()"
