CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   (interfoam) shear stress at water air interface ! (http://www.cfd-online.com/Forums/openfoam/74742-interfoam-shear-stress-water-air-interface.html)

openfoam1 April 7, 2010 14:58

(interfoam) shear stress at water air interface !
 
hi guys

I'm using interfoam solver for my 2D multiphase problem (water - air)

My goal on my simulation is to calculate the shear stress on the water-air interface

Because alpha_1 is not a discreet variable (range from 1 for water to 0 for air) so i can't really define the interface

Can any one have experience in this matter tell me how to calculate the shear stress on the interface using some utility in openfoam or even share an effective idea..

thank you very much ..

best regards..

sega April 7, 2010 15:03

I think in gerneral the interface is defined as \alpha_1 = 0.5.
May this be a good asumption in your case?

openfoam1 April 7, 2010 15:48

Quote:

Originally Posted by sega (Post 253632)
I think in gerneral the interface is defined as \alpha_1 = 0.5.
May this be a good asumption in your case?

thank you for your fast reply

yes i know that is very good ,, but do you know a way to automatically calculate shear stress using a utility in openfoam or in paraview

i think if i didn't find any of those ,, the standard way is to calculate the velocity gradient in the cells of alpha1=0.5 ,, then i must get the gradient in the direction of the interface ( because the shear force must be tangent to the interface ),, which is a very complicated issue (i must also know the direction of the interface at every cell )

best regards

sega April 8, 2010 13:31

Quote:

Originally Posted by openfoam1 (Post 253642)
thank you for your fast reply

yes i know that is very good ,, but do you know a way to automatically calculate shear stress using a utility in openfoam or in paraview

i think if i didn't find any of those ,, the standard way is to calculate the velocity gradient in the cells of alpha1=0.5 ,, then i must get the gradient in the direction of the interface ( because the shear force must be tangent to the interface ),, which is a very complicated issue (i must also know the direction of the interface at every cell )

best regards

Oh, I'm not aware if such a tool exists. I'm afraid you wil have to write it yourself.

But - good for you - the normal vector of the interface (its direction) is already used in interFoam to calculate the force due to surface tension and will point into the direction of the gradient of \alpha_1!

\vec{n}_i^0 = \frac{\nabla \alpha_1}{|\nabla \alpha_1|}

So concider this part solved. The rest should be up to you.
Get back to us!

pbohorquez April 8, 2010 16:10

Quote:

Originally Posted by openfoam1 (Post 253631)
hi guys

I'm using interfoam solver for my 2D multiphase problem (water - air)

My goal on my simulation is to calculate the shear stress on the water-air interface

Because alpha_1 is not a discreet variable (range from 1 for water to 0 for air) so i can't really define the interface

Can any one have experience in this matter tell me how to calculate the shear stress on the interface using some utility in openfoam or even share an effective idea..

thank you very much ..

best regards..

It is quite elegant to add a function to the interfaceProperties in order to do so automatically during the numerical simulation. There you could gain access to the interface curvature and to the velocity field.

Application
interfaceProperties

Description
Properties to aid interFoam :
1. Correct the gamma boundary condition for dynamic contact angle.
2. Calculate interface curvature.
3. Calculate the shear stress.

openfoam1 April 10, 2010 10:46

Quote:

Originally Posted by sega (Post 253826)
Oh, I'm not aware if such a tool exists. I'm afraid you wil have to write it yourself.

But - good for you - the normal vector of the interface (its direction) is already used in interFoam to calculate the force due to surface tension and will point into the direction of the gradient of \alpha_1!

\vec{n}_i^0 = \frac{\nabla \alpha_1}{|\nabla \alpha_1|}

So concider this part solved. The rest should be up to you.
Get back to us!

Hi sega

do you know how can i get the velocity gradient in the output data of my final time like U , p , and alpha1

thank you

sega April 10, 2010 11:28

Quote:

Originally Posted by openfoam1 (Post 254087)
Hi sega

do you know how can i get the velocity gradient in the output data of my final time like U , p , and alpha1

thank you

If you have luck, you can create a velocity gradient field with foamCalc.
But from the information at slice 34 I'm not so sure anymore.

Otherwise you will have to do it yourself.
You can create the explicit gradient from the finite volume calculus class:

Code:

fvc::grad(U)
Have a look at the Programmers Guide (Page 37)!

openfoam1 April 11, 2010 02:20

Quote:

Originally Posted by sega (Post 254088)
If you have luck, you can create a velocity gradient field with foamCalc.
But from the information at slice 34 I'm not so sure anymore.

Otherwise you will have to do it yourself.
You can create the explicit gradient from the finite volume calculus class:

Code:

fvc::grad(U)
Have a look at the Programmers Guide (Page 37)!

unfortunately foamCalc only have gradient magnitude magGrad , but i want the gradient itself

if i know that this member functin grad(U) for fvc class is used to get the gradient of the velocity , how can i use it to get the gradient of the last time of the simulation

I'mvery sorry cause I'm quite new to C++ programming

best regards

sega April 11, 2010 05:15

Quote:

Originally Posted by openfoam1 (Post 254132)
unfortunately foamCalc only have gradient magnitude magGrad , but i want the gradient itself

if i know that this member functin grad(U) for fvc class is used to get the gradient of the velocity , how can i use it to get the gradient of the last time of the simulation

I'mvery sorry cause I'm quite new to C++ programming

best regards

You will have to loop though all the timesteps which have been written to the folders. So you will be able to get the gradient for each timestep.

I suggest you have a look into the code of the foamCalc function which caluclates magGrad or magU. I suppose it will do the same loop.

idefix January 13, 2014 12:25

Hello,

I know this thread is a little bit old but nevertheless I hope someone could help me:
I also want to calculate the interfacial shear stress. Did anyone find a good way to calculate it?

Thanks a lot.

shikamaru July 16, 2014 12:31

I am working on the same problem and almost done with the equations to be calculated. I got a lot of help from this post. I will suggest anyone working on this problem reads this post first.

http://www.cfd-online.com/Forums/ope...bend-pipe.html

I understand all the formulations given in that post. I am working with two incompressible immiscible fluids (VOF formulation) with interFoam solver. The only question I have is regarding the stress tensor that should be used for the calculation of traction. Should the viscous stress tensor be used for calculating the Traction vector? This is what I would do if I was doing solids

\tau_{ij}=\mu (\frac{\partial u_i}{\partial x_j}+\frac{\partial u_j}{\partial x_i})

or, The total stress tensor including the pressure term should be used?

\sigma_{ij}=-p\delta_{ij}+\mu (\frac{\partial u_i}{\partial x_j}+\frac{\partial u_j}{\partial x_i})

idefix October 27, 2014 04:59

Hello shikamaru,
are you still interested in this topic?

I would use the first equation you wrote in the last post for i is not equal to j.

Did you calculate the shear stress on the wall or at the interface?

See you
idefix


All times are GMT -4. The time now is 02:18.