
[Sponsors] 
December 29, 2005, 04:56 
questions about species transport through walls

#1 
Guest
Posts: n/a

hi,everybody! I want to describle a species transport ,I have to specify the species flux through a wall,when define the species boundary conditions I can only set a mass fraction with define _profile ,can someone tell me how to set species flux with it? I guess that I could do this through udfs instead of enabling the species transport model,then the fluent would treat the material as a pure one,and it seems difficult to settle the problem through this method and I 've no idea. Can someone give me some instructions!
Any comments are,as always, greatly appreciated! Thanks in advance! 

December 30, 2005, 13:44 
Re: questions about species transport through wall

#2 
Guest
Posts: n/a

Hello Shuqin, I've had such problem once and as I remember you have to ascribe there the mass fraction that is required for Fick's law (diffusion). The mass flux is proportional to the gradient of concentrations and therefore you need to specify the concentration on the wall since Fluent knows what is the concentration in the fluid adjacent to this wall. The proportionality factor is just the Mass Diffusivity that can be found in the material panel. So actually you specify the mass flux indirectly by giving the concentration on the wall. Mass flux is proportional to mass diffusivity times the difference in concentrations on the wall and in the fluid. Regards,


December 31, 2005, 06:00 
Re: questions about species transport through wall

#3 
Guest
Posts: n/a

Hello loop, Thanks for your reply,Do you mean : Mass flux =D*(concentration_c0concentration_on_the_wall), where D is the mass diffusivity of the species and concentration_c0 is the concentration in the fluid adjacent to the wall,and so all my job is to specify the concentration_on_the_wall,right?
but there is another confusion: In Fluent postprocessing,I could display counters of mass fraction as well as mole fraction and molar concentration,the question is how should I compute concentration_c0 through the species mass fraction C_YI(c0,t,i)?what is the connection between them? seems Fluent only provide mass fraction on a wall boundary,and what is the species concentration there? 

January 1, 2006, 14:51 
Re: questions about species transport through wall

#4 
Guest
Posts: n/a

Hi again, 1. Yes, all your job is to specify the concentration (the mass fraction) on the wall and the mass flux will be calculated from the equation. It is the same boundary type as when you specify temperature on the wall; the heat flux is proportional to the difference between wall temperature and fluid tempreature. 2. I understand that you know the mass flux and do not know the concentration on the wall. You should calculate it from the same equation. Of course you need to know the concentration of the species in the fluid as well. If you look in the section 7.7 Mass Diffusion Coefficients you will see the Fick's law there and that actually the equation is Ji =  ro*Di,m*(dYi/dx) where Ji, kg/sm2 is the mass flux density ro is the density of the fluid kg/m3 Yi is the mass fraction in kgi/kg of specie i and actually the product ro*Yi gives automaticaly the concentration of i. If you have a multicomponent fluid the mass diffusivity in material panel is a some kind of avarage depending on which method you specify. The phenomena is quite complex and I am not an expert here but what you should do is to calculate the mass fraction on the wall knowing Ji, kg/sm2, ro kg/m3 mass fraction in the fluid Y,kgi/kg for example from the countours of mass fraction and mass diffusivity. The mass diffusivity will be calculated from mass diffusion coefficients spesified for each species in the material panel. You choose the way the mass diffusivity is calculated and the mass diffusion coefficients are constants contained in material properties for each specie of your multicomponent fluid. Read something more in 7.7 Mass Diffusion Coefficients and depending on the way you calculate the mass diffusivity calculate it to finally obtain one value to use in the equation. If you finaly obtain the mass fraction try to see if in the reports there is possibility to view the mass flux through the wall or try to view it from general mass balance from all boundaries to see if the calculated mass fraction is really that one that gives the mass flux you wanted to specify. Regards


January 4, 2006, 10:19 
Re: questions about species transport through wall

#5 
Guest
Posts: n/a

