Flux not conserved in cyclicAMI interfaces if areas are different
Hello,
currently, a cyclicAMI interface between two patches does not conserve the (mass/volumentric) flux, if the patches have different areas. The velocities are transferred from one side/patch of the interface to the other. In constant/polyMesh/boundary, the definition of such an interface looks like Code:
one_side_of_interface and in the velocity boundary conditions, e.g. 0/U Code:
one_side_of_interface So let's say, one side of the interface uses tetrahedrons and the other hexahedrons and the areas of the two sides differ by 5 %, the velocity will be the same on both sides, but the mass flux (or for incompressible solvers the volumetric flux) will also differ by 5 %. Now I would like to understand, how cyclicAMI is working in this case at the moment: Is it correct, that the values of the two sides of the interfaces are exchanged in methods Code:
void Foam::cyclicAMIFvPatchField<Type>::updateInterfaceMatrix https://github.com/OpenFOAM/OpenFOAM...FvPatchField.C Is this the actual code, where the values are transferred from one side to the other? Code:
forAll(faceCells, elemI) So in coeffs, the weights between faces of the patch of one side and the faces on the patch of the other side are stored? If you would like to create a new boundary condition to conserve the fluxes, in a first step, I would modify these weights with the ration of the areas of the two patches? Where are the weights calculated? In void Foam::cyclicAMIFvPatch::makeWeights(scalarField& w)? https://github.com/OpenFOAM/OpenFOAM...IFvPatch.C#L79 So there different weights for the two patches? If this would be the correct place to add a area ratio, there would also one area ratio for one patch and the inverse for the other side? Thank you for any help? Joachim |
Answering myself: My temporary fix was to rescale the faces at the interface to match the area on both sides. This post is really helpful for reading OpenFOAM mesh files into Python: https://codereview.stackexchange.com/a/101298
|
All times are GMT -4. The time now is 15:32. |