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

questions about species transport through walls

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

Like Tree2Likes
  • 2 Post By loop

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 29, 2005, 03:56
Default questions about species transport through walls
  #1
shuqin
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!
  Reply With Quote

Old   December 30, 2005, 12:44
Default Re: questions about species transport through wall
  #2
loop
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,

  Reply With Quote

Old   December 31, 2005, 05:00
Default Re: questions about species transport through wall
  #3
shuqin
Guest
 
Posts: n/a
Hello loop, Thanks for your reply,Do you mean : Mass flux =D*(concentration_c0-concentration_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?

  Reply With Quote

Old   January 1, 2006, 13:51
Default Re: questions about species transport through wall
  #4
loop
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/s-m2 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/s-m2, 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

Rui_27 and THA SEANGHAI like this.
  Reply With Quote

Old   January 4, 2006, 09:19
Default Re: questions about species transport through wall
  #5
shuqin
Guest
 
Posts: n/a
hi,loop

Thanks again for you attention!

For the materials I use:

Mixture Species:H2,H2O(VAPOR)

Density(kg/m3):incompressible-idea-gas

Cp(j/kg-k):mixing-law

Thermal Conductivity(w/m-k):constant(0.0454)

Viscosity(kg/m-s):ideal-gas-mixing-law

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_UDS-i);

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!
  Reply With Quote

Old   January 4, 2006, 09:27
Default Re: questions about species transport through wall
  #6
shuqin
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

  Reply With Quote

Old   January 5, 2006, 19:44
Default Re: questions about species transport through wall
  #7
loop
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
  Reply With Quote

Old   January 6, 2006, 04:33
Default Re: questions about species transport through wall
  #8
shuqin
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!
  Reply With Quote

Old   January 6, 2006, 23:08
Default Re: questions about species transport through wall
  #9
shuqin
Guest
 
Posts: n/a
Hi loop

My e-mail is :zengshuqin1983@yahoo.com.cn

would you sent the UDFs to my email.
  Reply With Quote

Old   January 8, 2006, 06:04
Default Re: questions about species transport through wall
  #10
loop
Guest
 
Posts: n/a
Ok, Is the case 2d or 3d?
  Reply With Quote

Old   January 8, 2006, 21:28
Default Re: questions about species transport through wall
  #11
shuqin
Guest
 
Posts: n/a
If you have ,send me both.

Thanks again!
  Reply With Quote

Old   January 8, 2006, 22:00
Default Re: questions about species transport through wall
  #12
shuqin
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!
  Reply With Quote

Old   January 9, 2006, 06:55
Default Re: questions about species transport through wall
  #13
adam
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
  Reply With Quote

Old   April 9, 2014, 02:42
Default Regarding UDF to calluate mass flux
  #14
New Member
 
ravikant
Join Date: Jan 2012
Posts: 4
Rep Power: 14
ravigdch is on a distinguished road
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
ravigdch is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modelling Biomass Combustion via Species Transport Racheal FLUENT 39 January 8, 2022 07:42
Fixed Bed Gasifier, Species Transport Problem therandomestname FLUENT 12 January 4, 2019 07:08
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
species transport in water lyn FLUENT 1 December 12, 2007 18:15


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