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
Function1instances, e.g. boundary conditions, function objects, otherFunction1s
- change propagated across all
-
functionObjectValue: set thevalueaccording to the result of a function object -
sample: set thevalueaccording to a field value -
limitRange: renamed toinputValueMapperand extended to include operations using function object results
Function object updates
-
sampledSets: extended to store the setmin,maxandaveragevalues in its results dictionary -
reference: the reference valuerefValueis now set according to aFunction1type. To recover the old behaviour (sampling a field value) users can employ the newsampleFunction1 type. - registered fields are now prefixed - typically by
<function_object_name>:- to avoid name collisions on registration, e.g. you can now have multiplefieldAveragefunction objects that act on the same field
Test case
-
$FOAM_TUTORIALS/incompressible/simpleFoam/simpleCar- Sample the pressure field using a
setsfunction object; the resultaverage(p)is created. - The sample
average(p)value is supplied to avalueAveragefunction object to perform time averaging. This creates the resultaverage(p)Mean. - The
referencefunction object'srefValuemakes use of the newfunctionObjectValueFunction1, where the valueaverage(p)Meanis retrieved from theaverage1function object to determine the final reference field. - A second
referencefunction object to shows how to recover the old function object behaviour.
- Sample the pressure field using a
Risks
Testing required
-
TimeFunction1has been deprecated -
check that previous behaviours are maintained, e.g. for lagrangian injection models when using
engineTime
Edited by Andrew Heather