hi,loop
Thanks again for you attention! For the materials I use: Mixture Species:H2,H2O(VAPOR) Density(kg/m3):incompressibleideagas Cp(j/kgk):mixinglaw Thermal Conductivity(w/mk):constant(0.0454) Viscosity(kg/ms):idealgasmixinglaw Mass Diffusivity(m2/s):dilute approximation(5.8675,5.8675) Following is the code I use for test: #include "udf.h" #define J 155.0 enum { hydrogen, water, N_REQUIRED_UDS }; DEFINE_PROFILE(species_fraction,t, i) { face_t f; cell_t c0; Thread *t0; real temp; t0 = THREAD_T0(t); begin_f_loop(f, t) { c0 = F_C0(f, t); temp=C_DIFF_L(c0,t0,i,N_REQUIRED_UDSi); F_PROFILE(f, t, i) =C_YI(c0,t0,i)J/C_R(c0,t0)/temp; } end_f_loop(f, t) } When I defined the UDF as interpreted function: D:\example\exam_10\species_fraction.c temp definition shadows previous definition Error: D:\example\exam_10\species_fraction.c: line 24: label "M_spe_multicomponent_j" not found . changed_thread_id_list: 72 lda.int M_spe_multicomponent_j (1) 78 lda.int n_spe (1) I think the multicomponent model is unavailable here since the materials species are only two:H2,H2O(VAPOR) and the multicomponent option is not active. I choose dilute approximation, BUT I can only access Di,j through the predefined macro C_DIFF_L(c0,t0,i,j)right? when I use C_DIFF_EFF(c0,t0,i)instead: Error: D:\example\exam_10\species_fraction.c: line 28: label "rp_ke_rng" not found Error: D:\example\exam_10\species_fraction.c: line 28: function "rng_alpha" not found Error: D:\example\exam_10\species_fraction.c: line 28: label "M_spe_multicomponent_j" not found seems C_DIFF_EFF(c0,t0,i) is for turbulent model.right? And how shall I get over this problem? regards! 

January 4, 2006, 10:27 
Re: questions about species transport through wall

#6 
Guest
Posts: n/a

Sorry ,the problem is :
How Can I get Di,m? And I defined Di,m in Material pannel (dilute approximation) NOT binary coefficient Di,j. Regards 

January 5, 2006, 20:44 
Re: questions about species transport through wall

#7 
Guest
Posts: n/a

Unfortunately i do not know such details since I've actually never done that. You may want to see if the two additional macros defined in mem.h directly below the C_DIFF_L(c,t,i,j) and C_DIFF_EFF(c,t,i), defined as C_THERMAL_DIFF(c,t,i)C_STORAGE_R(c,t,SV_THERMAL_DI FF_COEFF_0+i) C_UDSI_DIFF(c,t,i)C_STORAGE_R(c,t,SV_UDS_DIFF_COEF F_0+i) return the value that you set in materials panel, by any chance. This is just a guess. Do you really need to use diffusion on the wall? I am concerned about this because much flexible and easier way to model mass flux through walls would be defining a mass source in cells adjacent to the wall. It would be much esier and you just specify the flux  directly. I have a similar UDF on that so I can send it to you if you are interested.regards


January 6, 2006, 05:33 
Re: questions about species transport through wall

#8 
Guest
Posts: n/a

Hi,loop
Thanks for your prompt reply. Actually I've considered this model by adding source to the cells adjacent to the wall. But there comes ACCESS_VIOLATION.I am very much interested UDFs and that would be very much needful . Thanks again! 

January 7, 2006, 00:08 
Re: questions about species transport through wall

#9 
Guest
Posts: n/a

Hi loop
My email is :zengshuqin1983@yahoo.com.cn would you sent the UDFs to my email. 

January 8, 2006, 07:04 
Re: questions about species transport through wall

#10 
Guest
Posts: n/a

Ok, Is the case 2d or 3d?


January 8, 2006, 22:28 
Re: questions about species transport through wall

#11 
Guest
Posts: n/a

If you have ,send me both.
Thanks again! 

January 8, 2006, 23:00 
Re: questions about species transport through wall

#12 
Guest
Posts: n/a

Thanks again ,I've got the code you sent me.
And I think I can figure it out now and the 3D is not needed! 

January 9, 2006, 07:55 
Re: questions about species transport through wall

#13 
Guest
Posts: n/a

It is for 2d only. I think you will figure it out how to do it for 3d. If you have problems, let me know.Rgerads


April 9, 2014, 02:42 
Regarding UDF to calluate mass flux

#14 
New Member
ravikant
Join Date: Jan 2012
Posts: 4
Rep Power: 7 
Hello shuqin
i am also same problem to define mass flux and ass fraction profile on membrane wall. so i need your help can you please fwd me a udf which you have used to solve the peroblem it will be mush helpful for me thanks i nadvance 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Modelling Biomass Combustion via Species Transport  Racheal  FLUENT  28  October 13, 2016 10:39 
Please help!! Patch and Species transport  Julie  FLUENT  5  August 3, 2016 03:10 
Questions for a species transport problems (snapshots attached)  aleisia  FLUENT  2  October 9, 2011 04:40 
Fixed Bed Gasifier, Species Transport Problem  therandomestname  FLUENT  11  May 8, 2011 09:20 
species transport in water  lyn  FLUENT  1  December 12, 2007 19:15 