CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   modified SurfaceTension (with filmthickness) (

Martin D! March 31, 2010 11:13

modified SurfaceTension (with filmthickness)
1 Attachment(s)

I'm very new to UDF programming. The problem I'm working with is as follows: water should rinse down a vertical plate (with gravity) while gas comes from the bottom in a countercurrent way. It's know that the surface of the water will be covered with waves in a chaotic many. These waves are variable in time and place.
To simulate this behaviour i'm using a 2D-VOF model (yet the problem is 3D - but this cames later on) in a transient calculation. Everything works fine, but sometimes the film got split apart. This isn't observed at my Reynoldsnumbers used!
Now I try to increase the Surfacetension with an UDF when the film becames very small after a wavecrest. So I will account for the cohesion-forces which depend on the inter-molecular forces, and prevent naturally the film from getting ripped apart.
I can load the UDF in, hook it, but it doesn't seem to work.

Please have a look at the code. Maybe u can say me what's wrong with it ...
The formula used is from an article, I will give it a try ...

/*UDF (UserDefiniedFunction) for modified SurfaceTension with filmthickness*/

#include <udf.h>

DEFINE_PROPERTY(User_SurfaceTension,c,t) /*!!!Loops automatically over all cells!!!*/

real k = 2.3e-5;
real vof = C_VOF(c,t);
real delta;
real surfacetension;
real sigma0 = 0.07199; /*SurfaceTension at 25C (standard)*/

if (vof == 0.05)
delta = C_WALL_DIST(c,t); /*get filmthickness at vof=0.05*/
surfacetension = pow(k/delta,4) + sigma0; /*formula to increase Surfacetension esp. when delta is low*/
return surfacetension;

Thanks for every answer!

Attachment 2760

All times are GMT -4. The time now is 15:03.