CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Synthetic jet 3D UDF (https://www.cfd-online.com/Forums/main/204707-synthetic-jet-3d-udf.html)

Arun Jacob July 30, 2018 07:26

Synthetic jet 3D UDF
 
I am working on synthetic jet flow simulation. i want to know that how can i generate a 3d UDF for the following parameters velocity = 195m/sec, Frequency is 17.
I am also attaching the udf generated in 2d. Now i want to do the same in 3D..what are the changes that i should made to get the result. Please..

#include"udf.h"

DEFINE_PROFILE(SJ_velocity,thread,position)

{

face_t f;

begin_f_loop(f,thread)

{

real freq=17;

real t= RP_Get_Real("flow-time");

F_PROFILE(f,thread,position) =195*sin(freq*(t)*(2.*3.141592654));


}

end_f_loop(f,thread)

}

LuckyTran August 3, 2018 15:43

This is for a boundary condition right? Otherwise you might need to use a cell thread and not a face thread.

Here's an example from the Fluent manual for a pressure profile.

Code:

DEFINE_PROFILE(pressure_profile,t,i)
 {
    real x[ND_ND];    /* this will hold the position vector */
    real y;
    face_t f;
    begin_f_loop(f,t)
      {
      F_CENTROID(x,f,t);
      y = x[1];
      F_PROFILE(f,t,i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5;
      }
    end_f_loop(f,t)
  }

You only need to use x[0] for the x-coordinate and x[2] for the z-coordinate.

Also you shouldn't have ignored the rules which says to not post Fluent questions here, that's how posts get ignored and buried...

Arun Jacob August 3, 2018 23:25

Thank you sir for your kind reply. i tried this code and divergence: AMG solver Temperature is detected

LuckyTran August 5, 2018 18:59

Well (sarcasticly) I used it and it worked so beautifully that gold rained from the sky.

Why would you use the code as-is? It's probably completely incorrect for your problem. If only you would post what you did, maybe someone would help you...


All times are GMT -4. The time now is 17:49.