openfoam merge requestshttps://develop.openfoam.com/Development/openfoam/-/merge_requests2022-12-08T11:14:33Zhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/576ENH: Added new parallelFvGeometryScheme2022-12-08T11:14:33ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comENH: Added new parallelFvGeometryScheme# OpenFOAM parallel-consistent geometry calculation
This release adds a new `parallel` geometry calculation method. It is used as a wrapper around other geometry calculation methods:
```
geometry
{
type parallel;
// Op...# OpenFOAM parallel-consistent geometry calculation
This release adds a new `parallel` geometry calculation method. It is used as a wrapper around other geometry calculation methods:
```
geometry
{
type parallel;
// Optional underlying geometry calculation. Default is 'basic'.
geometry
{
type highAspectRatio;
}
}
```
It
- applies owner side face geometry (centre, normal (negated)) to the other side
- recalculates cell-based geometry of affected cells
It is mainly interesting in single-precision in that it removes the
different truncation error from circulating in different direction. This
can cause problems when calculating global transformations e.g.
```
--> FOAM FATAL ERROR: (openfoam-2206)
bad size -653174757
From void Foam::List<T>::doResize(Foam::label) [with T = Foam::vectorTensorTransform; Foam::label = int]
in file lnInclude/List.C at line 84.
#0 Foam::error::printStack(Foam::Ostream&)
#1 Foam::error::simpleExit(int, bool) at ??:?
#2 Foam::error::exiting(int, bool)
#3 Foam::List<Foam::vectorTensorTransform>::doResize(int)
#4 Foam::globalIndexAndTransform::determineTransformPermutations() at ??:?
```
Note that it does not change the point positions so any other calculated geometry (e.g. cell-closedness) might be affected.
Tutorial:
Source code:
- src/finiteVolume/fvMesh/fvGeometryScheme/parallelAndrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/582Cleaner separation global/local/self communication, cleaner responsibility fo...2022-12-05T19:08:24ZMark OLESENCleaner separation global/local/self communication, cleaner responsibility for fileHandler ownershipv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/580ENH: Brun dripping film injection2022-12-01T13:58:35ZKutalmış BerçinENH: Brun dripping film injectionEP2009
Test case: [dripping-test.zip](/uploads/972e684819c0a3b9b833e0d68e1d7560/dripping-test.zip)
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorEP2009
Test case: [dripping-test.zip](/uploads/972e684819c0a3b9b833e0d68e1d7560/dripping-test.zip)
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/581ENH: KinematicSurfaceFilm: add option to specify interacting parcel types2022-12-01T12:52:07ZKutalmış BerçinENH: KinematicSurfaceFilm: add option to specify interacting parcel typesEP2019
Test case: [kinematicParcelFoam-splashPanelFilm.zip](/uploads/430a45abf4d47c4bd01b11b43197822f/kinematicParcelFoam-splashPanelFilm.zip)
This changeset adds a new entry 'parcelTypes' which can specify the list of
parcel type IDs ...EP2019
Test case: [kinematicParcelFoam-splashPanelFilm.zip](/uploads/430a45abf4d47c4bd01b11b43197822f/kinematicParcelFoam-splashPanelFilm.zip)
This changeset adds a new entry 'parcelTypes' which can specify the list of
parcel type IDs interacting with a surface film. If the entry
is omitted, all particle types are considered.
```
surfaceFilmModel kinematicSurfaceFilm;
kinematicSurfaceFilmCoeffs
{
interactionType absorb;
// Optional list of participating parcel IDs
parcelTypes (10);
}
```
To set the parcel type by injector, 'injectorID' entry can be used
when specifying the injector models, e.g.
```
injectionModels
{
model1
{
type <injectionModelType>;
// Optional injector ID
// - if ommitted, parcels use '-1'
injectorID 10;
...
}
}
```
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/575ENH: leastSquaresEdgeInterpolation: new edge interpolation method2022-12-01T12:24:45ZKutalmış BerçinENH: leastSquaresEdgeInterpolation: new edge interpolation methodDocumentation: [MR575-edgeInterpolation-scheme-23-Nov-22.pdf](/uploads/70de4f1a6735f8bf16fb630a5c158e18/MR-edgeInterpolation-scheme-23-Nov-22.pdf)
Test case: [MR575-edgeInterpolation-scheme-23-Nov-22.zip](/uploads/324646ab02997f421292bc...Documentation: [MR575-edgeInterpolation-scheme-23-Nov-22.pdf](/uploads/70de4f1a6735f8bf16fb630a5c158e18/MR-edgeInterpolation-scheme-23-Nov-22.pdf)
Test case: [MR575-edgeInterpolation-scheme-23-Nov-22.zip](/uploads/324646ab02997f421292bceda13cd9e8/finiteArea.zip)
##### Metadata
EP#1996
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/574ENH: inv: fall back to pseudo-inverse for singular tensors2022-12-01T12:09:07ZKutalmış BerçinENH: inv: fall back to pseudo-inverse for singular tensorsDocumentation: [MR574-pseudo-inverse-23-Nov-22.pdf](/uploads/bff6ab3706726d703da2d48ec449ff5e/Pseudo-inverse-23-Nov-22.pdf)
Test case: [MR574-pseudo-inverse-23-Nov-22-cube.zip](/uploads/a4f55cc2891d31510e39cb0cd27f1510/MR574-pseudo-inve...Documentation: [MR574-pseudo-inverse-23-Nov-22.pdf](/uploads/bff6ab3706726d703da2d48ec449ff5e/Pseudo-inverse-23-Nov-22.pdf)
Test case: [MR574-pseudo-inverse-23-Nov-22-cube.zip](/uploads/a4f55cc2891d31510e39cb0cd27f1510/MR574-pseudo-inverse-cube.zip)
##### Metadata
EP#1996
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/579ENH: solidIsothermalReactionRate: new solid reaction rate model2022-11-29T14:31:17ZKutalmış BerçinENH: solidIsothermalReactionRate: new solid reaction rate modelEP2005, EP1629
##### Usage example
In `combustion/fireFoam/LES/simplePMMApanel/constant/panelRegion/reactions`:
```
reactions
{
_tmp_
{
#include "<constant>/panelRegion/thermo.solid"
}
charReaction
{
...EP2005, EP1629
##### Usage example
In `combustion/fireFoam/LES/simplePMMApanel/constant/panelRegion/reactions`:
```
reactions
{
_tmp_
{
#include "<constant>/panelRegion/thermo.solid"
}
charReaction
{
type irreversibleIsothermalSolidReaction;
reaction "PMMA = gas";
C <scalar>;
Tpc <scalar>;
Elat <scalar>;
Cp ${../_tmp_/PMMA/thermodynamics/Cp};
}
#remove _tmp_
}
```
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorMark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/569ENH: resolutionIndex: new function object to evaluate LES/DES resolution2022-11-24T10:16:58ZKutalmış BerçinENH: resolutionIndex: new function object to evaluate LES/DES resolution#### Acknowledgement
OpenCFD would like to acknowledge and thank **[Prof. Ismail Celik](https://directory.statler.wvu.edu/faculty-staff-directory/ismail-celik)** for his contributions, elaborate suggestions and help, and critical recomm...#### Acknowledgement
OpenCFD would like to acknowledge and thank **[Prof. Ismail Celik](https://directory.statler.wvu.edu/faculty-staff-directory/ismail-celik)** for his contributions, elaborate suggestions and help, and critical recommendations. Highly appreciated.
#### Problem statement
Grid independency studies and grid
adaptation for implicit LES/DES are nontrivial
and intractable due to the inherent coupling
between spatial resolution and subgrid-scale
modelling.
#### Problem solution
- In the literature, various metrics which do not
use any experimental or DNS data and which
is based on a single mesh were introduced.
- To enable assessments for LES/DES
resolution, a single-mesh resolution index
with three submodels is introduced:
- Pope (2000)'s index using turbulent kinetic
energy variables,
- Celik et al. (2005) and Celik et al. (2009)'s
index using
- Effective Kolmogorov length scale, and
- Effective viscosity.
#### Theory
<img src="/uploads/ad75d2ce147e118b0d200a05b7ad4744/Screenshot_from_2022-11-15_15-16-45.png" width="50%" height="50%">
<img src="/uploads/9669fbd2183fd483fc759fec5abfa443/Screenshot_from_2022-11-15_15-17-35.png" width="50%" height="50%">
<img src="/uploads/d98e042f34c73f8908cbf4a477174f46/Screenshot_from_2022-11-15_15-17-42.png" width="50%" height="50%">
#### Usage
<img src="/uploads/78433a8ae1a87f96c21ecfb341fb22ea/Screenshot_from_2022-11-15_15-17-50.png" width="50%" height="50%">
<img src="/uploads/0ca3187362cd7ab19aa28cfa9537d47c/Screenshot_from_2022-11-15_15-17-58.png" width="50%" height="50%">
<img src="/uploads/bc3db2cd28f3421b59d0cccc09328870/Screenshot_from_2022-11-15_15-18-06.png" width="50%" height="50%">
<img src="/uploads/9531120c8da53982b8be355003dfb596/Screenshot_from_2022-11-15_15-18-14.png" width="50%" height="50%">
#### Tests
[resolutionIndex-tests.zip](/uploads/889447b92fa794ac6482894b63e40b6d/resolutionIndex-tests.zip)
#### Results
![Screenshot_from_2022-11-15_15-22-13](/uploads/397de8e179ac7d423aec04436fea533f/Screenshot_from_2022-11-15_15-22-13.png)
![Screenshot_from_2022-11-15_15-22-22](/uploads/2cbd8f4146a4af6a822612af3aa23353/Screenshot_from_2022-11-15_15-22-22.png)
![Screenshot_from_2022-11-15_15-22-29](/uploads/ba00ded6583dd4bb9cdb6340a50f7d75/Screenshot_from_2022-11-15_15-22-29.png)
![Screenshot_from_2022-11-15_15-22-39](/uploads/b2b5bfd848dcd71a221540aa32e5cc65/Screenshot_from_2022-11-15_15-22-39.png)
#### Discussion
- Resolution-index models need good
estimators for the subgrid-scale turbulent
kinetic energy (ksgs) field.
- The DES models of `SpalartAllmaras` seem to
produce zero-valued ksgs fields – Bug ticket
is issued: [GL2620](https://develop.openfoam.com/Development/openfoam/-/issues/2620)
- DES models may need a chain of
operations – see 'system/{controlDict,FOresolutionIndex}' in
DES cases in order to mask out the RANS regions.
#### References
- Pope, S. B. (2000). Turbulent flows. Cambridge, UK: Cambridge Univ. Press
- Celik, I. B., Cehreli Z. N., Yavuz I. (2005). Index of resolution quality for large
eddy simulations. Journal of Fluids Engineering. 127:949–958.
- Celik, I., Klein, M., & Janicka, J. (2009). Assessment measures for engineering LES applications.
Journal of fluids engineering, 131(3)
#### Metadata
EP#1997
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/561ENH: faceZoneReferenceTemperature: new heatTransferCoeff model2022-11-21T15:59:47ZKutalmış BerçinENH: faceZoneReferenceTemperature: new heatTransferCoeff modelEP1947 - see `faceZoneReferenceTemperature.H` for model usage.EP1947 - see `faceZoneReferenceTemperature.H` for model usage.v2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/572BUG: avoid excessive recalculation of map for moving meshes2022-11-21T13:21:58ZAndrew HeatherBUG: avoid excessive recalculation of map for moving meshesCross ref EP#2016Cross ref EP#2016v2212Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/570Updates for ensight writing2022-11-15T17:02:06ZMark OLESENUpdates for ensight writingKutalmış BerçinKutalmış Berçinhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/563ENH: functionObjects: refactor and extend histogram2022-11-14T17:34:56ZKutalmış BerçinENH: functionObjects: refactor and extend histogram- new submodels:
- 'equalBinWidth': groups data into bins of equal widths (previous behaviour)
- 'unequalBinWidth': groups data into bins of unequal widths
- output files per time-step are replaced with a single output file
- silen...- new submodels:
- 'equalBinWidth': groups data into bins of equal widths (previous behaviour)
- 'unequalBinWidth': groups data into bins of unequal widths
- output files per time-step are replaced with a single output file
- silently deprecates the input entries: 'setFormat' and 'formatOptions'
#### Meta-data
* EP1969
* [x] `linux64ClangDPInt32Opt` (clang11)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new error/No change in existing outputv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/555overset modifications: allow overset pacthes overlap, allow fringe faces walk...2022-11-14T15:49:00ZSergio Ferrarisoverset modifications: allow overset pacthes overlap, allow fringe faces walk, mass conservation update### Summary
This merge addresses three main topics:
1) Allow overset patches displace outside the background domain.
2) Allow fringe faces away from the HOLE cells in the background domain
3) Some option to improve mass conservation in...### Summary
This merge addresses three main topics:
1) Allow overset patches displace outside the background domain.
2) Allow fringe faces away from the HOLE cells in the background domain
3) Some option to improve mass conservation in overset
1) overset patches can displace outside the domain. The problem of selecting the correct donors was addressed creating a new type of cell type named "POROUS". In these cells, DONORS can't be selected as they lay close to the end of the background domain. Any attempt to find a suitable donor proved to be unstable. Therefore these cells are not interpolated but let connected withing its mesh and solved locally. As these cells are normally close to wall without a proper BC applied , if left unweighted they lead to divergency, to avoid this a small damping effect is introduce using fvOption. Tests showed that damping U is robust enough to keep U-p stable.
Tutorials:
/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/
/tutorials/incompressible/overPimpleDyMFoam/rotatingSquare/
The fvOption is as:
limitU
{
type velocityDampingConstraint;
active true;
selectionMode cellType;
UMax 0;
C 1;
}
A constant C of '1' seems to be working generally. Of course , the solution on this cell is not accurate as an artificial porous cell is being introduced, on the other hand, cells next to wall will damp U anyway by shear stress.
NOTE: This feature was tested for inverseDistance, trackingInverseDistance, volumeWeight cell stencils. This approach does not support the overlapping of two inset meshes on top of the background mesh.
2) Allow fringe faces away from the HOLE cells in the background domain
In the overset approach is advantageous if the interpolated cells are far removed from areas were the flow experiences large gradients. Specially next to HOLES cells created by the inset mesh on the background mesh. Initially, the INTERPOLATED cells where located next to the
HOLES cells. This created a extra burden to the solver to solve for continuity which resulted in pressure peaks.
As a result we developed a way to make a 'walk' away from the HOLE cells into the bulk of the domain in order to interpolate smoother fields.
To use a different layers for the interpolated cells In the fvSchemes is specified:
oversetInterpolation
{
method inverseDistance;
searchBox (0 0 0)(0.1 0.1 0.1);
searchBoxDivisions (130 130 1);
holeLayers 4;
useLayer 2;
}
`holeLayers` specifies how many layer out of the HOLE cells will be walked. The code will report an average ratio of the volume on each mesh, ideally one. In the obove set up the walk will be done for 4 layers and layer 2 will be used.
Tutorial :
tutorials/incompressible/overPimpleDyMFoam/simpleRotor/
tutorials/multiphase/overInterDyMFoam/floatingBody/
tutorials/multiphase/overInterDyMFoam/rigidBodyHull/
The following is a typical improvement expected on residuals for p:
![pResNoLayers](/uploads/185098ed4e69c09aa6b78271076be9ff/pResNoLayers.png)
![pRes4Layers](/uploads/7f22e45f76cc5010463f8e781bef0606/pRes4Layers.png)
NOTE: This feature was tested for inverseDistance, trackingInverseDistance, volumeWeight cell stencils
This feature was not extensibly tested to work with 1) (overlapping patches). So, the walks to find the layers could need to be reviewed.
3) Some options to improve mass conservation in overset
The overset solvers were updated to make them more consistent. Experimental keyword were removed. i.e:
massFluxInterpolation
ddtCorr
correctPhi
The new option `oversetAdjustPhi` adds a flux correction outside the pressure Eq. This flag adjusts the flux in and out of the fringes faces in the inner loop of PIMPLE.
This feature is still experimental as the outcome of this approach is still under investigation.
It proved to work in some cases. The flag is specified in the fvSolution:
tutorials/multiphase/overInterDyMFoam/simpleRotor/
PIMPLE
{
momentumPredictor no;
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
oversetAdjustPhi true;
}
the mass conservation with and without oversetAdjustPhi for the above tutorial case:
![NonOuterMassCorr](/uploads/635ecca36e8ce847314f9dda3ea6974b/NonOuterMassCorr.png)
![outerMassCorr](/uploads/3929f131a440f7f1e0403eec8665a9e4/outerMassCorr.png)
The other option for mass conservation is the implicit correction specified on the field patch as:
free
{
type overset;
massCorrection true;
value uniform 300;
}
The overset patch was made an lduInterface in order to have a hook inside the linear solver to add a sum(phi) = 0 on fringe faces. It is important to note that this restriction is added in a Amul function and in the linear solvers the actual variable being converged is to the field itself but a pre-condition variable, only the first residuals are calculated using p and its flux. Therefore, the application of this restriction have some theoretical gaps. Nonetheless, the flux balance on these faces out of the linear solver DO satisfy sum(phi) = 0.
See example for overLaplacian
tutorials/basic/overLaplacianDyMFoam/1DheatTransferMassConservation/
Switching oh/off the massCorrection flag results in a better flux across the overset patch.
This approach wasn't very successful when applied to overInterFoam cases and more study might be needed, even when the sum(phi) does go to zero, the overall conservation is not fully conserved.
NOTE: It was observed that using interpolated cells as donors is possible as far as the relative number is not too large. By default `allowInterpolatedDonors` is true. But under some circumstance the user might prefer not to use them.v2212Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/566More consistent use of combineReduce, simpler and/or reductions2022-11-08T16:48:23ZMark OLESENMore consistent use of combineReduce, simpler and/or reductions- update code base to reflect the consolidated list/map reductions
- replace old code use of `returnReduce(list.size(), sumOp<label>())` in favour of `returnReduceOr(list.size())` which is cleaner to write/understand and also marginally...- update code base to reflect the consolidated list/map reductions
- replace old code use of `returnReduce(list.size(), sumOp<label>())` in favour of `returnReduceOr(list.size())` which is cleaner to write/understand and also marginally more efficient
General overview under
https://develop.openfoam.com/Development/openfoam/-/wikis/coding/patterns/parallel
- [broadcast](https://develop.openfoam.com/Development/openfoam/-/wikis/coding/patterns/parallel#broadcast)
- [reductions](https://develop.openfoam.com/Development/openfoam/-/wikis/coding/patterns/parallel#plain-reductions)
- [more reductions](https://develop.openfoam.com/Development/openfoam/-/wikis/coding/patterns/parallel#other-reductions)v2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/567ENH: ensightToFoam: Ensight Gold mesh converter2022-11-07T21:26:38ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comENH: ensightToFoam: Ensight Gold mesh converter# Ensight format mesh reading
This release adds an Ensight Gold mesh importer is supported. It can handle all cell shapes supported by the `foamToEnsight` converter. It currently gets given the geometry file name (geo`extension`). It su...# Ensight format mesh reading
This release adds an Ensight Gold mesh importer is supported. It can handle all cell shapes supported by the `foamToEnsight` converter. It currently gets given the geometry file name (geo`extension`). It supports both ascii and binary formats.
Supported keywords:
- `extents`
- `node id 'given', 'ignore', 'assign'`
- `node_ids`
- `element id 'given', 'ignore', 'assign'`
- `element_ids`
- `part`
- `coordinates`
- `tetra4`
- `pyramid5`
- `penta6`
- `hexa8`
- `nfaced`
- `tria3`
- `quad4`
- `nsided`
It does not support
- 2D (finite-area) meshes
- `block` structured meshes
- quadratic elements (e.g. `twenty node hexahedron`)
- faceZones
- baffles (they probably get merged away unless they are in the first part - not tested)
It reads all parts, combines all the cells (`tetra3`, `hexa8` etc) and determines the outside faces. It merges all the points using a geometric test (see below) and uses all faces (`tria3` etc.) to patch any outside faces. Patch names are the original part names with any illegal word symbol replaced by '_'. Any remaining outside faces get added to a `defaultFaces` patch of type `empty`.
## Options
- `mergeTol` : supply optional merge tolerance to get the correspondence between points of different parts. Default is 1e-10 of the bounding box of all points. Specifying 0 disables any point merging (and hence patching).
- `scale` : specify optional scaling for the coordinates. Default is no scaling. Scaling can e.g. be used if the mesh is specified in [mm] instead of [m].
- `keepHandedness` : by default the mesh reader will flip (non-polyhedral) cells with negative volume. It will display warning messages of the form
```
zero or negative pyramid volume:
```
Use the flag to disable this check and use the normal vertex numbering.
Source code
- application/utilities/mesh/conversion/ensightToFoamMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/560Integration of grey area turbulence models from Upstream CFD2022-11-07T11:33:34ZAndrew HeatherIntegration of grey area turbulence models from Upstream CFD## Summary
- Refactoring of Spalart-Allmaras (SA) models
- New class hierarchy to reduce code duplication
- Trip term (ft2) now on a user switch
- Was previously active, now deactivated by default
- Enhancements to DES models...## Summary
- Refactoring of Spalart-Allmaras (SA) models
- New class hierarchy to reduce code duplication
- Trip term (ft2) now on a user switch
- Was previously active, now deactivated by default
- Enhancements to DES models to include grey area model effects in collaboration with @MarianFuchs, Upstream CFD GmbH
- sigma extension for SA and k-omega DES, DDES models
- New LES delta functions
- `DeltaOmegaTilde`
- `SLADelta`
- New sigma LES model
- Extended `turbulenceFields` function object
- Added writing of DES shielding function (fd) and LES region indicator fields
- Added warnings for DES model usage; DDES forms should be employed instead
## Details of new models (If applicable)
### Grey area turbulence
The new sigma treatment is available for the models:
- `SpalartAllmarasDES`, `SpalartAllmarasDDES`, `SpalartAllmarasIDDES`
- `kOmegaSSTDES`, `kOmegaSSTDDES`, `kOmegaSSTIDDES`
and activated via the `useSigma` switch, e.g.
```
simulationType LES;
LES
{
LESModel SpalartAllmarasDDES;
SpalartAllmarasDDESCoeffs
{
useSigma true; // <-- new entry
}
//delta SLADelta; // DeltaOmegaTilde;
delta DeltaOmegaTilde;
DeltaOmegaTildeCoeffs
{}
...
}
```
Test case: [wallMountedHump.tgz](/uploads/cea302870310f2b2bf17dc81ff1fbcae/wallMountedHump.tgz) provided by @MarianFuchs
References:
- Mockett, C. et al. (2015). Two Non-zonal Approaches to Accelerate RANS to LES Transition of Free Shear Layers in DES. In: Girimaji, S., Haase, W., Peng, SH., Schwamborn, D. (eds) Progress in Hybrid RANS-LES Modelling. Notes on Numerical Fluid Mechanics and Multidisciplinary Design, vol 130. Springer, Cham. https://doi.org/10.1007/978-3-319-15141-0_15
- Fuchs, M. et al. (2016). Further Assessment of the Grey-Area Enhanced σ-DES Approach for Complex Flows. ERCOFTAC Bulletin 108
- Fuchs, M. et al. (2015). Assessment of novel DES approach with enhanced SGS modelling for prediction of separated flow over a delta wing. AIAA 2015-3433. https://doi.org/10.2514/6.2015-3433
### Extended turbulenceFields function object
The `turbulenceFields` function object now included writing for:
- `fd` : DES shielding function
- `LESRegion` : LES indicator field
An example usage has been added to the `$FOAM_TUTORIALS/incompressible/pimpleFoam/LES/vortexShed` case:
```
functions
{
turbulenceFields1
{
type turbulenceFields;
libs (fieldFunctionObjects);
writeControl writeTime;
fields (fd LESRegion);
}
...
```
### Risks
- Possible regressions in SA models following code refactoringv2212Kutalmış BerçinKutalmış Berçinhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/565Feature master coarsest multi masters2022-10-20T09:14:25ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comFeature master coarsest multi masters# Processor agglomeration in the GAMG linear solver
The current `GAMG` linear solver supports processor agglomeration on the coarsest level using the `masterCoarsest` processor agglomerator method. This removes communication, increases ...# Processor agglomeration in the GAMG linear solver
The current `GAMG` linear solver supports processor agglomeration on the coarsest level using the `masterCoarsest` processor agglomerator method. This removes communication, increases implicitness but increases the size of the coarsest level and at some core count will not be beneficial.
## Extend `masterCoarsest` for multiple master processors
A test was done varying the number of master processors - in below table it starts at a single master (responsible for 1728 processors) and increases the number of masters to 48 (each responsible for 36 processors).
| Coarsest level procs | run1 (s) | run2 (s) |
|-----------------------:|---------:|---------:|
| 1 (1728) | 193 | 219 |
| 2 (864) | 141 | 156 |
| 4 (432) | 167 | 126 |
| 8 (216) | 135 | 114 |
| 16 (108) | 140 | 126 |
| 48 (36) | 247 | -- |
Especially run2 shows a benefit of using more than one master processor. Other testing on a different cluster has shown no benefit of master-coarsest on one or more than one master processor - it all depends on cost of local computation versus communication/explicitness.
Above testing was done using complicated dictionary scripting to manually agglomerate processors. In this version this has been integrated into the `masterCoarsest` processor agglomeration using the new `nMasters` or `nProcssorsPerMaster` keyword:
```
{
solver GAMG;
..
processorAgglomerator masterCoarsest;
nCellsInCoarsestLevel 1;
nMasters 2;
}
```
With debug switches in the system/controlDict
```
DebugSwitches
{
// Print number of processors per master
masterCoarsest 1;
// Print agglomeration
GAMGAgglomeration 1;
}
```
we can see the effect of using processor agglomeration on a simple case decomposed onto 17 processors:
```
masterCoarsest : agglomerating
master procs
0 9 (1 2 3 4 5 6 7 8)
9 8 (10 11 12 13 14 15 16)
GAMGAgglomeration:
local agglomerator : faceAreaPair
processor agglomerator : masterCoarsest
nCells nFaces/nCells nInterfaces nIntFaces/nCells profile
Level nProcs avg max avg max avg max avg max avg
----- ------ --- --- --- --- --- --- --- --- ---
0 17 719 725 1.922 1.926 3.529 5 0.1093 0.1335 1.797e+04
1 17 359 362 1.966 2.109 3.529 5 0.1864 0.2632 7291
2 17 176 181 2.352 2.769 3.529 5 0.272 0.436 2810
3 17 86 90 2.344 2.593 3.529 5 0.4415 0.7738 930.4
4 17 42 44 2.291 2.442 3.529 5 0.6747 1.22 320.9
5 17 20 22 2.094 2.286 3.529 5 0.967 1.895 98.41
6 17 9 11 1.741 2 3.529 5 1.35 2.444 29
7 17 4 5 1.149 1.6 3.529 5 2.082 3.5 6
8 2 15 18 1.585 1.615 1 1 0.5962 0.6923 40
9 2 8 9 1.417 1.5 1 1 0.7083 0.75 15
```
Tutorials:
- compressible/rhoSimpleFoam/squareBendLiq (use of `masterCoarsest`)
Source code
- src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.CMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/562ENH: noiseModels - replaced graph usage by writeFile2022-10-04T13:50:34ZAndrew HeatherENH: noiseModels - replaced graph usage by writeFileHeader information now includes, e.g.
f [Hz] vs P(f) [Pa]
Lower frequency: 2.500000e+01
Upper frequency: 5.000000e+03
Window model: Hanning
Window number: 2
Window samples: 512
Window overlap %: 5.000000e+01
...Header information now includes, e.g.
f [Hz] vs P(f) [Pa]
Lower frequency: 2.500000e+01
Upper frequency: 5.000000e+03
Window model: Hanning
Window number: 2
Window samples: 512
Window overlap %: 5.000000e+01
dBRef : 2.000000e-05
Area average: false
Area sum : 6.475194e-04
Number of faces: 473
Note: output files now have `.dat` extension
Testing: check output from
`$FOAM_TUTORIALS/incompressible/pimpleFoam/LES/vortexShed`v2212Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/559ENH: sorptionWallFunction: new wall boundary condition2022-09-07T13:58:40ZKutalmış BerçinENH: sorptionWallFunction: new wall boundary condition**Summary**
- Implementation of a sorption wall-function boundary condition for an arbitrary operand scalar in line with:
- [Foat et al. (2022). Predicting vapour transport from semi-volatile organic compounds concealed within permea...**Summary**
- Implementation of a sorption wall-function boundary condition for an arbitrary operand scalar in line with:
- [Foat et al. (2022). Predicting vapour transport from semi-volatile organic compounds concealed within permeable packaging.](https://doi.org/10.1016/j.ijheatmasstransfer.2021.122012)
- [Foat (2021). Modelling vapour transport in indoor environments for improved detection of explosives using dogs.](https://eprints.soton.ac.uk/456709/)
- New condition: `sorptionWallFunction`
- The `sorptionWallFunction` is a wall boundary condition to specify scalar/concentration gradient for turbulent and laminar flows.
- Blending options:
- Stepwise (discontinuous) (Foat (2021) - (Eq. 5.3))
- Exponential (smooth) (Foat et al. (2022) - (Eqs. 1-6))
- Binomial (smooth)
- Tanh (smooth)
- Max (discontinuous)
**Theory**
<img src="/uploads/4c0398ea8f0fab2d22f2394c3eb39c98/Screenshot_from_2022-08-19_11-46-39.png" width="75%" height="75%">
### Meta-data
* [x] `linux64ClangDPInt32Opt` (clang11)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorAndrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/557ENH: fvOptions: refactor and extend effectivenessHeatExchangerSource2022-09-07T13:55:04ZKutalmış BerçinENH: fvOptions: refactor and extend effectivenessHeatExchangerSource#### Summary
- rename effectivenessHeatExchangerSource -> heatExchangerSource
- introduce submodels:
- effectivenessTable (previous behaviour)
- referenceTemperature
- the referenceTemperature submodel uses a reference temperature
...#### Summary
- rename effectivenessHeatExchangerSource -> heatExchangerSource
- introduce submodels:
- effectivenessTable (previous behaviour)
- referenceTemperature
- the referenceTemperature submodel uses a reference temperature
which is either a scalar or calculated from a 2D interpolation
table in order to calculate the heat exchange.
- the following figure shows the verification level of
the comparisons between the original and refactored `referenceTemperature`
modules in terms of average temperature.
<img src="/uploads/40d9aad34807cfb724ecc81442327e5b/image.png" width="50%" height="50%">
#### Metadata
- EP1903
- diligently reviewed and tested by @Tobi (thanks Tobi)
- see `v2212/01-heatExchangerSource` for a test caseAndrew HeatherAndrew Heather