openfoam merge requestshttps://develop.openfoam.com/Development/openfoam/-/merge_requests2021-12-15T10:52:37Zhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/472Draft: ENH: relative velocity usage for porosity in MRF regions2021-12-15T10:52:37ZAndrew HeatherDraft: ENH: relative velocity usage for porosity in MRF regionsRelated to #1652 - updates porosity calculation when used with MRF to use relative velocity
Test case from bug report: [rotatingCylinders-test.tgz](/uploads/49641463ba3d523874517a126aa32293/rotatingCylinders-test.tgz)Related to #1652 - updates porosity calculation when used with MRF to use relative velocity
Test case from bug report: [rotatingCylinders-test.tgz](/uploads/49641463ba3d523874517a126aa32293/rotatingCylinders-test.tgz)v2212Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/merge_requests/471ENH: Adding new permeable boundary conditions and a tutorial2021-06-17T21:01:28ZSergio FerrarisENH: Adding new permeable boundary conditions and a tutorial- 4d2e6e63f9b99d97dc83d2ee7b41d0fc47030d88: ENH: Adding new permeable boundary conditions
- `prghPermeableAlphaTotalPressure` for `p_rgh`
- `pressurePermeableAlphaInletOutletVelocity` for `U`
- new helper class for pressure-r...- 4d2e6e63f9b99d97dc83d2ee7b41d0fc47030d88: ENH: Adding new permeable boundary conditions
- `prghPermeableAlphaTotalPressure` for `p_rgh`
- `pressurePermeableAlphaInletOutletVelocity` for `U`
- new helper class for pressure-related BCs: `updateableSnGrad`
- 2a3b41e523cba5490a7cbd408e92a5c964e970a2: TUT: new multiphase tutorial: `damBreakPermeable`v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/470ENH: Added new multiRegion function object2021-06-16T11:48:22ZAndrew HeatherENH: Added new multiRegion function objectWrapper that clones the supplied object for each region.
Simplifies setting up identical post-processing requirements for multi-
region cases. Applies the supplied function to all regions by default.
Example of function object specific...Wrapper that clones the supplied object for each region.
Simplifies setting up identical post-processing requirements for multi-
region cases. Applies the supplied function to all regions by default.
Example of function object specification:
multiRegion
{
type multiRegion;
libs (utilityFunctionObjects);
...
function
{
// Actual object specification
type fieldMinMax;
libs (fieldFunctionObjects);
fields (<field1> .. <fieldN>);
}
// Optional entries
regions (region1 region2);
}
Where the entries comprise:
Property | Description | Required | Default value
type | Type name: multiRegion | yes |
function | Function object sub-dictionary | yes |
regions | List of region names | no | allv2106Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/469ENH: new multiFieldValue function object2021-06-16T10:14:30ZAndrew HeatherENH: new multiFieldValue function objectComputes a selected operation between multiple `fieldValue` function objects.
The operation is applied to all results of each `fieldValue` object.
Note
- Each object must generate the same number and type of results.
Usage
Minima...Computes a selected operation between multiple `fieldValue` function objects.
The operation is applied to all results of each `fieldValue` object.
Note
- Each object must generate the same number and type of results.
Usage
Minimal example by using \c system/controlDict.functions:
multiFieldValue1
{
// Mandatory entries (unmodifiable)
type multiFieldValue;
libs (fieldFunctionObjects);
// Mandatory entries (runtime modifiable)
operation subtract;
// List of fieldValue function objects as dictionaries
functions
{
region1
{
...
}
region2
{
...
}
...
regionN
{
...
}
}
// Optional (inherited) entries
...
}
where the entries mean:
Property | Description | Type | Req'd | Dflt
-------------|-------------------------------------|------|-------|------
type | Type name: `multiFieldValue` | word | yes | -
libs | Library name: `fieldFunctionObjects` | word | yes | -
operation | Operation type to apply to values | word | yes | -
functions | List of `fieldValue` function objects | dict | yes | -
Options for the \c operation entry:
add | add
subtract | subtract
min | minimum
max | maximum
average | average
**Deprecated `fieldValueDelta`**
The `fieldValueDelta` function object was originally written to compute the difference between two fieldValue-type function objects. `The multiFieldValue` object name better describes its purpose whilst being able to operate on an arbitrary number of fieldValue-type objects.v2106Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/468AMI improvements2021-06-18T10:32:20ZAndrew HeatherAMI improvements- Added new faceAreaWeightAMI2D AMIMethod:
- performs intersection using a new 2D triangle class;
- candidate face matches set using an AABBTree method (vs advancing front for
faceAreaWeightAMI).
- Use by setting the AMIMethod...- Added new faceAreaWeightAMI2D AMIMethod:
- performs intersection using a new 2D triangle class;
- candidate face matches set using an AABBTree method (vs advancing front for
faceAreaWeightAMI).
- Use by setting the AMIMethod entry when specifying the AMI in the
constant/polyMesh/boundary file, e.g.
AMI
{
type cyclicACMI;
AMIMethod faceAreaWeightAMI2D; // new method
Cbb 0.1; // optional coefficient
nFaces 1000;
startFace 100000;
matchTolerance 0.0001;
transform noOrdering;
neighbourPatch AMI1;
nonOverlapPatch AMI1_non_overlap;
}
- The optional Cbb coeffcient controls the size of the bounding box used when
looking for candidate pairs; the value of 0.1 is the default and worked well
for a large range of test cases. For badly matched AMI patches this may need
to be increased.
- Deprecated the partialFaceAreaWeightAMI class - primarily used by ACMI:
- functionality now offered by the AMI variants.
- ~~NOTE: both AABBTree and octree variants included for review; ***ONLY 1 METHOD TO BE ADDED***~~
EDIT: octree method remoedv2106Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/467ENH: Added under-relaxation to jump conditions2021-06-14T15:34:44ZAndrew HeatherENH: Added under-relaxation to jump conditionsUpdates to the jump boundary conditions
- provide an optional minimum jump value
```
plane
{
type fan;
patchType cyclic;
jump uniform 0;
value uniform 0;
...Updates to the jump boundary conditions
- provide an optional minimum jump value
```
plane
{
type fan;
patchType cyclic;
jump uniform 0;
value uniform 0;
uniformJump false;
jumpTable ( (1000 0) (-200 1) (20 2) (-0.75 3) );
// Optional minimum jump value
minJump 0;
}
```
- add possibility to under relax the jump value. Currently only applied to the fanFvPatchField where it can be useful for steady, non-uniform jump set-ups to avoid instabilities/checker-boarding, e.g.
```
plane
{
type fan;
patchType cyclic;
jump uniform 0;
value uniform 0;
uniformJump false;
// Optional under-relaxation
relax 0.2;
...
}
```
Current (old) behaviour
![noRelax-minJump-GREAT](/uploads/47d41219028e2705ac296c9a0e3d513d/noRelax-minJump-GREAT.png)
New behaviour with under-relaxation
![relax0dot2-minJump-GREAT](/uploads/ccbf2edf3627bd960dd9bd6419815f5e/relax0dot2-minJump-GREAT.png)v2106Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/merge_requests/466add access to dictionary context for dynamic-coded items.2021-06-07T14:23:47ZMark OLESENadd access to dictionary context for dynamic-coded items.improves flexibilityimproves flexibilityv2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/465TUT: mesh, multiphase: clean up tutorials2021-06-08T20:14:41ZKutalmış BerçinTUT: mesh, multiphase: clean up tutorials[testLoopReport-old.gz](/uploads/9bc2a67785228a2c226abe8ed4ee7d2a/testLoopReport.gz)
[testLoopReport-new.gz](/uploads/2ffc2a3da8fd9778514b490ecc1ab994/testLoopReport.gz)[testLoopReport-old.gz](/uploads/9bc2a67785228a2c226abe8ed4ee7d2a/testLoopReport.gz)
[testLoopReport-new.gz](/uploads/2ffc2a3da8fd9778514b490ecc1ab994/testLoopReport.gz)v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/464TUT: basic, IO, preProcessing, VV: clean up tutorials2021-06-09T13:39:17ZKutalmış BerçinTUT: basic, IO, preProcessing, VV: clean up tutorials[testLoopReport-old.gz](/uploads/26cf0709babf6bd781a818790f16275e/testLoopReport.gz)
[testLoopReport-new.gz](/uploads/f6d5cb4be7291fbae4945c3e38cb0b8d/testLoopReport.gz)[testLoopReport-old.gz](/uploads/26cf0709babf6bd781a818790f16275e/testLoopReport.gz)
[testLoopReport-new.gz](/uploads/f6d5cb4be7291fbae4945c3e38cb0b8d/testLoopReport.gz)v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/463ENH: Adding subMesh option to momentumError and div FOs2021-07-03T19:59:35ZSergio FerrarisENH: Adding subMesh option to momentumError and div FOs- Adding subMesh capabilities to momentumError and div FOs.
- A subMesh is created from cellZones to compute FOs.
- The operators (div, etc) are only calculated in the subMesh.
- Zero field is written in the non-subMesh cells.
- Op...- Adding subMesh capabilities to momentumError and div FOs.
- A subMesh is created from cellZones to compute FOs.
- The operators (div, etc) are only calculated in the subMesh.
- Zero field is written in the non-subMesh cells.
- Optionally, halo cells can be added to the cellZones.
- New helper class to handle the subMesh creation and field mapping.
- TUT: add an example to `tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012`v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/462TUT: incompressible: clean up tutorials2021-06-08T20:17:01ZKutalmış BerçinTUT: incompressible: clean up tutorials[testLoopReport-old.gz](/uploads/fd21c57a06667a0e7b7cc011a7439440/testLoopReport.gz)
[testLoopReport-new.gz](/uploads/6541448fcc63a08614a149ce886731b3/testLoopReport.gz)
Additionally, `Allrun` was executed for both (including the adjoi...[testLoopReport-old.gz](/uploads/fd21c57a06667a0e7b7cc011a7439440/testLoopReport.gz)
[testLoopReport-new.gz](/uploads/6541448fcc63a08614a149ce886731b3/testLoopReport.gz)
Additionally, `Allrun` was executed for both (including the adjoint), resulting in pass.v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/461TUT: combustion: clean up tutorials2021-06-08T20:24:35ZKutalmış BerçinTUT: combustion: clean up tutorials[logs-old.gz](/uploads/513e7e4ff9bed9427dd13afacc98e567/logs.gz)
[testLoopReport-old.gz](/uploads/04bd97a0bbde7f6a999bd870b1a54679/testLoopReport.gz)
[logs-new.gz](/uploads/2343b658ce058efe1e802d0ad3326d9d/logs.gz)
[testLoopReport-new...[logs-old.gz](/uploads/513e7e4ff9bed9427dd13afacc98e567/logs.gz)
[testLoopReport-old.gz](/uploads/04bd97a0bbde7f6a999bd870b1a54679/testLoopReport.gz)
[logs-new.gz](/uploads/2343b658ce058efe1e802d0ad3326d9d/logs.gz)
[testLoopReport-new.gz](/uploads/4f49690308dd869e533dae50a0af2964/testLoopReport.gz)
```
base0 = work
base1 = tutorial-combustion
api = 2103
patch = 210414
HEAD = cf6b675a8b
version = com
compiler = Clang (system)
= clang version 9.0.1
mpi = SYSTEMOPENMPI
= mpirun (Open MPI) 1.10.7.0.5e373bf1fd
OS = Description: openSUSE Leap 15.1
opts = linux64ClangDPInt32Opt
```v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/460ENH: add proximityRegions filter to distanceSurface (#2108)2021-07-05T13:29:15ZMark OLESENENH: add proximityRegions filter to distanceSurface (#2108)- combines region-based and proximity-based filtering
proxityRegions (post-filter):
Checks the resulting faces against the original search surface
as well as checking the cut cells for topological connectivity.
If the area...- combines region-based and proximity-based filtering
proxityRegions (post-filter):
Checks the resulting faces against the original search surface
as well as checking the cut cells for topological connectivity.
If the area-weighted distance for a region is greater than
\c absProximity, the region is discarded.
STYLE: support 'proxityFaces' as synonym for 'proximity' filterAndrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/459TUT: compressible: clean up tutorials2021-05-27T09:00:24ZKutalmış BerçinTUT: compressible: clean up tutorials- elementwise the same:
[logs-old.gz](/uploads/ef3824e69f7dd916a3ed322b0d80b739/logs.gz)
[testLoopReport-old.gz](/uploads/ac9d00a5b8c1780571564b96ceed799d/testLoopReport.gz)
[logs-new.gz](/uploads/a874d039d99ec0f730e1c4a54098356c/logs...- elementwise the same:
[logs-old.gz](/uploads/ef3824e69f7dd916a3ed322b0d80b739/logs.gz)
[testLoopReport-old.gz](/uploads/ac9d00a5b8c1780571564b96ceed799d/testLoopReport.gz)
[logs-new.gz](/uploads/a874d039d99ec0f730e1c4a54098356c/logs.gz)
[testLoopReport-new.gz](/uploads/1e90d330490264b02a7206c2f2857026/testLoopReport.gz)
- the environment of the old setup:
```
base0 = base
base1 = develop
api = 2103
patch = 210414
HEAD = 3273e6c21a
version = com
compiler = Clang (system)
= clang version 9.0.1
mpi = SYSTEMOPENMPI
= mpirun (Open MPI) 1.10.7.0.5e373bf1fd
OS = Description: openSUSE Leap 15.1
opts = linux64ClangDPInt32Opt
```v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/458TUT: heatTransfer: clean up tutorials2021-05-26T11:36:22ZKutalmış BerçinTUT: heatTransfer: clean up tutorials- elementwise the same:
[logs-old.gz](/uploads/fabc366885ebda688028a1bc92bb8e9f/logs.gz)
[testLoopReport-old.gz](/uploads/62469080cea9f65e91ba275a970ed733/testLoopReport.gz)
[logs-new.gz](/uploads/ef7706e0e8477642d874f4bacd5ac091/logs...- elementwise the same:
[logs-old.gz](/uploads/fabc366885ebda688028a1bc92bb8e9f/logs.gz)
[testLoopReport-old.gz](/uploads/62469080cea9f65e91ba275a970ed733/testLoopReport.gz)
[logs-new.gz](/uploads/ef7706e0e8477642d874f4bacd5ac091/logs.gz)
[testLoopReport-new.gz](/uploads/4bafc00041f330ef89341b7a0c1afee4/testLoopReport.gz)
- the environment of the old setup:
```
base0 = base
base1 = develop
api = 2103
patch = 210414
HEAD = 9a3d27e3df
version = com
compiler = Clang (system)
= clang version 9.0.1
mpi = SYSTEMOPENMPI
= mpirun (Open MPI) 1.10.7.0.5e373bf1fd
OS = Description: openSUSE Leap 15.1
opts = linux64ClangDPInt32Opt
```v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/456Support AMI for multi-world operation2021-05-26T08:27:33ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comSupport AMI for multi-world operation### Summary
Multi-world operation now supports AMI (`nearestPatchFaceAMI`)
Fixes #2099### Summary
Multi-world operation now supports AMI (`nearestPatchFaceAMI`)
Fixes #2099v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/455BUG: normalResidual has the potential to contain uninitialized values2021-05-27T09:01:14ZHenning ScheuflerBUG: normalResidual has the potential to contain uninitialized valuesmerge request !436 (fixing issue #2016) introduced a critical bug potentially causing uninitialized values in the calcResidual-functionmerge request !436 (fixing issue #2016) introduced a critical bug potentially causing uninitialized values in the calcResidual-functionAndrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/454ENH: turbulentDFSEMInlet: various improvements2021-06-22T09:18:22ZKutalmış BerçinENH: turbulentDFSEMInlet: various improvements### Summary
- ENH: Input entries of `R`, `L` and `U` are now `PatchFunction1` type.
- ENH: Adds two scalar normalisation factors for input `R`, `L` and `U`: `Uref` and `Lref` (default=1).
- ENH: Adds a scalar factor to enable users to t...### Summary
- ENH: Input entries of `R`, `L` and `U` are now `PatchFunction1` type.
- ENH: Adds two scalar normalisation factors for input `R`, `L` and `U`: `Uref` and `Lref` (default=1).
- ENH: Adds a scalar factor to enable users to tune the C1 normalisation coefficient: `scale` (default=1).
- BUG: MappedFile: separates scopes of entries.
- TUT: Replaces `chan395DFSEM` and `PCF` tutorials with `planeChannel` and `oneCellThickPlaneChannel` tutorials.
- Corrects the integral-length scale input files.
- Updates the [Extended Code Guide's channel flow](https://www.openfoam.com/documentation/guides/latest/doc/verification-validation-turbulent-plane-channel-flow.html) case, and allows users to reproduce the results.
### Resolved bugs (If applicable)
#2098
#2097
#2090
#1004
#1744
#2089
### Details of new models (If applicable)
A set of results obtained from the `planeChannel` tutorial (and its plot script available to users) with a different set of settings can be seen below:
##### Ruv vs y
![Ruv_vs_y](/uploads/0a9a5a8b41f5c19a8ccacc3d1614d554/Ruv_vs_y.png)
##### u vs y
![u_vs_y](/uploads/e43ae1708a96ba6c77955d33e4ebf5ca/u_vs_y.png)
##### Ruu vs y
![Ruu_vs_y](/uploads/d30bcba9424ab2cf2fd63f9ebcb41285/Ruu_vs_y.png)
##### x vs Cf
![x_vs_cf](/uploads/c7f25cfb42129756c84d9a76ce010170/x_vs_cf.png)
##### Rvv vs y
![Rvv_vs_y](/uploads/aa956075682e9331172a0ddbd92ab727/Rvv_vs_y.png)
##### Rww vs y
![Rww_vs_y](/uploads/00cdcd67ba65659f8469c59415a46d23/Rww_vs_y.png)
### Risks
##### User input
Users (my apologies) will have to change the input syntax for `R`, `L` and `U` entries. For example, for reading the input files in `constant/boundaryData/inlet/0/`, users were using the following minimal syntax:
```
inlet
{
type turbulentDFSEMInlet;
delta 1;
mapMethod nearestCell;
value $internalField;
}
```
For the same effect, one of the syntax examples could be as follows:
```
inlet
{
type turbulentDFSEMInlet;
delta 1;
U mappedFile;
R mappedFile;
L mappedFile;
mapMethod nearest;
value $internalField;
}
```
or as follows:
```
inlet
{
type turbulentDFSEMInlet;
delta 1;
U
{
type mappedFile;
mapMethod nearest;
}
R
{
type mappedFile;
mapMethod nearest;
}
L
{
type mappedFile;
mapMethod nearest;
}
value $internalField;
}
```
Users can, however, use any of the `PatchFunction1` input syntax exemplified in this [link](https://www.openfoam.com/news/main-news/openfoam-v1812/core#core-patch-function1) and this [link](https://www.openfoam.com/news/main-news/openfoam-v20-06/pre-processing#pre-processing-expression-patchfunction1).
##### Regressions
- ~~The default value of `nCellPerEddy` entry was changed from 5 to 1, which is the default value corresponding to the original journal paper.~~
- The default value of `nCellPerEddy` entry was kept the same as 5.
##### Remaining issues
- Arguably, the DFSEM method has various theoretical issues that need to be addressed (see #2090). We have been trying to reach the originators of the method during the last couple of years; and we will continue our efforts, if possible, to cooperate with them to resolve some of these issues.v2106Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/453INT: splineEdge: allowing usage in extrudeMesh. See #1983.2021-05-26T12:22:26ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comINT: splineEdge: allowing usage in extrudeMesh. See #1983.Allows use of spline in extrudeMesh extrusion path. See commented
code in tutorials/mesh/extrudeMesh/polyline/blockMeshDict
Contribution by Guanyang XueAllows use of spline in extrudeMesh extrusion path. See commented
code in tutorials/mesh/extrudeMesh/polyline/blockMeshDict
Contribution by Guanyang XueAndrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/452ENH: adjust tokenizing2021-05-19T16:11:52ZMark OLESENENH: adjust tokenizingSergio FerrarisSergio Ferraris