|
[Sponsors] |
September 23, 2003, 15:05 |
UDF for Oxygen Conc in Porous Bed
|
#1 |
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 24, 2003, 00:03 |
Re: UDF for Oxygen Conc in Porous Bed
|
#2 |
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, 04:01 |
Re: UDF for Oxygen Conc in Porous Bed
|
#3 |
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, 06:00 |
Re: UDF for Oxygen Conc in Porous Bed
|
#4 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change porous properties in UDF? | Patrik Blix | FLUENT | 10 | April 23, 2020 15:31 |
Porous Media UDF | Vamsee | FLUENT | 4 | March 1, 2009 23:45 |
Porous Media UDF | Vamsee | FLUENT | 0 | February 26, 2009 02:01 |
create solid viscosity UDF in fluidized bed | hosseini | FLUENT | 1 | June 22, 2007 13:19 |
Replace Species Conc. with UDF conc. | umesh | FLUENT | 1 | October 14, 2003 08:29 |