C_VOF_G works???
Does C_VOF_G works.....does it calculate the gradient vector of volume fraction of the phases...
shekhar 
Re: C_VOF_G works???
Hi,
Yes. It does work but you have to set the following in Fluent text prompt. solve/set/expert/Keep temporary solver memory from being feed? : yes Default is "no". Thank you FJ 
Re: C_VOF_G works???
Thanks FJ, I already did that but still when i start my iterations, this error comes:
Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () shekhar 
Re: C_VOF_G works???
This macro seems to be restricted to the VOF model. Are you using the VOF model ? Thomas

Re: C_VOF_G works???
no thomas, i am using the eulerian multiphase model... actually i am adding the capillary pressure as a momentum source term in my multiphase flow problem, and there i need to compute the gradient of volume fractions of the phases..........how is that possible with eulerian multiphase model !!!
shekhar 
Re: C_VOF_G works???
I wouold suggest to write a UDS to store the VOF value and then you can get your VOF gradient using the command C_UDS_G.
Thomas 
Re: C_VOF_G works???
Hi,
I think all gradient macro doesn't have the values at first iteration. So at first iteration, you don't hook your function and the next iteration , let's hook it. I think it will be O.K. Thank you FJ 
Re: C_VOF_G works???
Thanks FJ, I already tried that too....but this time there comes a different error: Error: divergence detected in AMG solver: pressure correction Error Object: ()
Shekhar 
Re: C_VOF_G works???
Hi,
Oh, really?. If your UDF function is not called, is your calculation no problem?. Thank you FJ 
Re: C_VOF_G works???
thanks FJ, Ya there isnt any problem when i do not link the UDF. The problem only comes after linking the UDF. I guess its not calculating the gradient of the volume fractions. Well, I am pasting here the UDF as well. this UDF is for adding a momentum source term to phase (i am modeling the hydrodynamics of gas and liquid flow in a packed bed).
#include "udf.h" DEFINE_SOURCE(cell_x_source, cell, thread_l, dS, eqn) { real source, thita_s, thita_g, rho_g, rho_l, n1, n2; Thread *mixture_thread = THREAD_SUPER_THREAD(thread_l); Thread **pt; pt = THREAD_SUB_THREADS(mixture_thread); thita_g = C_VOF (cell, pt[0]); thita_s = C_VOF (cell, pt[2]); rho_g = C_R (cell, pt[0]); rho_l = C_R (cell, pt[1]); n1 = C_VOF_G (cell, pt[0]) [0]; n2 = C_VOF_G (cell, pt[2]) [0]; source = 96.015*(pow((1thita_g),0.5)/pow(thita_s,1.5)*n2 + 1/(pow(thita_s,0.5)*pow((1thita_g),0.5))*n1); dS[eqn] = 0.0; return source; } 
Re: C_VOF_G works???
Hi,
Year, I've got the same error as your remarks. I considered your UDF but I don't really understand why this kind of error is happened. So I recoded with my way for unsteady calculation.It was O.K under my conditions. #include "udf.h" DEFINE_EXECUTE_AT_END(calculate_value) { Thread *t; Thread **pt; cell_t c; Domain *domain = Get_Domain(1); real thita_s, thita_g, rho_g, rho_l, n1, n2; mp_thread_loop_c (t,domain,pt) { begin_c_loop(c, t) { thita_s = C_VOF (c, pt[2]); thita_g = C_VOF (c, pt[0]); rho_g = C_R (c, pt[0]); rho_l = C_R (c, pt[1]); n1 = C_VOF_G (c, pt[0])[0]; n2 = C_VOF_G (c, pt[2])[0]; C_UDMI(c, t, 0) = thita_s; C_UDMI(c, t, 1) = thita_g; C_UDMI(c, t, 2) = rho_g; C_UDMI(c, t, 3) = rho_l; C_UDMI(c, t, 4) = n1; C_UDMI(c, t, 5) = n2; C_UDMI(c, t, 6) = 96.015*(pow((1thita_g),0.5)/pow(thita_s,1.5)*n2 + 1/(pow(thita_s,0.5)*pow((1thita_g),0.5))*n1); }end_c_loop(c, t) } } DEFINE_SOURCE(cell_x_source, c, t, dS, eqn) { real source; source = C_UDMI(c, t, 6); dS[eqn] = 0.0; return source; } Thank you FJ 
Re: C_VOF_G works???
thanks FJ, i ll try it n let u know :)
shekhar 
Same problem
Hello, I am having the same error message when trying to hook a source term in liquid phase of gas/liquid flow that is function of C_VOF_G. Did you find what's going on with yours please ? Thanks

gradient of volume fraction in EulerEuler
Hi Fourati,
I am having problem with the implementation of volume fraction gradient in EE simulation for my source term in momentum equation. I have used the following UDF to store my memory which is used for my source term calculation. When i run my simulation, the user defined memory shows always zero, which results zero in my source. I would be thankful to you if you have any suggestion for my problem. #include "udf.h" #define CON1 DEFINE_ADJUST(myadjust,d){ if(ROOT_DOMAIN_P(d)){cell_t c;Thread *t; Domain *sd = DOMAIN_SUB_DOMAIN(d,0); Alloc_Storage_Vars(sd,SV_VOF_RG,SV_VOF_G,SV_NULL); Scalar_Reconstruction(sd, SV_VOF,1,SV_VOF_RG,NULL); Scalar_Derivatives(sd,SV_VOF,1,SV_VOF_G,SV_VOF_RG,&Vof_Deriv_Accumulate);thread _loop_c(t,d) if(FLUID_THREAD_P(t)) {Thread *pt = THREAD_SUB_THREAD(t,0); begin_c_loop(c,t) {C_UDMI(c,t,0) = C_VOF_G(c,pt)[0]; C_UDMI(c,t,1) = C_VOF_G(c,pt)[1];}end_c_loop(c,t)} Free_Storage_Vars(sd,SV_VOF_RG,SV_VOF_G,SV_NULL);} } 
All times are GMT 4. The time now is 01:50. 