|
[Sponsors] |
August 4, 2005, 18:27 |
problem in 3d parabolic velocity profile
|
#1 |
Guest
Posts: n/a
|
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) } |
|
August 5, 2005, 07:42 |
Re: problem in 3d parabolic velocity profile
|
#2 |
Guest
Posts: n/a
|
pow is not working , use x*x instead of pow(x,2).
|
|
August 5, 2005, 07:58 |
Re: problem in 3d parabolic velocity profile
|
#3 |
Guest
Posts: n/a
|
thanks a lot mahesh...i will check it out
|
|
August 5, 2005, 08:59 |
Re: problem in 3d parabolic velocity profile
|
#4 |
Guest
Posts: n/a
|
"pow" does work, I also use it.
|
|
August 5, 2005, 13:35 |
Re: problem in 3d parabolic velocity profile
|
#5 |
Guest
Posts: n/a
|
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) } |
|
August 8, 2005, 10:54 |
Re: problem in 3d parabolic velocity profile
|
#6 |
Guest
Posts: n/a
|
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 |
|
August 8, 2005, 17:21 |
Re: problem in 3d parabolic velocity profile
|
#7 |
Guest
Posts: n/a
|
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
|
|
August 8, 2005, 17:31 |
Re: problem in 3d parabolic velocity profile
|
#8 |
Guest
Posts: n/a
|
I used interpreted udf.
|
|
August 11, 2005, 06:36 |
Re: problem in 3d parabolic velocity profile
|
#9 |
Guest
Posts: n/a
|
use interpreted udf also a multiplier is missing after 0.1
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Parabolic inlet velocity profile | msrinath80 | OpenFOAM Running, Solving & CFD | 157 | February 6, 2020 06:13 |
3D UDF Paraboilc Velocity Profile with max velocity | johnGo | Fluent UDF and Scheme Programming | 1 | January 4, 2011 22:45 |
[boundary condition] logarithmic velocity profile | cfdworker | FLUENT | 2 | April 18, 2009 00:36 |
2D air parabolic velocity profile | ilker | FLUENT | 2 | November 12, 2008 09:43 |
Multi step transient UDF velocity profile problem | William177 | FLUENT | 1 | February 3, 2008 07:47 |