openfoam merge requestshttps://develop.openfoam.com/Development/openfoam/-/merge_requests2020-03-13T17:19:15Zhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/343Feature surface handling2020-03-13T17:19:15ZMark OLESENFeature surface handlingAdjust sampling to avoid triangulation.Adjust sampling to avoid triangulation.v2006Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/342ENH: improve analytic eigen for small off-diagonals2020-02-28T10:50:51ZKutalmış BerçinENH: improve analytic eigen for small off-diagonals~~WIP for `Clang9` scratch-compilation.~~
### Summary
The analytic eigendecomposition methods were further improved and tested for **small off-diagonal entries**.
Numerical diagonalisation of 2x2 or 3x3 matrices with analytic me...~~WIP for `Clang9` scratch-compilation.~~
### Summary
The analytic eigendecomposition methods were further improved and tested for **small off-diagonal entries**.
Numerical diagonalisation of 2x2 or 3x3 matrices with analytic methods are, like the methods currently being used in OpenFOAM, inherently error prone. **Despite its speed, the analytic methods may becomes inaccurate or may even fail completely if the matrix entries differ greatly in magnitude, particularly with large off-diagonal elements.**
Accordingly, there will always be a combination of value-set that the considerably improved eigendecomposition suite will fail.
The remedy is to sacrifice the speed by using iterative methods (like LAPACK, GNU-Sci, MATLAB, NumPy etc. etc. no matter what the size of matrix is), or hybrid analytic/iterative methods like the publication below: (Kopp, 2008) arXiv.org: physics/0610206 https://www.mpi-hd.mpg.de/personalhomes/globes/3x3/index.htm
Might to consider to look for funding to incorporate such slow-yet-more-stable methods for small eigendecompositions.
Otherwise, we will need to live with it, I'm afraid, by covering the corner cases as they appear in the course of time.
### Caveats
- Will always be a value-set combination for eigendecompositions will fail
- Single- or mixed-precision computation of eigendecompositions will likely and noisily fail as double-precision computation was the only intention
### Tests
`Clang9` = `PASS`: [log.linux64ClangDPInt32Opt.gz](/uploads/534036a6b4c3ff6697f9c1dc4def9725/log.linux64ClangDPInt32Opt.gz) with HEAD~1 = `a456e9ae92 - (origin/develop, develop)`
`Alltest-TUT` = `PASS`: [testLoopReport.gz](/uploads/4a7f88dc4179df5b57a6e487379a116e/testLoopReport.gz)
The logs of the below were not attached due to their sizes, yet the return log was given.
`Test-SymmTensor` = `PASS`: `#### Passed all 10010170 tests #### `
`Test-SymmTensor2D` = `PASS`: `#### Passed all 1260123 tests ####`
`Test-Tensor` = `PASS`: `#### Passed all 8030254 tests ####`
`Test-Tensor2D` = `PASS`: `#### Passed all 4380204 tests ####`v2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/340ENH: Improve polynomial equations and analytical eigendecompositions2020-02-18T17:31:35ZKutalmış BerçinENH: Improve polynomial equations and analytical eigendecompositions### Summary
Analytical eigendecomposition routines show irregular numerical instabilities particularly for cases wherein off-diagonal elements of a tensor involve noise. The issue revealed to be caused by the polynomialEqn containers,...### Summary
Analytical eigendecomposition routines show irregular numerical instabilities particularly for cases wherein off-diagonal elements of a tensor involve noise. The issue revealed to be caused by the polynomialEqn containers, particularly `cubicEqn`.
In addition, the analytical eigendecomposition routines seem to be mathematically inconsistent since tensors are not allowed to return complex types, which is nevertheless the norm for asymmetric matrices.
Accordingly, this set of commits aims to improve the numerical stability of analytical eigendecompositions, and to provide a group of verification tests to prevent future breaks in the workflow.
[unit-test-notebooks-17-Feb-20.zip](/uploads/bd21eee046e249f3ae4830537472e625/unit-test-notebooks-17-Feb-20.zip)
### Resolved bugs
#1311 #1312 #1527 #1575 #1596
### Risks
Low.
`polynomialEqns` and analytical eigendecomposition routines were considerably isolated from the rest of the code.
@markv2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/337TUT: cleanup compressible tutorials2020-01-29T21:13:55ZKutalmış BerçinTUT: cleanup compressible tutorialsComplete regression: https://ftpbox.esi-group.com/?u=IDXq6Cpj&p=manSCW6c&path=/logs-cleanup-compressible-tuts.tar.gzComplete regression: https://ftpbox.esi-group.com/?u=IDXq6Cpj&p=manSCW6c&path=/logs-cleanup-compressible-tuts.tar.gzv2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/330SUBMODULE: added OpenQBMM submodule - see #15222020-01-25T02:11:02ZAndrew HeatherSUBMODULE: added OpenQBMM submodule - see #1522### Summary
Adds the OpenQBMM library from https://www.openqbmm.org/
OpenQBMM is a suite of solvers to simulate polydisperse multiphase flows using
Quadrature-Based Moment Methods (QBMM).
Main author: Alberto Passalacqua @alber...### Summary
Adds the OpenQBMM library from https://www.openqbmm.org/
OpenQBMM is a suite of solvers to simulate polydisperse multiphase flows using
Quadrature-Based Moment Methods (QBMM).
Main author: Alberto Passalacqua @albertop
### Details of new models (If applicable)
OpenQBMM implements methods to describe polydisperse multiphase flows, from the simplest size evolution of non-inertial particles in a carrier fluid to more complex cases with bubbles in a gas-liquid system and inertial particles in a gas-particle flow. These capabilities are implemented in a suite of solvers, among which:
- `pbeFoam` solves a population balance equation in a single control volume. This solver is useful to test kernel functions in the population balance equation and to solve spatially homogeneous problems. Example cases can be found in OpenQBMM/validation/pbeFoam/ which show the validation cases discussed in E. Madadi-Kandjani, A. Passalacqua, An extended quadrature-based moment method with log-normal kernel density functions, Chemical Engineering Science. 131 (2015) 323–339. https://doi.org/10.1016/j.ces.2015.04.005.
- `pbeTransportFoam` allows a frozen flow field to be used to solve a population balance equation with pre-imposed flow motion. A validation case is available in OpenQBMM/validation/pbeTransportFoam/serraTaylorCouette/ and discussed in A. Passalacqua, F. Laurent, E. Madadi-Kandjani, J.C. Heylmun, R.O. Fox, An open-source quadrature-based population balance solver for OpenFOAM, Chemical Engineering Science. 176 (2018) 306–318. https://doi.org/10.1016/j.ces.2017.10.043.
- `buoyantPbePimpleFoam` allows a transient flow with population balance equation to be modelled.
- `polydisperseBubbleFoam` is a specialized solver for gas-liquid flows with evolution of the bubble size due to coalescence and breakup. Bubbles can have a velocity distribution also accounting for polycelerity, with bubbles with different sizes in the same control volume allowed to have different velocities. Example cases are available in OpenQBMM/validation/polydisperseBubbleFoam/ while the implementation is discussed in the article J.C. Heylmun, B. Kong, A. Passalacqua, R.O. Fox, A quadrature-based moment method for polydisperse bubbly flows, Computer Physics Communications. 244 (2019) 187–204. https://doi.org/10.1016/j.cpc.2019.06.005.
- `denseAGFoam` implements an anisotropic Gaussian model for dense gas-particle flows. Implementation details are discussed in B. Kong, R.O. Fox, A solution algorithm for fluid–particle flows across all flow regimes, Journal of Computational Physics. 344 (2017) 575–594. https://doi.org/10.1016/j.jcp.2017.05.013.
- The solvers in the `velocityDistribitionTransport` implement quadrature-based moment methods for velocity distributions. These methods are suitable to describe disperse flows with non-equilibrium velocity distributions, such as crossing jets of particles or droplets. The `diluteVdfTransportFoam` solver implements the quadrature-based velocity distribution transport algorithm for a disperse phase, not coupled to a carrier fluid. One-way coupling between the disperse phase and the carrier fluid is implemented `oneWayCoupledVdfTransportFoam`. In both solvers, the particle size can evolve in space and time and particles can interact through collisions.
### Risks
Low - added as a submodulev2006Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/329BUG: add switch for nu:DphitEff in kEpsilonPhitF (fixes #1560)2020-01-21T12:28:10ZKutalmış BerçinBUG: add switch for nu:DphitEff in kEpsilonPhitF (fixes #1560)Including `nu` in `DphitEff` even though it is not present in (LUU:Eq. 17)
provided higher level of resemblance to benchmarks for the tests considered,
particularly for the peak skin friction (yet, pressure-related predictions
...Including `nu` in `DphitEff` even though it is not present in (LUU:Eq. 17)
provided higher level of resemblance to benchmarks for the tests considered,
particularly for the peak skin friction (yet, pressure-related predictions
were unaffected). Users can switch off `nu` in `DphitEff` by using
`includeNu` entry in `kEpsilonPhitFCoeffs` in order tofollow the
reference paper thereat. `includeNu` is left `true` by default.
See GitLab issue #1560,
- removes redundant `phit()` and `f()` access funcs,
- replaces `dimensionedScalar` with `dimScalar` to gain space.
LUU: Laurence, D. R., Uribe, J. C., & Utyuzhnikov, S. V. (2005).v2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/328WIP: Revisiting analytical eigen decompositions and polynomialEqns2020-01-17T21:07:33ZKutalmış BerçinWIP: Revisiting analytical eigen decompositions and polynomialEqnsv2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/327ENH: shm: support for automatic faceZones2020-01-16T12:22:03ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comENH: shm: support for automatic faceZones### Summary
Extends meshing of faceZones to allow having multiple faceZones per surface
### Details of new models (If applicable)
Currently a single (explicitly named) faceZone can be specified for a surface. This new function...### Summary
Extends meshing of faceZones to allow having multiple faceZones per surface
### Details of new models (If applicable)
Currently a single (explicitly named) faceZone can be specified for a surface. This new functionality extends it to have a separate faceZone for every region of the surface.
### Risks
The default behaviour has not changed. A new keyword, faceZoneNaming, can switch on the new behaviour. See the new mesh/snappyHexMesh/faceZoneRegions tutorial
v2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/324TUT: misc cleanup in various tutorials2020-01-12T11:10:18ZKutalmış BerçinTUT: misc cleanup in various tutorialsv2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/323WIP: ENH: add 'outputCoeffs' and 'extendedOutput' options to forceCoeffs2020-01-17T21:07:23ZKutalmış BerçinWIP: ENH: add 'outputCoeffs' and 'extendedOutput' options to forceCoeffsENH: add 'extendedOutput' option that allows to output all constitutents
of all force coefficients, i.e. total, pressure, viscous, and porous
ENH: add 'outputCoeffs' option to allow to select coefficients to output
...ENH: add 'extendedOutput' option that allows to output all constitutents
of all force coefficients, i.e. total, pressure, viscous, and porous
ENH: add 'outputCoeffs' option to allow to select coefficients to output
ENH: remove redundant computations for porosity constituent when the option
porosity=false
DOC: improve header file and function declaration docs
BAKW: test backward compatibility and functionality in comparison to
v1906 by using `simpleFoam/motorBike` and `simpleFoam/bump2D`.
Tests have involved:
- Serial runs
- Parallel runs
- Serial restart
- Parallel restart
- Only binData = on (parallel)
- Only writeFields = on (parallel)
- Only extendedOutput = on (parallel)
- binData and extendedOutput = on (parallel)
- writeFields and extendedOutput = on (parallel)
- outputCoeffs and extendedOutput = on for arbitrarily chosen
(Cd CmRoll Cl) (parallel and serial)v2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/319DEFEATURE: deprecate v2f model in favour of kEpsilonPhitF2020-01-03T09:41:19ZKutalmış BerçinDEFEATURE: deprecate v2f model in favour of kEpsilonPhitF- kEpsilonPhitF is a kEpsilon-based model which originated
from (Durbin, 1995)’s v2-f methodology. However, the majority of
v2-f model variants proved to be numerically stiff for segregated
solution algorithms due to the coup...- kEpsilonPhitF is a kEpsilon-based model which originated
from (Durbin, 1995)’s v2-f methodology. However, the majority of
v2-f model variants proved to be numerically stiff for segregated
solution algorithms due to the coupled formulations of v2 and f fields,
particularly on wall boundaries.
The v2-f variant (i.e. OpenFOAM’s v2f model) due to
(Lien and Kalitzin, 2001) reformulated the original v2-f model to enable
segregated computations; however, a number of shortcomings regarding
the model fidelity were reported in the literature.
To overcome the shortcomings of the v2-f methodology, the v2-f approach
was re-evaluated by (Laurence et al., 2005) by transforming v2 scale into
its equivalent non-dimensional form, i.e. phit, to reduce the numerical
stiffness.
This variant, i.e. kEpsilonPhitF, is believed to provide numerical
robustness, and insensitivity to grid anomalies while retaining the
theoretical model fidelity of the original v2-f model.
Accordingly the v2f RANS model is deprecated in favour of the variant
kEpsilonPhitF model.v2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/318ENH: improve BinSum container, and Test-BinSum app2020-01-17T21:07:16ZKutalmış BerçinENH: improve BinSum container, and Test-BinSum app```
BUG: protect against non-scalar or non-sum template specialisations
DOC: improve header/func docs
ENH: test Binsum constructors and member funcs
``````
BUG: protect against non-scalar or non-sum template specialisations
DOC: improve header/func docs
ENH: test Binsum constructors and member funcs
```v2006Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/271lumped point motion using local linear basic functions (#1341)2020-06-17T14:15:52ZMark OLESENlumped point motion using local linear basic functions (#1341)Extends lumped point motion to support multiple connectivity.
Examples include structures such as bridges.Extends lumped point motion to support multiple connectivity.
Examples include structures such as bridges.v2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/317Feature ihc wavemodels2019-12-18T13:59:42ZAndrew HeatherFeature ihc wavemodelsUpdated `waveMaker` boundary conditions for v1912 release - now possible to supply paddle information to generate 3-D waves.
Contribution from @barjasg at IH Cantabria; integration by OpenCFDUpdated `waveMaker` boundary conditions for v1912 release - now possible to supply paddle information to generate 3-D waves.
Contribution from @barjasg at IH Cantabria; integration by OpenCFDv1912Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/316New VOF multiphaseStabilizedTurbulence fvOption2019-12-19T08:46:51ZAndrew HeatherNew VOF multiphaseStabilizedTurbulence fvOption### Summary
Applies corrections to turbulence kinetic energy equation and turbulence viscosity field for incompressible multiphase flow cases.
Turbulence kinetic energy is over-predicted in incompressible VOF solvers at the phase i...### Summary
Applies corrections to turbulence kinetic energy equation and turbulence viscosity field for incompressible multiphase flow cases.
Turbulence kinetic energy is over-predicted in incompressible VOF solvers at the phase interface and throughout the water column in nearly-potential flow regions beneath surface waves.
This fvOption applies corrections based on the references:
Buoyancy source term in turbulence kinetic energy equation:
Devolder, B., Rauwoens, P., and Troch, P. (2017).
Application of a buoyancy-modified k-w SST turbulence model to
simulate wave run-up around a monopile subjected to regular waves
using OpenFOAM.
Coastal Engineering, 125, 81-94.
Correction to turbulence viscosity:
Larsen, B.E. and Fuhrman, D.R. (2018).
On the over-production of turbulence beneath surface waves in
Reynolds-averaged Navier-Stokes models
J. Fluid Mech, 853, 419-460
### Resolved bugs (If applicable)
See #1433
### Details of new models (If applicable)
The implementation is based on the form for the k-epsilon turbulence model.
Example usage:
multiphaseStabilizedTurbulence1
{
type multiphaseStabilizedTurbulence;
active yes;
multiphaseStabilizedTurbulenceCoeffs
{
// Optional coefficients
lambda2 0.1; // A value of 0 sets the nut correction to 0
Cmu 0.09; // from k-epsilon model
C 1.51; // model coefficient from k-omega model
alpha 1.36; // 1/Prt
}
}
The model `C` coefficient for the k-epsilon model equates to C2/C1 = 1.33; the (default) value of 1.51 comes from the k-omega model and is more conservative.
### Risks
Modular - low risk
### Credits
Thanks go to the Turbulence Technical Committee, and the useful discussions with and code testing by Bjarke Eltard-Larsen and David Fuhrman (Technical University of Denmark).v1912https://develop.openfoam.com/Development/openfoam/-/merge_requests/314ENH: Adjoint optimisation fixes2019-12-17T19:57:30ZVaggelis PapoutsisENH: Adjoint optimisation fixesA number of bug fixes and enhancements that didn't find their way to the main adjointOptimisation pushA number of bug fixes and enhancements that didn't find their way to the main adjointOptimisation pushv1912Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/312INT: openfoam.org code integration2019-12-24T07:36:41ZSergio FerrarisINT: openfoam.org code integration1) rPolynomial Eq of State
2) externalForce and softWall in rigidBodyDynamics
INT: Several minor bug fixes1) rPolynomial Eq of State
2) externalForce and softWall in rigidBodyDynamics
INT: Several minor bug fixesv1912Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/306Feature mesh update controls2019-12-12T11:03:03ZAndrew HeatherFeature mesh update controls### Summary
Adds a new update function to `dynamicFvMesh` that enables users to control how often the mesh is updated for moving mesh cases.
### Details of new models (If applicable)
Adds a `timeControl` object to `dynamicFvMesh`, i....### Summary
Adds a new update function to `dynamicFvMesh` that enables users to control how often the mesh is updated for moving mesh cases.
### Details of new models (If applicable)
Adds a `timeControl` object to `dynamicFvMesh`, i.e. the same controls as used by function objects. This requires the top-level solver to call the new
mesh.controlledUpdate();
function instead of
mesh.update();
Currently applied to `pimpleFoam` and `rhoPimpleFoam` only for beta testing, and likely to be rolled out across other solvers in future releases.
Example usage in the `dynamicMeshDict`
updateControl timeStep;
updateInterval 5;
### Risks
Only applied to the solvers mentioned above (for now) - testing has not shown any regressions.v1912Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/304ENH: Added new limitFields function object2019-12-13T20:04:07ZAndrew HeatherENH: Added new limitFields function object@roger @prashant - can you confirm this OK to go in? and any test case/updated tutorial that can be provided?
---
# Details of the new function object:
Limits fields to user-specified min and max bounds
Usage
Example of func...@roger @prashant - can you confirm this OK to go in? and any test case/updated tutorial that can be provided?
---
# Details of the new function object:
Limits fields to user-specified min and max bounds
Usage
Example of function object specification:
limitFields1
{
type limitFields;
libs ("libfieldFunctionObjects.so");
...
fields (U);
limit max;
max 100;
}
Where the entries comprise:
Property | Description | Required | Default value
type | type name: limitFields | yes |
fields | list of fields to process | yes |
limit | bound to limit - see below | yes |
The limit entry can take the value:
- min : specify a minimum value
- max : specify a maximum value
- both : specify a minimum value and a maximum valuev1912Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/303ENH: Added new function object to compute the Proudman acoustic power2019-12-13T20:04:27ZAndrew HeatherENH: Added new function object to compute the Proudman acoustic power@Roger @Prashant - can you confirm this OK to go in? and any test case/updated tutorial that can be provided?
---
# Details of the new function object:
Calculates the acoustic power due to the volume of isotropic turbulence
usi...@Roger @Prashant - can you confirm this OK to go in? and any test case/updated tutorial that can be provided?
---
# Details of the new function object:
Calculates the acoustic power due to the volume of isotropic turbulence
using Proudman's formula
The acoustic power P_A [W/m3] in terms of turbulence k and \epsilon is given as:
P_A = alpha_\epsilon \rho \epsilon M_t^5
where alpha_\epsilon is a constant (0.1) and
M_t = \frac{\sqrt{2 k}}{a_0}
with a_0 the speed of sound. The acoustic power is also output in
dB using:
L_P = 10 \log \frac{P_A}{P_ref}
where P_ref is a constant (1e-12 W/m3)
Usage
Example of function object specification to calculate the Proudman acoustic
power
proudmanAcousticPower1
{
type proudmanAcousticPower;
libs ("libfieldFunctionObjects.so");
...
// Required additional entries for incompressible calculations
rhoInf 1.225;
aRef 340;
}
Where the entries comprise:
Property | Description | Required | Default value
type | type name: proudmanAcousticPower | yes |
rhoInf | Freestream density for incompressible cases | no |
aRef | Reference spped of sound for incompressible cases | no |
alphaEps | Model coefficient | no | 0.1
Note
- The freestream density and reference speed of sound are only necessary
when a thermodynamics package is unavailable, typically for incompressible
cases.v1912Mark OLESENMark OLESEN