mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: new multiFieldValue function object
Computes a selected operation between multiple \c fieldValue function
objects.
The operation is applied to all results of each \c fieldValue object.
Note
Each object must generate the same number and type of results.
Usage
Minimal example by using \c system/controlDict.functions:
multiFieldValue1
{
// Mandatory entries (unmodifiable)
type multiFieldValue;
libs (fieldFunctionObjects);
// Mandatory entries (runtime modifiable)
operation subtract;
// List of fieldValue function objects as dictionaries
functions
{
region1
{
...
}
region2
{
...
}
...
regionN
{
...
}
}
// Optional (inherited) entries
...
}
where the entries mean:
Property | Description | Type | Req'd | Dflt
type | Type name: multiFieldValue | word | yes | -
libs | Library name: fieldFunctionObjects | word | yes | -
operation | Operation type to apply to values | word | yes | -
functions | List of fieldValue function objects | dict | yes | -
\endtable
Options for the \c operation entry:
add | add
subtract | subtract
min | minimum
max | maximum
average | average
Deprecated fieldValueDelta
- The fieldValueDelta function object was originally written to compute the
difference between two fieldValue-type function objects. The multiFieldValue
object name better describes its purpose whilst being able to operate on an
arbitrary number of fieldValue-type objects.
This commit is contained in:
committed by
Mark Olesen
parent
b6e8768034
commit
ea12bfdb0f
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / O peration | Version: v2106 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -55,6 +55,7 @@ functions
|
||||
#include "dataCloud"
|
||||
#include "vtkCloud"
|
||||
#include "vtkWrite"
|
||||
#include "pressureDifference"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
pressureDifference
|
||||
{
|
||||
type multiFieldValue;
|
||||
libs (fieldFunctionObjects);
|
||||
|
||||
operation subtract;
|
||||
|
||||
functions
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
operation areaAverage;
|
||||
regionType patch;
|
||||
name inlet;
|
||||
fields (p);
|
||||
|
||||
writeFields no;
|
||||
writeToFile no;
|
||||
log no;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
operation areaAverage;
|
||||
regionType patch;
|
||||
name outlet;
|
||||
fields (p);
|
||||
|
||||
writeFields no;
|
||||
writeToFile no;
|
||||
log no;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user