CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Orientation of faceZone, mass flow sign convention (https://www.cfd-online.com/Forums/openfoam-pre-processing/173800-orientation-facezone-mass-flow-sign-convention.html)

Awak June 27, 2016 23:53

Orientation of faceZone, mass flow sign convention
 
2 Attachment(s)
Hi,

I am going to ask a question which is going to seem very basic, but you will understand my doubt when I explain.

I am modelling two tanks with 1.0 atm / 0.2 atm connected to each other by a reed valve. I want to measure the mass flow pouring from the high pressure tank to the low pressure tank. For this I use rhoCentralFoam (OF3.0+).

I defined my mesh using blockMesh and SNM, and a faceZone that I use for mass flow estimation. The "faceSet" picture shows the aspect of the faceZone. I checked visually that this face does not have any defects, like unwanted faces. Here is how I defined this face.

Quote:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}

// * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * //

actions
(
// Creation of faceSet

{
name inletFaceSet;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (0.010 -0.010 0.00099) (0.1 0.010 0.00101);
}
}

// Creation of faceZone from previous faceSet
{
name inletFace;
type faceZoneSet;
action new;
source setAndNormalToFaceZone;
sourceInfo
{
faceSet inletFaceSet;
normal (0 0 1);
}
}

);


// ************************************************** **************** //
I did not detect any anomaly in the pressure or velocity fields during the simuation, especially regarding the direction of velocity.

HOWEVER...

For some reason, when I gradually refine my mesh to check for mass flow convergence, the outputed mass flow's sign, especially the stationary value, is changing sign! It does not make sense to me, because I don't see any such "change" in the velocity and pressure fields. The "velocityAtFace" picture shows the global trend for the velocity field (face is coloured with pressure, arrows according to velocity). This trend is the same for any other refinement level.

My face is defined with a normal (0 0 1). According to the initial pressure difference existing between the tanks, I am expecting a velocity in -Z direction, so a negative mass flow through my face? In that case, I would like to understand why I have positive mass flow values for lower refinement levels and negative values for higher refinement, even if the velocity field appears not to be altered.

My case is available temporarily at: https://drive.google.com/file/d/0B0k...ew?usp=sharing

If you want to see for yourself, just change the refinement levels of regions from 5 to 2 or 0.

Any help would be greatly appreciated, thanks to you all,

Florian

Awak June 28, 2016 09:40

EDIT: Found something rather strange
 
3 Attachment(s)
EDIT:

I cut a 2D slice at the location of the faceSet used for mass flow calculation, and plotted the velocity glyph. The velocity field looks perfectly fine:

Attachment 48703

Looking from above to this slice, the velocity field looks like this:

Attachment 48704

Now here comes the funny stuff... I put "valueOutput true;" to export the mass flow field in a VTK file at was looks to be steady state judging from the velocity field, and here is what mass flow distribution looks like on my faceZone:

Attachment 48705

This is rather confusing... I checked my faceZone before running the solver, so I really don't see what I am doing wrong. Could I have your lights please? :D

Awak August 1, 2016 21:28

Solved by constraining the cells by means of an AMI... Hope this will be useful to some of you.

Florian


All times are GMT -4. The time now is 11:24.