Increase flexibility of weightedFlux interpolation scheme
Functionality to add/problem to solve
The weightedFlux interpolation scheme seems to need a pre-existing field/dictionary file to be able to get a value on the patchNeighbourField()
function. This will appear when decomposing the case, where each processor boundary condition will have a value.
This, however, is limiting the scheme since one needs to have the interpolation variable in a file and the interpolation field might have a dependency on another variable (temperature, time, etc...).
It would be beneficial to be able to do this with a volScalarField
inside the code.
Proposal
This scheme needs to obtain the value at the cell centre from a neighbour cell in another processor. This would make it suitable for having the interpolation variable with some dependency.
I have attached a test case showing that if no file exists, the patchNeighbourField()
has a value of 0. And a possible fix.
The fix, however, does not seem very elegant. It is using the syncTools
function swapBoundaryCellList
which will "return" a field of the size of "nBoundaryFaces" which has substantial more information than needed.
Links / references
Some references showing the interpolation of pressure with density:
https://onlinelibrary.wiley.com/doi/epdf/10.1002/fld.4055
https://www.sciencedirect.com/science/article/pii/S0141118706000812