CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Flux not conserved in cyclicAMI interfaces if areas are different

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jherb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2019, 09:07
Default Flux not conserved in cyclicAMI interfaces if areas are different
  #1
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
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
in cyclicAMIFvPatchField.C?
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
jherb is offline   Reply With Quote

Old   January 23, 2019, 10:22
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
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
Ramzy1990 likes this.
jherb is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 09:52.