|
[Sponsors] |
May 8, 2005, 07:30 |
UDF - adjusting boundary conditions
|
#1 |
Guest
Posts: n/a
|
I want to adjust the velocity inlet. Did somebody know how to do?
I ve already tried this: DEFINE_ADJUST(adjust_fcn, d) { ... face_t f2; t2 = Lookup_Thread(d,4); begin_f_loop(f2, t2) { F_CENTROID(x,f2,t2); y = x[1]; F_PROFILE(f2, t2, 4) = -Qair/(13.8*rho*aire); } end_f_loop(f2, t2) } but fluent tells me an access_violation error I also tried with DEFINE_ADJUST(adjust_fcn, d) { ... face_t f2; t2 = Lookup_Thread(d,4); begin_f_loop(f2, t2) { F_U(f2,t2) = Qair/(13.8*rho*aire); } end_f_loop(f2, t2) printf("vitesse d'une face: %g\n", F_U(5,t2)); /* give the right answer! } but the velocity inlet doesn't update (i have put it in the function hooks). Does anyone have a solution to the problem of adjusting boundary conditions on each computing step? |
|
May 9, 2005, 02:48 |
Re: UDF - adjusting boundary conditions
|
#2 |
Guest
Posts: n/a
|
Why don't you declare Thread *t2? Luca
|
|
May 9, 2005, 03:44 |
Re: UDF - adjusting boundary conditions
|
#3 |
Guest
Posts: n/a
|
I don't wrote all the code. But the only problem is to redefine the boundary condition at each computing step.
|
|
May 9, 2005, 03:54 |
Re: UDF - adjusting boundary conditions
|
#4 |
Guest
Posts: n/a
|
Use the define_profile function. please read the UDF manual. Luca
|
|
May 9, 2005, 05:00 |
Re: UDF - adjusting boundary conditions
|
#5 |
Guest
Posts: n/a
|
what is this UDF manual
|
|
May 10, 2005, 14:26 |
Re: UDF - adjusting boundary conditions
|
#6 |
Guest
Posts: n/a
|
Yes but my problem is not to define at the beginning a boundary condition (that's with define_profile) but to adjust it each computing step (with define_adjust). I don't know how to modify this boundary condition without having a access_violation error.
|
|
May 10, 2005, 14:39 |
Re: UDF - adjusting boundary conditions
|
#7 |
Guest
Posts: n/a
|
define_profile can be used in time dependency too. You just have to use the time macro. You have to hook correctly youe define_profile in the bc where avaiable. Otherwise you can use a define_adjust. You should checkyou have written a correct UDF, not only using correctly Clanguage but that your UDF has a logical sense. Luca
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 13:06 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 05:21 |
Impinging Jet Boundary Conditions | Anindya | Main CFD Forum | 25 | February 27, 2016 12:58 |
read boundary conditions with udf | Bernhardt | FLUENT | 0 | May 31, 2007 09:46 |
A problem about setting boundary conditions | lyang | Main CFD Forum | 0 | September 19, 1999 18:29 |