# UDF - adjusting boundary conditions

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 8, 2005, 07:30 UDF - adjusting boundary conditions #1 olivort 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 Luca Guest   Posts: n/a Why don't you declare Thread *t2? Luca

 May 9, 2005, 03:44 Re: UDF - adjusting boundary conditions #3 olivort 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 Luca 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 pratap Guest   Posts: n/a what is this UDF manual

 May 10, 2005, 14:26 Re: UDF - adjusting boundary conditions #6 olivort 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 Luca 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

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Anindya Main CFD Forum 25 February 27, 2016 13:58 Ardalan Main CFD Forum 6 April 17, 2010 23:40 saii CFX 2 September 18, 2009 08:07 Bernhardt FLUENT 0 May 31, 2007 09:46 lyang Main CFD Forum 0 September 19, 1999 18:29

All times are GMT -4. The time now is 07:37.