Obtaining a spices value in a boundary outlet
If the macro from fluent reads the pollutant species mass fraction is
C_POLLUT(c,t,i) and i in this case say it is 4 (soot), how do I get this to read a boundary wall? Example below is the macro, but how do I get this to read a boundary wall outlet with an ID5? The ID5 is shown in Fluent boundary IDs. C_POLLUT(c,t,4); |
Quote:
The wall is a face thread .. so, try this Quote:
|
Thanks Yasser
I will try your suggestion as soon as possible. This is good, all i have to do is enter boundary wall ID. I can also use this in an "if" condition statement e.g. { If((F_POLLUT(f,t,i))>0.001) ..... /*i for soot is 4*/ /* F_POLLUT(f,t,i) reads a mass fraction*/ } Domain d = Get_Domain(1); Thread *t = Lookup_Thread(d, ID); face_t f; begin_f_loop(f, thread) { F_POLLUT(f,t,i); } end_f_loop(f,thread) |
also change the word "thread" to "t"
|
Yes, thanks. It has to be the same.
I will be adding a define_profile to open/close an air inlet. Once i get back to computing. Domain d = Get_Domain(1); Thread *t = Lookup_Thread(d, ID); face_t f; begin_f_loop(f, t) { If((F_POLLUT(f,t,4))>0.001) DEFINE_PROFILE(inlet,th,i) { face_t f; begin_f_loop(f,th) { For(f=1;f<=5;(f+=0 5)) /*increment air in steps of 0.5 and up to 5. Untill pollution drops*/ F_PROFILE(f,th,i)=f; } end_f_loop(f,th); } end_f_loop(f,t) } |
I don't think this is going to work ... Lookup_Thread and other macros should be inside a function.
Also you can not add define macro inside a function ... any macro that starts with DEFINE should be a macro by itself ... You can recall the function from any other function by its name .. for example, inlet(); |
Changed it to a loop within a loop. I have added more info for clarifications.
DEFINE_PROFILE(inlet,th,i); /*defining for the air inlet*/ Domain d = Get_Domain(1); Thread *t = Lookup_Thread(d, 4); /*the 4 is for soot*/ face_t f; begin_f_loop(f, t) /*this is for the outlet with soot monitored*/ { If((F_POLLUT(f,t,4))>0.001) begin_f_loop(f,th) /*this is the air inlet*/ { For(f=1;f<=5;(f+=0 5)) /*increment air in steps of 0.5 and up to 5. Until pollution drops*/ F_PROFILE(f,th,i)=f; } end_f_loop(f,th); } end_f_loop(f,t) } |
All times are GMT -4. The time now is 06:56. |