|
[Sponsors] |
Obtaining a spices value in a boundary outlet |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
AH
Join Date: Apr 2014
Posts: 287
Rep Power: 0 ![]() |
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); |
|
![]() |
![]() |
![]() |
![]() |
#2 | ||
Member
Yasser Selima
Join Date: Mar 2009
Location: Canada
Posts: 51
Rep Power: 19 ![]() |
Quote:
The wall is a face thread .. so, try this Quote:
|
|||
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
AH
Join Date: Apr 2014
Posts: 287
Rep Power: 0 ![]() |
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) |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Yasser Selima
Join Date: Mar 2009
Location: Canada
Posts: 51
Rep Power: 19 ![]() |
also change the word "thread" to "t"
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
AH
Join Date: Apr 2014
Posts: 287
Rep Power: 0 ![]() |
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) } |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Yasser Selima
Join Date: Mar 2009
Location: Canada
Posts: 51
Rep Power: 19 ![]() |
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(); |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
AH
Join Date: Apr 2014
Posts: 287
Rep Power: 0 ![]() |
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) } |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation in semi-transparent media with surface-to-surface model? | mpeppels | CFX | 11 | August 22, 2019 08:30 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |