CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Macros for yplus, ystar, Ustar (http://www.cfd-online.com/Forums/fluent/91815-macros-yplus-ystar-ustar.html)

Seppl Huber August 23, 2011 11:01

Macros for yplus, ystar, Ustar
 
Hello,

I want to access the macro for yplus, ystar and Ustar in Fluent in my udf.
Does anyone know these macros? I am looking for a macro similar like C_R(c,t) to access the density in a cell.

Thanks in advance,
Seppl

Hello, I found the solution for yplus and U_tau (=friction velocity?)

F_STORAGE_R(f,t,SV_WALL_YPLUS)
F_STORAGE_R(f,t,SV_WALL_YPLUS_UTAU)

renli05 September 29, 2011 12:36

hi,Seppl
Do you know how to define yplus in Custom field function or UDF? The yplus in Fluent is only on the wall. I want to get a X-Y plot of uplus verus yplus along the wall normal direction. Could you give some sugguestion.
Thanks a lot.

johnwinter November 4, 2011 04:44

Hi Renli,

I guess you can calculate u* (and therefore y+) only near wall. Because by definition
u* = sqrt(shear stress/rho)

From this you can get shear stress only near wall.. right?.. if so it may not good representation to plot y+ along wall normal.

John

Gold November 4, 2011 11:33

Quote:

Originally Posted by Seppl Huber (Post 321231)
Hello,

I want to access the macro for yplus, ystar and Ustar in Fluent in my udf.
Does anyone know these macros? I am looking for a macro similar like C_R(c,t) to access the density in a cell.

Thanks in advance,
Seppl

Hello, I found the solution for yplus and U_tau (=friction velocity?)

F_STORAGE_R(f,t,SV_WALL_YPLUS)
F_STORAGE_R(f,t,SV_WALL_YPLUS_UTAU)




Dear All

i want to write a udf that stores the yplus in a UDMI for using that and get the USTAR at the boundaries, i dont know how use SV_WALL_YPLUS_UTAU;
d = Get_Domain(1);

thread_loop_c(t,d)
{
begin_c_loop(c,t)
{

C_UDMI(c,t,1)=C_STORAGE_R(f,t,SV_WALL_YPLUS_UTAU);

}
end_c_loop(c,t)
}

could you please give me an idea about that please

thanks

johnwinter November 5, 2011 06:46

Quote:

Originally Posted by Seppl Huber (Post 321231)
Hello,

I want to access the macro for yplus, ystar and Ustar in Fluent in my udf.
Does anyone know these macros? I am looking for a macro similar like C_R(c,t) to access the density in a cell.

Thanks in advance,
Seppl

Hello, I found the solution for yplus and U_tau (=friction velocity?)

F_STORAGE_R(f,t,SV_WALL_YPLUS)
F_STORAGE_R(f,t,SV_WALL_YPLUS_UTAU)

Hi Huber,

When i try use the said macros i got the following error.

Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: ()

Could you please explain how to use them in udf, is it like
F_STORAGE_R(f,t,SV_WALL_YPLUS)[1]?? or any header file need to be included to access those macros??

Thanks
John

mingersai March 23, 2012 01:57

Quote:

Originally Posted by johnwinter (Post 330817)
Hi Huber,

When i try use the said macros i got the following error.

Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: ()

Could you please explain how to use them in udf, is it like
F_STORAGE_R(f,t,SV_WALL_YPLUS)[1]?? or any header file need to be included to access those macros??

Thanks
John

Because it's totally wrong....
it loops all cell threads but the macro accesses face values....
In my case, I defined search algorithm which gives wall value to all cells perpendicular to it as roni mentioned. but i'm not sure if it's the right way though...


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