CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

UDF - adjusting boundary conditions

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 8, 2005, 07:30
Default 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?
  Reply With Quote

Old   May 9, 2005, 02:48
Default Re: UDF - adjusting boundary conditions
  #2
Luca
Guest
 
Posts: n/a
Why don't you declare Thread *t2? Luca
  Reply With Quote

Old   May 9, 2005, 03:44
Default 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.
  Reply With Quote

Old   May 9, 2005, 03:54
Default Re: UDF - adjusting boundary conditions
  #4
Luca
Guest
 
Posts: n/a
Use the define_profile function. please read the UDF manual. Luca
  Reply With Quote

Old   May 9, 2005, 05:00
Default Re: UDF - adjusting boundary conditions
  #5
pratap
Guest
 
Posts: n/a
what is this UDF manual
  Reply With Quote

Old   May 10, 2005, 14:26
Default 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.
  Reply With Quote

Old   May 10, 2005, 14:39
Default 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
  Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Impinging Jet Boundary Conditions Anindya Main CFD Forum 24 January 11, 2012 14:40
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 6 April 17, 2010 23:40
mass flow in is not equal to mass flow out saii CFX 2 September 18, 2009 08:07
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


All times are GMT -4. The time now is 17:27.