# (interfoam) shear stress at water air interface !

 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 7, 2010, 14:58 (interfoam) shear stress at water air interface ! #1 Member   Join Date: Dec 2009 Posts: 46 Rep Power: 15 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.. Last edited by openfoam1; April 7, 2010 at 15:35.

 April 7, 2010, 15:03 #2 Senior Member     Sebastian Gatzka Join Date: Mar 2009 Location: Frankfurt, Germany Posts: 729 Rep Power: 19 I think in gerneral the interface is defined as . May this be a good asumption in your case? __________________ Schrödingers wife: "What did you do to the cat? It's half dead!"

April 7, 2010, 15:48
#3
Member

Join Date: Dec 2009
Posts: 46
Rep Power: 15
Quote:
 Originally Posted by sega I think in gerneral the interface is defined as . May this be a good asumption in your case?

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

April 8, 2010, 13:31
#4
Senior Member

Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 19
Quote:
 Originally Posted by openfoam1 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 !

So concider this part solved. The rest should be up to you.
Get back to us!
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"

April 8, 2010, 16:10
#5
Member

Patricio Bohorquez
Join Date: Mar 2009
Location: Jaén, Spain
Posts: 95
Rep Power: 16
Quote:
 Originally Posted by openfoam1 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.

April 10, 2010, 10:46
#6
Member

Join Date: Dec 2009
Posts: 46
Rep Power: 15
Quote:
 Originally Posted by sega 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 ! 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

April 10, 2010, 11:28
#7
Senior Member

Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 19
Quote:
 Originally Posted by openfoam1 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)!
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"

April 11, 2010, 02:20
#8
Member

Join Date: Dec 2009
Posts: 46
Rep Power: 15
Quote:
 Originally Posted by sega 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)!

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

Last edited by openfoam1; April 11, 2010 at 02:46.

April 11, 2010, 05:15
#9
Senior Member

Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 19
Quote:
 Originally Posted by openfoam1 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.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"

 January 13, 2014, 11:25 #10 Member   Join Date: Aug 2011 Posts: 89 Rep Power: 13 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.

 July 16, 2014, 12:31 #11 New Member   Nara Shikamaru Join Date: Apr 2012 Posts: 22 Rep Power: 13 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 or, The total stress tensor including the pressure term should be used? Last edited by shikamaru; July 16, 2014 at 19:22.

 October 27, 2014, 03:59 #12 Member   Join Date: Aug 2011 Posts: 89 Rep Power: 13 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