openfoam merge requestshttps://develop.openfoam.com/Development/openfoam/-/merge_requests2021-08-04T09:15:33Zhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/478ENH: linear solvers: add variable-specific debug flags2021-08-04T09:15:33ZKutalmış BerçinENH: linear solvers: add variable-specific debug flags### Summary
* a762a311 - ENH: linear solvers: add variable-specific debug flags <Kutalmis Bercin>
* 390e7b0a - TUT: rotatingFanInRoom: perturb locationInMesh (fixes #2162) <Matej Forman>
* 7d7e012e - ENH: KirchhoffShell: simplification...### Summary
* a762a311 - ENH: linear solvers: add variable-specific debug flags <Kutalmis Bercin>
* 390e7b0a - TUT: rotatingFanInRoom: perturb locationInMesh (fixes #2162) <Matej Forman>
* 7d7e012e - ENH: KirchhoffShell: simplification of log output <Kutalmis Bercin>
Introduces a new optional keyword of label type 'log'
to linear-solver dictionaries to enable variable-specific
debug statements. For example, in fvOptions file:
solvers
{
p
{
solver GAMG;
...
log 2;
}
U
{
...
log 0;
}
}
The meanings of values of 'log' are:
log 0; <!-- no output
log 1; <!-- standard output
log 2; <!-- debug output
// values higher than 2 are expected to have no effect
### Resolved bugs (If applicable)
#2162
EP#1615 @Chiara
### Risks
This keyword does not directly affect the operations of various `DebugSwitches` and
backward compatibility has been ensured in exchange of code cleanness. The related `DebugSwitches` are:
DebugSwitches
{
SolverPerformance 0;
GAMG 0;
PCG 0;
PBiCG 0;
smoothSolver 0;
}
### Test cases
[4-ep-1615-solver-verbosity](https://tinyurl.com/4wrp4hj4)v2112Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/477Implicit treatment of coupled boundary conditions2021-08-03T20:08:53ZSergio FerrarisImplicit treatment of coupled boundary conditions## Summary
The alternative addressing insert new internal faces on selected coupled patches. Extending the matrix addressing allows the implicit treatment of some boundary conditions. At the moment, the BCs which can be made implicit ar...## Summary
The alternative addressing insert new internal faces on selected coupled patches. Extending the matrix addressing allows the implicit treatment of some boundary conditions. At the moment, the BCs which can be made implicit are: cyclic, AMI, ACMI and mapped.
The entry `useImplicit true` is needed in the field BC. Only scalar fields can be made implicit (p, p_rgh, k, epsilon, etc). The U field **cannot** be implicit.
The top solvers are unchanged except for the cht solvers where a single he matrix is built for the multi-region case.
In the case that more than one patch is present, the user can choose which ones are treated implicitly, i.e **p** can be implicit in AMI1 and explicit in AMI2 and **k** the other way around.
Currently, there exists a limitation for parallel cases where AMI patch-pairs need to be on the same processor. For cyclics and mapped patches, the number of faces on each processor **MUST** be the same. Therefore a constraint decomposition needs to be used.
## Details of new models
The model adds a new numbering of internal/boundary coefficients and patch ID's. This is constructed at the call of the matrix.solve() - it is reset to the original addressing after solving.
The original internal/boundary coeffs are cached and used (in some cases with some extra information) to fill the coefficients on the new internal faces and/or source term on the newly formed fvMatrix.
## Tutorials
- tutorials/heatTransfer/chtMultiRegionSimpleFoam/cpuCabinet/
- tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeaterImplicit/
- tutorials/basic/laplacianFoam/implicitAMI/
- tutorials/basic/simpleFoam/implicitAMI
- tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/
## Risks
Addressing of cells on the patches are changed, this needs to be passed to all the lduInterfaces. Use alternative lduAddressing in lduMatrix.
The coupled BCs (cyclics, AMI, mapped) which made implicit don't exist at the moment of solving the matrix. Thus, any fvOption or FO referring to this BC will **Fail**
In general terms when using the implicit approach the lduaddressing changes and therefore any matrix solve will be affected in _all top level solvers and all the linear solvers_.v2112Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/merge_requests/476ENH: turbulenceFields: various improvements2021-08-04T11:37:18ZKutalmış BerçinENH: turbulenceFields: various improvements- 55f61a0037 - ENH: turbulenceFields: enable custom prefix for output fields
- 8f16527a51 - BUG: turbulenceFields: unset duplicate already-registered fields
- 86f753b7bc - DOC: turbulenceFields: improve header documentation
- 189053421c...- 55f61a0037 - ENH: turbulenceFields: enable custom prefix for output fields
- 8f16527a51 - BUG: turbulenceFields: unset duplicate already-registered fields
- 86f753b7bc - DOC: turbulenceFields: improve header documentation
- 189053421c - STYLE: turbulenceFields: apply more recent OpenFOAM-coding practices
- 4243291c52 - BUG: turbulenceFields: use omega funcs of turbulence models (fixes #2132)
#### Resolved bugs
#2132
#### Test cases
[steadyBoundaryLayer](https://tinyurl.com/5fbtx82v)v2112Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/475finiteArea: new models and solvers for films2021-07-16T16:39:50ZSergio FerrarisfiniteArea: new models and solvers for films- Adding `kinematicParcelFoam` solver:
- The original `thermoSurfaceFilm` sub-models were divided between `kinematicSurfaceFilm` and `thermoSurfaceFilm` in order to use the `surfaceFilm` model in a `kinematicCloud`.
- The film in...- Adding `kinematicParcelFoam` solver:
- The original `thermoSurfaceFilm` sub-models were divided between `kinematicSurfaceFilm` and `thermoSurfaceFilm` in order to use the `surfaceFilm` model in a `kinematicCloud`.
- The film interaction models are now in a `kinematicSurface` class which can be used in a kinematic cloud adding constant thermal properties (`p` and `T`) for some sub-models, e.g. `drySplashInteraction`, `wetSplashInteraction` etc.
- `pRef` and `Tref` were added to the `kinematicSurfaceFilm` as entry to the `regionFilm` when used with a kinematic cloud.
- In the finite area surface film model `Tref`, `pRef` are stored in `filmSubModel`.
- Film models:
- Only laminar turbulence is available for wall friction and gas shear stress. Wall friction models:
- quadraticProfile,
- linearProfile,
- DarcyWeisbach,
- ManningStrickle
- gas friction models: `Cf *(Ufilm - Ufluid)`. This would need to be improved using turbulent shear stress from the flow.
- `curvatureSepration` injection model from the film to Lagrangian particles
- minimum (`fThreshold`) force and minimum curvature (`minInvR1`) for separation were added to have more control on determining the points of film separation.
- To force wall-like BC from the fluid side the option `zeroWallVelocity true;`. Allows the film to be seen as zero U BC by the flow.
- forces: The only available extra forces (apart from gravity) is contact angle force: `perturbedTemperatureDependentContactAngle`v2112Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/merge_requests/474Hot fixes for v21062021-06-25T08:09:56ZAndrew HeatherHot fixes for v2106Corrected fan BC construction from dict - see #2138
- propagated valueRequired through constructor args to avoid multiple/incorrect constructor initialisations as lower levels are constructed
Added backwards compatibility for deprecated...Corrected fan BC construction from dict - see #2138
- propagated valueRequired through constructor args to avoid multiple/incorrect constructor initialisations as lower levels are constructed
Added backwards compatibility for deprecated `partialFaceAreaWeightAMI` class
- functionality now available using `faceAreaWeightAMI`
- added alias to AMI run-time selection tablev2106Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/473TUT: multiphase: replace boatAndPropeller with rigidBodyHull2021-06-22T22:42:07ZKutalmış BerçinTUT: multiphase: replace boatAndPropeller with rigidBodyHull`Alltest` & `Allrun` good.`Alltest` & `Allrun` good.v2106Sergio 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 Heather