Function1 objectRegistry access
Summary
Cross reference EP 1657
Details of new models
Function1's
-
Function1
: The Function1 class can now be created using anobjectRegistry
, i.e. mesh or time databases, allowing other registered objects to be retrieved, e.g. fields, models, function object state and results information- change propagated across all
Function1
instances, e.g. boundary conditions, function objects, otherFunction1s
- change propagated across all
-
functionObjectValue
: set thevalue
according to the result of a function object -
sample
: set thevalue
according to a field value -
limitRange
: renamed toinputValueMapper
and extended to include operations using function object results
Function object updates
-
sampledSets
: extended to store the setmin
,max
andaverage
values in its results dictionary -
reference
: the reference valuerefValue
is now set according to aFunction1
type. To recover the old behaviour (sampling a field value) users can employ the newsample
Function1 type. - registered fields are now prefixed - typically by
<function_object_name>:
- to avoid name collisions on registration, e.g. you can now have multiplefieldAverage
function objects that act on the same field
Test case
-
$FOAM_TUTORIALS/incompressible/simpleFoam/simpleCar
- Sample the pressure field using a
sets
function object; the resultaverage(p)
is created. - The sample
average(p)
value is supplied to avalueAverage
function object to perform time averaging. This creates the resultaverage(p)Mean
. - The
reference
function object'srefValue
makes use of the newfunctionObjectValue
Function1, where the valueaverage(p)Mean
is retrieved from theaverage1
function object to determine the final reference field. - A second
reference
function object to shows how to recover the old function object behaviour.
- Sample the pressure field using a
Risks
Testing required
-
TimeFunction1
has been deprecated -
check that previous behaviours are maintained, e.g. for lagrangian injection models when using
engineTime
Edited by Andrew Heather