problem in 3d parabolic velocity profile
Hi, I keep getting a error whenever i interpret(SEGMENTATION VIOLATION) or compile (Error code 1)the following code for parabolic velocity profile. I'm pretty new to Fluent. So I'm not exacltly sure what is causing this problem. Can anyone kindly help me in this regard
/************************************************** ********************* vprofile.c UDF for specifying steady-state velocity profile boundary condition ************************************************** **********************/ #include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; real r; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); r = sqrt(pow(x[0],2)+pow(x[1],2)); F_PROFILE(f, thread, position) = 2*0.1(1-pow(r/0.000175,2)); } end_f_loop(f, thread) } |
Re: problem in 3d parabolic velocity profile
pow is not working , use x*x instead of pow(x,2).
|
Re: problem in 3d parabolic velocity profile
thanks a lot mahesh...i will check it out
|
Re: problem in 3d parabolic velocity profile
"pow" does work, I also use it.
|
Re: problem in 3d parabolic velocity profile
Hi everyone. I replaced the pow and even replaced the sqrt. But still the code doesnt work. It just gives me a message " Error code 1" if i try to compile it. Any help would be really appreciated. I have copied the code below
/************************************************** ********************* vprofile.c UDF for specifying steady-state velocity profile boundary condition ************************************************** **********************/ #include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { float x[ND_ND]; /* this will hold the position vector */ float r; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); r = (((x[0]*x[0])+(x[1]*x[1])))^0.5; F_PROFILE(f, thread, position) = 2*0.1(1-((r/0.000175)*(r/0.000175))); } end_f_loop(f, thread) } |
Re: problem in 3d parabolic velocity profile
Hello,
obviously you forgot a "*" in the line with F_PROFILE() on the right hand side before the first bracket. I just tested this corrected UDF and it works. Dirk |
Re: problem in 3d parabolic velocity profile
it still doesnt work for me..do i have to do something else for building the library. i just compile my udf after reading my .cas file. Thanks Lokesh
|
Re: problem in 3d parabolic velocity profile
I used interpreted udf.
|
Re: problem in 3d parabolic velocity profile
use interpreted udf also a multiplier is missing after 0.1
|
All times are GMT -4. The time now is 08:01. |