# UDF for Oxygen Conc in Porous Bed

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

 September 23, 2003, 14:05 UDF for Oxygen Conc in Porous Bed #1 Umesh Guest   Posts: n/a Hi, I had written a UDF to specify the source of oxygen as a function of Bed Height. I need to modify my UDF for Oxygen source to speficy Oxygen conc Co2 = 0.123 FROM (x= 10, y=10) TO (x=20, y=10) [total x is 0 to 30] i.e. I WANT TO SPEFICY THE CONSTANT CONC. OF OXYGEN AT CERTAIN LOCATION OF BED along the Length. 1. How can I modify my following UDF for this. I had problem in including the variation with x. 2. Can I simplify this UDF given here. DEFINE_SOURCE(oxy_source, c, t, dS, eqn) { real x[ND_ND]; real y; float source; C_CENTROID(x,c,t); y =x[1]; /* (h1, h2, h2 and h4 points on Bed height) i.e. y-direction */ if ((y< h1 && y>=h2) || (y< h3 && y >=h4) ) { dS[eqn]=0; source=ko2*(Coxy_eqm-C_YI(c,t,0))- kq*C_YI(c,t,1); } else if ((y < h2 && y >=h3) || (y< h4 && y >=h5)) { dS[eqn]=0; source= 1.5*ko2*( Coxy_eqm - C_YI(c,t,0)); } return source; } All suggestions are Welcome _Umesh

 September 23, 2003, 23:03 Re: UDF for Oxygen Conc in Porous Bed #2 cp Guest   Posts: n/a Hi I guess, the function you used, C_CENTROID(x,c,t); also returns the x coordinate of the cell. You can then embed that in your 'if' condition. Hope this helps. Chendhil.

 September 24, 2003, 03:01 Re: UDF for Oxygen Conc in Porous Bed #3 Greg Perkins Guest   Posts: n/a Do you mean a source of O2 injection (ie kg/m3-s) or the concentration itself (kg/m3)?? You have specified a mass source of O2 in kg/m3-s with your udf. Also if you want to have a proper mass balance you need to add another source = sum of all species sources to the continuity equation. If you want to fix the O2 concentration then do this by fixing the O2 mass fraction to a specific value through: source = 1.0e10(Y_O2_I_Want - C_YI(c,t,i_o2)); ds[eqn] = -1.0e10; Greg

 September 24, 2003, 05:00 Re: UDF for Oxygen Conc in Porous Bed #4 Umesh Guest   Posts: n/a Dear CP and Greg, thanks for your suggestions I want a constant conc. of Oxygen along a Line from x=10 to x=20 (kg/m3) as C_YI(c,t,0)=const. in the domain of the Porous bed. I can use x=x[0] to get x coordinates. But I am not able to write/Modify the UDF to take care of above requirement. -Umesh

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Vamsee FLUENT 4 March 1, 2009 23:45 Vamsee FLUENT 0 February 26, 2009 02:01 hosseini FLUENT 1 June 22, 2007 12:19 umesh FLUENT 1 October 14, 2003 07:29 Patrik Blix FLUENT 8 September 10, 2000 00:17

All times are GMT -4. The time now is 02:58.