CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   tutorial on VOF in FLUENT 12 (http://www.cfd-online.com/Forums/fluent/70972-tutorial-vof-fluent-12-a.html)

thinktank December 10, 2009 23:26

tutorial on VOF in FLUENT 12
 
This is an udf file used in the VOF tutorial..

Code:

#include "udf.h"
#include "sg.h"
#include "sg_mphase.h"
#include "flow.h"

#define PI 3.141592654


DEFINE_PROFILE(membrane_speed,        /* function name  */
              th    ,                /* thread          */
              nv)                    /* variable number */
{
  face_t f;
  real x[ND_ND];
  real f_time = RP_Get_Real("flow-time");

  begin_f_loop (f,th)
    {
      F_CENTROID(x,f,th);
      if (f_time<=10e-6)
      {F_PROFILE(f,th,nv) = 3.58*cos(PI*f_time/30e-6);
      }
      else
      F_PROFILE(f,th,nv) = 0;
    }
  end_f_loop (f,th)
}

I was just wondering if we actually need all the definitions used i.e. #include "sg.h"
#include "sg_mphase.h" and
#include "flow.h"
Isnt "udf.h" enought for the above code.

Also do we need to evaluate F_CENTROID(x,f,th) in this case?

Zeppo December 20, 2009 07:10

I think "udf.h" coinains all needed to successfully compile your source file. You can find "udf.h" in the source folder within Fluent installed. F_CENTROID(x,f,th) needn't to be evaluated in your example.

I see you have tutorials files. Could you send me a copy of them (.msh, .c etc.) to my email. Thanks.

jayiba322 December 23, 2009 11:21

F_CENTROID(x,f,th) needn't to be evaluated in your example.
Could you send me a copy of them (.msh, .c etc.) to my email. Thanks


All times are GMT -4. The time now is 13:41.