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/)
-   -   Access the surface tension force at a patch (https://www.cfd-online.com/Forums/openfoam-programming-development/127493-access-surface-tension-force-patch.html)

michielm December 12, 2013 10:51

Access the surface tension force at a patch
 
I am constructing a boundary condition to go with interFoam which will allow me to set the pressure at a boundary patch depending on the value of alpha. In particular, I want the pressure to have the form
Code:

p = p0 + alpha1*p1
where p1 is the capillary pressure jump between the two fluids at the boundary.

In order to do this I need to lookup the value of the surface tension force in the cells connecting to the patch and this is where I get stuck. I know how to lookup transportProperties or access data in U, p_rgh and alpha1 in the 0 directory, but I don't know how to access the surface tension force or, equivalently, the values of interface.sigmaK() and alpha1 (which would allow me to calculate the surface tension force).

Can someone tell me how I would go about doing this?

Jakob1 December 13, 2013 03:50

Just found out how to do that yesterday :)

Depending on what exactly you need (volumeField at adjacent cells, surfaceField on the patch etc) you can find some useful information here:

http://www.cfd-online.com/Forums/ope...ces-patch.html

http://www.cfd-online.com/Forums/ope...ary-cells.html

http://www.cfd-online.com/Forums/ope...ion-class.html


All times are GMT -4. The time now is 06:56.