ENH: additional uniform boundary conditions (#2703)

- provide uniformMixed conditions for finite-area and finite-volume.

  These are intended to replace the exprMixed condition but allow
  the full range of different PatchFunction1 and Function1 types.

- add uniformFixedGradient to finite-area for completeness.

Note:
   - still some possible difficulties with the order of evaluation.
   - eg, using an expression within the 'U' field that depends
     of the surface 'phi' field before that is constructed.
     In this case, the 'value' entry is really needed.
This commit is contained in:
Mark Olesen
2023-02-16 17:09:17 +01:00
parent 3d091a0d6a
commit e8bcf4cb1b
21 changed files with 1589 additions and 38 deletions

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -35,9 +35,19 @@ boundaryField
outlet2
{
type inletOutlet;
inletValue uniform (0 0 0);
// A do-it-yourself inletOutlet (for demonstration purposes)
// Need 'value' entry to avoid evaluation (with phi) on startup
type uniformMixed;
value uniform (0 0 0);
uniformValue zero;
uniformGradient zero;
uniformValueFraction
{
type expression;
expression "neg(phi)";
}
}
defaultFaces