- **FLUENT**
(*http://www.cfd-online.com/Forums/fluent/*)

- - **why enthalpy residual is great ???
**
(*http://www.cfd-online.com/Forums/fluent/43279-why-enthalpy-residual-great.html*)

why enthalpy residual is great ???
Hi CFD specialists ;
I am working on two phase flow with mass transfer process;I need to check following expression for computing residual of energy equation without energy source term in steady state. ( div.[ rho U (E+p/rho)] -div.[k (grad (T))]=0.0 (k is effective conductivity) Fluent uses finite volume method for discretization of left hand side of upper equation according to the following form : S= [(sigma on faces) {rho U.dA (E+p/rho)}-(sigma on faces ) { k grad(T).dA}]/ cell volume In single phase flow without energy source term , S should be zero. I use from a udf in order to certify this object , Udf computes right hand side of upper equation ( S); The part of udf which calculates S is presented at following: thread_loop_c (t,domain) { begin_c_loop(c,t) { int i=1; C_UDMI(c,t,4)=0.0; c_face_loop(c,t,i) { f=C_FACE(c,t,i); tf=C_FACE_THREAD(c,t,i); if(BOUNDARY_FACE_THREAD_P(tf)) { BOUNDARY_FACE_GEOMETRY(f,tf,A,ds,es,A_by_es,dr0); convection=(F_UDMI(f,tf,1)+F_UDMI(f,tf,2)/C_R(c,t))*F_FLUX(f,tf) ; diffusion=C_UDMI(c,t,11)*A_by_es/ds*(F_T(f,tf)-C_T(c,t)); } else{ INTERIOR_FACE_GEOMETRY(f,tf,A,ds,es,a_by_es,dr0,dr 1); if(F_C0(f,tf)==c) { F_T_G[0]=0.5*(C_T_G(c,t)[0]+C_T_G(F_C1(f,tf),t)[0]); F_T_G[1]=0.5*(C_T_G(c,t)[1]+C_T_G(F_C1(f,tf),t)[1]); diffusion=0.5*(C_UDMI(c,t,11)+C_UDMI(F_C1(f,tf),t, 11))*A_by_es/ds*(C_T(F_C1(f,tf),t)-C_T(c,t)); if(F_FLUX(f,tf)>0) { convection=C_UDMI(c,t,12)*F_FLUX(f,tf); /*method is first order upwind*/ else { convection=C_UDMI(F_C1(f,tf),t,12)*F_FLUX(f,tf); } } else { F_T_G[0]=0.5*(C_T_G(c,t)[0]+C_T_G(F_C0(f,tf),t)[0]); F_T_G[1]=0.5*(C_T_G(c,t)[1]+C_T_G(F_C0(f,tf),t)[1]); diffusion=0.5*(C_UDMI(c,t,11)+C_UDMI(F_C0(f,tf),t, 11))*A_by_es/ds*(C_T(F_C0(f,tf),t)-C_T(c,t)); if(F_FLUX(f,tf)<0) { convection=-C_UDMI(c,t,12)*F_FLUX(f,tf); } else { convection=-C_UDMI(F_C0(f,tf),t,12)*F_FLUX(f,tf); } } } C_UDMI(c,t,4)=C_UDMI(c,t,4)-diffusion+convection ; } C_UDMI(c,t,4)=C_UDMI(c,t,4)/C_VOLUME(c,t) ; } end_c_loop(c,t) } C_UDMI(c,t,11) indicates to effective conductivity in last iterration; C_UDMI(c,t,12) indicates to [e+P/rho] in last iteration; F_UDMI(f,tf,1)indicates to enthalpy in face; F_UDMI(f,tf,2)indicates to pressure in face; C_UDMI(c,t,4) is equal to S in context . But in any iteration I faced to S in range of -250000 to 350000 ; whereas in any iteration S should be zero . Why it happended ? Have you a suggestion in order that I could remedy this problem ? Does fluent use another method for calculating of S ? I am appreciated for everybody who help me in solving this problem. Thank's. Asghari. |

All times are GMT -4. The time now is 10:43. |