|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Nov 2010
Posts: 19
Rep Power: 16 ![]() |
hi
I am writing a udf for a volumetric reaction rate, (there is a example in fluent udf manual). If I want to reach a specific species properties, I should use r->reactant[i] i is the index of my species. I wonder how can I found my species index. for example I have a 3 gasses in my gas phase as mixture. in the species dialog box under selected species I have: CO H2 O2 so is it true that their index are: CO->0 H2->1 O2->2 and when i write r->reactant[1] it is equal to H2? or their index are arrange by their order in the reactions dialog box? |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 ![]() |
Quote:
//----------------------------------------- int H2_Num,O2_Num,spe; char *spe_name; Domain*domain; Material*mix_mat; domain=Get_Domain(1); mix_mat= mixture_material(domain); mixture_species_loop_i(mix_mat,spe) { spe_name=MIXTURE_SPECIE_NAME(mix_mat,spe); if(STREQ("H2",spe_name)) { H2_Num=spe; } if(STREQ("O2",spe_name)) { O2_Num=spe; } } |
||
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Join Date: Nov 2010
Posts: 19
Rep Power: 16 ![]() |
it is very use full and I use your code as ececute on demand
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
quastion about a double stream tubetube model | Eric | Main CFD Forum | 1 | September 15, 2021 17:13 |