|
[Sponsors] |
Flux not conserved in cyclicAMI interfaces if areas are different |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 18, 2019, 09:07 |
Flux not conserved in cyclicAMI interfaces if areas are different
|
#1 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
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 { type cyclicAMI; inGroups 1(cyclicAMI); matchTolerance 0.0001; transform noOrdering; neighbourPatch other_side_of_interface; nFaces 4949; startFace 12612869; } other_side_of_interface { type cyclicAMI; inGroups 1(cyclicAMI); matchTolerance 0.0001; transform noOrdering; neighbourPatch one_side_of_interface; nFaces 4949; startFace 12612869; } and in the velocity boundary conditions, e.g. 0/U Code:
one_side_of_interface { type cyclicAMI; value uniform (0 0 0); } other_side_of_interface { type cyclicAMI; value uniform (0 0 0); } 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) { result[faceCells[elemI]] -= coeffs[elemI]*pnf[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 |
|
January 23, 2019, 10:22 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
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
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting started with CyclicAMI | Algebraist | OpenFOAM | 4 | February 11, 2019 01:39 |
How to check common areas at interfaces in ANSYS | venugopals | ANSYS Meshing & Geometry | 0 | April 5, 2010 01:42 |
flux through individual cells / face areas | Mike | FLUENT | 2 | February 16, 2009 10:43 |
use of face areas in flux function | Andrew Garrard | FLUENT | 1 | February 1, 2005 13:46 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 20:09 |