CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   properties of the interfaceProperties class (https://www.cfd-online.com/Forums/openfoam-programming-development/72833-properties-interfaceproperties-class.html)

romant February 19, 2010 04:54

properties of the interfaceProperties class
 
Hej;

I have questions about the interfaceProperties class. What does
Code:

nHatf_
really present? It says something about a flux?

Also:

in the function calculateK()

in the first two lines
Code:

00101    const fvMesh& mesh = alpha1_.mesh();
00102    const surfaceVectorField& Sf = mesh.Sf();

some kind of mesh is created from alpha1, if I understand this correctly. What does this mesh represent? And is it possible to read do something like

Code:

surfaceScalarField& alphaAreas = mesh.magSf() ;
to retrieve some kind of area from the mesh, and if it is an area, is it the area of the alpha1 boundary within a cell?

If this does not work, is it possible to get the interface area between the two phases somehow else?

Thanks in advance!

kathrin_kissling February 19, 2010 06:18

Hi romant,

nHatf_ is the normal vector on the interface. Important is: it is stored as a surfaceScalarField. This means, the values are defined at the face centres.
The f indizes this.
The _ means, it is a private variable.

mesh: mesh represents the mesh. The class behind is fvMesh meaning finite volume mesh. alpha_.mesh() gives you the mesh structure liing behind the alpha_ volScalarField. Now you can access different mesh properties like the volume of your cell, the cellCentres...

mesh.Sf() now gives you the the face area vectors of each controll volume face. It is defined as surfaceVectorField

mesh.magSf() will give you the magnitude of those area vectors (of the controll volume faces) which corresponds to the area of those faces.

If I understand you correctly, you want to calculate the area of the interface in that cell. But im afraid you won't get it that way.

If you have further questions, please feel free...

Best

Kathrin

romant February 19, 2010 06:23

nHatf_ cannot be the normal, because it is a scalar, the calculation is
Code:

nHatf_ = nHatfv & Sf;
where you take the inner product of vector, resulting in a scalar (as also the variable type of nHatf_ represents surfaceScalarField), I think nHatfv is the normal vector, but it cannot be easily accessed.

chiven February 19, 2010 06:46

Hi, romant,
I find it is said that "The interface.nHatf() represents a cell face unit interface normal flux." in the thread:
http://www.cfd-online.com/Forums/ope...of-method.html

chiven

romant February 19, 2010 06:53

Hej,

I have read the same that it is some kind of flux (it actually says that in the source file as well), but the problem is, I don't completely understand the physical meaning of this flux. In my opinion flux should be some kind of per area per time, but there is not time involved here. So it might just be per area. Now comes the question, what area. From the calculations it should gives the magnitude of the normal vector of the cell faces onto the normal vector of the interface.

What is the physical meaning behind this?

kathrin_kissling February 19, 2010 08:20

Sorry,

I was one step behind.
Do you want to acces nHatfv?


The flux: Maybe it ist just a kind of projecting it into the right direction?

Best

Kathrin

romant February 19, 2010 08:24

Nope, I don't want access to nHatfv otherwise I could just rewrite that part of the class.

I am trying to find a way to predict the interface area within the cell, therefore I am looking at almost everything that OpenFOAM can give me and try to make sense of it.

hojjat.m June 23, 2015 14:57

Hello Foamers;
I know this post is relatively old, but I had a question about the interface:
I am using interFoam, and I was wondering if there is anyway that we can access to the normal vector at the interface. I mean I want to have the normal vector in my results. Any feedback is appreciated :)

romant June 24, 2015 03:22

Quote:

Originally Posted by hojjat.m (Post 551810)
Hello Foamers;
I know this post is relatively old, but I had a question about the interface:
I am using interFoam, and I was wondering if there is anyway that we can access to the normal vector at the interface. I mean I want to have the normal vector in my results. Any feedback is appreciated :)

I think it could be harder to achieve, since we don't have a sharp interface as in some other multiphase methods. The interface is smeared out over multiple cells.

To my knowledge there is no direct way of obtaining it from OpenFOAM. One thing you could do is get familiar with the VOF method from literature and see if somebody describes a method to obtain the normal vector of the interface. If you then implement this, post it here :D

block February 20, 2016 20:31

Hi all,

I want to edit the interfaceProperties.H file so i can make surface tension an function of temperature or anything really so it is dependent on something instead of just one value in interfoam.

anyone has any clue on how to go about this or any example i can look at to learn from.

Any help will be much appreciated.

Kind Regards

Rimsha


All times are GMT -4. The time now is 17:05.