Skip to content

New "exprField" function object

Mark OLESEN requested to merge feature-fvExpressionField into develop
  • provides a simple means of defining/modifying fields. For example,
<name1>
{
    type    exprField;
    libs    (fieldFunctionObjects);
    field   pTotal;  //<- output field
 
    expression  "p + 0.5*(rho*magSqr(U))";
    dimensions  [ Pa ];
}
// modify the above

<name1>
{
    type    exprField;
    libs    (fieldFunctionObjects);
    field   pTotal;  //<- input/output field (for modify)
    action  modify;

    // Static pressure only in these regions
    fieldMask
    #{
        (mag(pos()) < 0.05) && (pos().y() > 0)
     || cellZone(inlet)
    #};
    expression  "p";
};

exprFieldFunctionObject

Edited by Mark OLESEN

Merge request reports