|
[Sponsors] |
April 18, 2002, 23:17 |
Re: about unsteady uds term
|
#21 |
Guest
Posts: n/a
|
I think you'll have to make some modifications, since Fluent solves for the mass fraction of each species - not concentration directly.
It thus makes, sense I think, to reformulate your equation in the form solved by Fluent. This is: d/dt(rho*Yi) + d/dxj(rho*Yi*uj) = diff + Si now your equation has a similar form - ie transient term, convection term, diffusion term and source term. To do the transformation, note that the concentration ci = rho*Yi/Wi where Yi = mass fraction, rho = density and Wi = species molecular weight. so in your case you'll get: d/dt(rho*Yi/Wi) + d/dxj(rho*Yi/Wi*uj) = diff + Si' where I've ignored doing the transform for the diffusion term and your source term for the absorption is Si' = F*dq/dt = F*k(q*-q)/Wi and I think these q's would be a fucntion of the concentration and hence mass fraction Yi. So lets just say for the moment that: Si' = f(Yi)/Wi If you multiply through by Wi, which is a constant you'll have the form given by Fluent. So all you need to so is to make sure you write a source term udf for the Si' term which will have the units kg/m3-s. You can do that fairly easily. As I said in my last post, this is quite easy once you've worked out what your term is by transforming it to something Fluent solves and understands. I don't think it would be advisable to solve this equation directly through a uds - and why bother anyway. Hope it helps Greg |
|
April 19, 2002, 01:31 |
Re: about unsteady uds term
|
#22 |
Guest
Posts: n/a
|
Hi: Actually I have modified the equation, but I still cannot find any change. The following is my program, can you check for me:
#include"udf.h" #define F 0.96 #define rho 1000 #define W 200 #define time_step 0.5 DEFINE_SOURCE(xmass_source1,cell,thread,ds,eqn1) {float k[2]={0.9,1.2}; float K[2]={5.9,5.1}; float b[2]={0.724,0.215}; real source1,phi1,phi_curr1,phi_old1,phi_balan1,time_di ff1; phi_balan1=K[0]*rho*C_YI(cell,thread,0)/W; (q*=KC) phi_old1=phi_1; phi_curr1=(1-time_step*k[0])*phi_old1+k[0]*time_step*phi_balan1; (dq/dt=k(q*-q) phi1=phi_curr1; time_diff1=(phi_curr1-phi_old1)/time_step; (dq/dt) source1=-F*time_diff1; return source1; } Where I use (q_curr-q_old)/time_step =k(q_curr-q_old)to represent dq/dt=k(q*-q) q*i=Kici. I do not know how to set q_old. At the beginning, q_old shoud be 0. Could you check this program for me and give me key suggestion?I feel so thankful for your any reply. |
|
April 20, 2002, 01:14 |
strange problem
|
#23 |
Guest
Posts: n/a
|
Hi: I found why there is no change why I add source term. I print C_Yi(cell,thread,0), I found it is 0. It means that the species fraction cannot transfer to the program, so my program can not work. Could you tell what reason can cause this problem?
Thank you very much |
|
May 2, 2002, 04:46 |
help me
|
#24 |
Guest
Posts: n/a
|
Hi: Actually I have modified the equation, but I still cannot find any change. The following is my program, can you check for me:
#include"udf.h" #define F 0.96 #define rho 1000 #define W 200 #define time_step 0.5 DEFINE_SOURCE(xmass_source1,cell,thread,ds,eqn1) {float k[2]={0.9,1.2}; float K[2]={5.9,5.1}; float b[2]={0.724,0.215}; real source1,phi1,phi_curr1,phi_old1,phi_balan1,time_di ff1; phi_balan1=K[0]*rho*C_YI(cell,thread,0)/W; (q*=KC) phi_old1=phi_1; phi_curr1=(1-time_step*k[0])*phi_old1+k[0]*time_step*phi_balan1; (dq/dt=k(q*-q) phi1=phi_curr1; time_diff1=(phi_curr1-phi_old1)/time_step; (dq/dt) source1=-F*time_diff1; return source1; } for component2, it is similar to the above program Where I use (q_curr-q_old)/time_step =k(q_curr-q_old)to represent dq/dt=k(q*-q) q*i=Kici. I do not know how to set q_old. At the beginning, q_old shoud be 0. Could you check this program for me and give me key suggestion?I feel so thankful for your any reply. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem of SOURCE term gradient in UDS | wind | Fluent UDF and Scheme Programming | 6 | December 1, 2022 15:21 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |
Doubts UDS Flux, UDS Unsteady for VOF model | kel85uk | FLUENT | 0 | March 17, 2010 09:53 |
Manipulating the advection term of the UDS | Ameya Durve | FLUENT | 0 | February 24, 2009 14:52 |
[Q] Convection term treatment in UDS | Ryan, Lee | FLUENT | 4 | October 18, 2004 11:20 |