|
[Sponsors] |
April 13, 2004, 00:45 |
C_VOF_G works???
|
#1 |
Guest
Posts: n/a
|
Does C_VOF_G works.....does it calculate the gradient vector of volume fraction of the phases...
shekhar |
|
April 13, 2004, 03:02 |
Re: C_VOF_G works???
|
#2 |
Guest
Posts: n/a
|
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 |
|
April 13, 2004, 06:14 |
Re: C_VOF_G works???
|
#3 |
Guest
Posts: n/a
|
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 |
|
April 13, 2004, 06:25 |
Re: C_VOF_G works???
|
#4 |
Guest
Posts: n/a
|
This macro seems to be restricted to the VOF model. Are you using the VOF model ? Thomas
|
|
April 13, 2004, 08:53 |
Re: C_VOF_G works???
|
#5 |
Guest
Posts: n/a
|
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 |
|
April 13, 2004, 12:34 |
Re: C_VOF_G works???
|
#6 |
Guest
Posts: n/a
|
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 |
|
April 13, 2004, 20:54 |
Re: C_VOF_G works???
|
#7 |
Guest
Posts: n/a
|
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 |
|
April 14, 2004, 05:07 |
Re: C_VOF_G works???
|
#8 |
Guest
Posts: n/a
|
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 |
|
April 14, 2004, 22:48 |
Re: C_VOF_G works???
|
#9 |
Guest
Posts: n/a
|
Hi,
Oh, really?. If your UDF function is not called, is your calculation no problem?. Thank you FJ |
|
April 15, 2004, 03:19 |
Re: C_VOF_G works???
|
#10 |
Guest
Posts: n/a
|
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((1-thita_g),0.5)/pow(thita_s,1.5)*n2 + 1/(pow(thita_s,0.5)*pow((1-thita_g),0.5))*n1); dS[eqn] = 0.0; return source; } |
|
April 15, 2004, 21:49 |
Re: C_VOF_G works???
|
#11 |
Guest
Posts: n/a
|
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 re-coded 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((1-thita_g),0.5)/pow(thita_s,1.5)*n2 + 1/(pow(thita_s,0.5)*pow((1-thita_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 |
|
April 16, 2004, 05:50 |
Re: C_VOF_G works???
|
#12 |
Guest
Posts: n/a
|
thanks FJ, i ll try it n let u know
shekhar |
|
April 5, 2012, 08:48 |
Same problem
|
#13 |
New Member
Join Date: Feb 2012
Posts: 1
Rep Power: 0 |
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
|
|
March 23, 2014, 08:33 |
gradient of volume fraction in Euler-Euler
|
#14 |
New Member
pannsave
Join Date: Apr 2009
Posts: 25
Rep Power: 17 |
Hi Fourati,
I am having problem with the implementation of volume fraction gradient in E-E 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);} } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF - Interpreted works and compiled doesn't | AlwaysLearning | FLUENT | 9 | October 30, 2018 00:52 |
git problem: 1.7.x works but 1.6.x not | af631717 | OpenFOAM Installation | 2 | August 23, 2010 05:22 |
importing from Solid Works | andrew hayes | FLUENT | 3 | August 28, 2007 13:58 |
how fluent works | asim ibrahim | Main CFD Forum | 13 | October 6, 2006 03:59 |
Importing from Solid Works | mettler | FLUENT | 1 | March 5, 2005 23:45 |