Merge branch 'feature-expressions' into 'develop'
Feature expressions ### Summary This branch represents an implementation of what is considered to be the most useful aspects of swak4Foam ([Swiss-Army-Knife for FOAM](https://openfoamwiki.net/index.php/Contrib/swak4Foam)) from Bernhard Gschaider, namely the ability to use text-based expressions instead of coding in C++ for the following cases: - expression-based boundary conditions (also known as _groovy_ boundary conditions) - expression-based setFields (also known as _funky_ set fields) The idea of what we currently term *expressions* was pioneered by (Bernhard Gschaider) and is now firmly established in `swak4Foam`. Among other things, expressions attempt to bridge the gap between using standard, predefined boundary conditions and writing dedicated, special-purpose ones. Although part of this gap is now covered within OpenFOAM by using dynamically compiled user coding (eg, coded boundary conditions), there remains substantial areas where it can be significantly more convenient to have a series of predefined functions and expression sytax with some access to base OpenFOAM field functionality that enables rapid deployment of boundary conditions, or custom-defined `setFields` without writing code. A significant portion of `swak4Foam` expressions has been adapted for direct integration into OpenFOAM. During the integration and rewrite, we have tried to pare things down to a smaller subset with the aim of covering 90% or more of the common cases. The remaining cases are left to be reassessed for extending the *expressions* functionality in the future, but they also may be better served with other approaches (eg, with coded conditions) that were not available when `swak4Foam` was originally conceived. To the greatest extent possible, the integrated *expressions* have been designed to avoid name clashes with `swak` so it should remain possible to use the most recent versions of `swak` without problem. ### Risks - New functionality, so low chance of regression. - The scope of the functionality will be revised in the future ### Naming (for `swak4Foam` users) The following are the *expressions* correspondences to `swak`: - The `exprFixedValue` and `exprGradient` boundary conditions are roughly equivalent to the _groovy_ boundary conditions. - The utilities `setExprFields` and `setExprBoundaryFields` are roughly equivalent to the _funky_ utilities of similar name. The naming of the boundary conditions and utilities not only reflects the slightly different input requirements, but simultaneously seeks to avoid any potential name-clash with `swak4Foam` in a mixed environment. The names for the boundary condition dictionary entries tend be shorter and slightly different (eg, `valueExpr` vs `valueExpression`) to serve as a small reminder that the *expressions* syntax is slightly different than the *groovy* equivalents. It also allows the user to fashion dictionary entries that are sufficient for **both** boundary condition variants and quickly toggle between them simply by changing the boundary condition `type`. See merge request !300
Showing
- applications/utilities/preProcessing/setExprBoundaryFields/Make/files 3 additions, 0 deletions.../utilities/preProcessing/setExprBoundaryFields/Make/files
- applications/utilities/preProcessing/setExprBoundaryFields/Make/options 8 additions, 0 deletions...tilities/preProcessing/setExprBoundaryFields/Make/options
- applications/utilities/preProcessing/setExprBoundaryFields/setExprBoundaryFields.C 262 additions, 0 deletions...eProcessing/setExprBoundaryFields/setExprBoundaryFields.C
- applications/utilities/preProcessing/setExprBoundaryFields/setExprBoundaryFieldsDict 34 additions, 0 deletions...rocessing/setExprBoundaryFields/setExprBoundaryFieldsDict
- applications/utilities/preProcessing/setExprFields/Make/files 3 additions, 0 deletions...ications/utilities/preProcessing/setExprFields/Make/files
- applications/utilities/preProcessing/setExprFields/Make/options 8 additions, 0 deletions...ations/utilities/preProcessing/setExprFields/Make/options
- applications/utilities/preProcessing/setExprFields/setExprFields.C 915 additions, 0 deletions...ons/utilities/preProcessing/setExprFields/setExprFields.C
- applications/utilities/preProcessing/setExprFields/setExprFieldsDict 52 additions, 0 deletions...s/utilities/preProcessing/setExprFields/setExprFieldsDict
- src/finiteVolume/Make/files 29 additions, 0 deletionssrc/finiteVolume/Make/files
- src/finiteVolume/expressions/base/exprDriverWriter.C 100 additions, 0 deletionssrc/finiteVolume/expressions/base/exprDriverWriter.C
- src/finiteVolume/expressions/base/exprDriverWriter.H 109 additions, 0 deletionssrc/finiteVolume/expressions/base/exprDriverWriter.H
- src/finiteVolume/expressions/base/fvExprDriver.C 765 additions, 0 deletionssrc/finiteVolume/expressions/base/fvExprDriver.C
- src/finiteVolume/expressions/base/fvExprDriver.H 646 additions, 0 deletionssrc/finiteVolume/expressions/base/fvExprDriver.H
- src/finiteVolume/expressions/base/fvExprDriverFields.C 49 additions, 0 deletionssrc/finiteVolume/expressions/base/fvExprDriverFields.C
- src/finiteVolume/expressions/base/fvExprDriverI.H 179 additions, 0 deletionssrc/finiteVolume/expressions/base/fvExprDriverI.H
- src/finiteVolume/expressions/base/fvExprDriverIO.C 280 additions, 0 deletionssrc/finiteVolume/expressions/base/fvExprDriverIO.C
- src/finiteVolume/expressions/base/fvExprDriverNew.C 105 additions, 0 deletionssrc/finiteVolume/expressions/base/fvExprDriverNew.C
- src/finiteVolume/expressions/base/fvExprDriverTemplates.C 626 additions, 0 deletionssrc/finiteVolume/expressions/base/fvExprDriverTemplates.C
- src/finiteVolume/expressions/fields/base/patchExprFieldBase.C 186 additions, 0 deletions...finiteVolume/expressions/fields/base/patchExprFieldBase.C
- src/finiteVolume/expressions/fields/base/patchExprFieldBase.H 131 additions, 0 deletions...finiteVolume/expressions/fields/base/patchExprFieldBase.H
Please register or sign in to comment