CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   pressure profile (https://www.cfd-online.com/Forums/fluent/85451-pressure-profile.html)

alicfd February 25, 2011 12:37

pressure profile
 
Hi everyone
I have a problem with following UDF. I want to apply pressure on BC that pressure harmonizes with gradient vector! But when I init it, I accept error!
#include "udf.h"
#define viscosity 0.0029

DEFINE_PROFILE(Pressure_Profile , t , i){
cell_t c ;
begin_c_loop(c , t ){

C_PROFILE(c , t , i ) =2*viscosity*C_U_G(c , t )[0] ;
}
end_c_loop(c , t)
}
I think its reason is that Fluent isn’t solved equations yet. My problem is steady state!!
How can I apply folllowing BC?
P=2*viscosity*(du/dx)
Thanks a lot.
Kid Ali.

Amir February 25, 2011 13:23

Hi Ali,
first, you should use compiled UDF not interpreted one.
second,to keep gradient values you should use this TUI command:
solve/set/expert
if they didn't help, you can define gradient yourself.


All times are GMT -4. The time now is 01:52.