CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

C_VOF_G works???

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By FJ

Reply
 
LinkBack Thread Tools Display Modes
Old   April 13, 2004, 00:45
Default C_VOF_G works???
  #1
Shekhar
Guest
 
Posts: n/a
Does C_VOF_G works.....does it calculate the gradient vector of volume fraction of the phases...

shekhar
  Reply With Quote

Old   April 13, 2004, 03:02
Default Re: C_VOF_G works???
  #2
FJ
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
  Reply With Quote

Old   April 13, 2004, 06:14
Default Re: C_VOF_G works???
  #3
Shekhar
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
  Reply With Quote

Old   April 13, 2004, 06:25
Default Re: C_VOF_G works???
  #4
thomas
Guest
 
Posts: n/a
This macro seems to be restricted to the VOF model. Are you using the VOF model ? Thomas
  Reply With Quote

Old   April 13, 2004, 08:53
Default Re: C_VOF_G works???
  #5
shekhar
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
  Reply With Quote

Old   April 13, 2004, 12:34
Default Re: C_VOF_G works???
  #6
thomas
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
  Reply With Quote

Old   April 13, 2004, 20:54
Default Re: C_VOF_G works???
  #7
FJ
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
  Reply With Quote

Old   April 14, 2004, 05:07
Default Re: C_VOF_G works???
  #8
Shekhar
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
  Reply With Quote

Old   April 14, 2004, 22:48
Default Re: C_VOF_G works???
  #9
FJ
Guest
 
Posts: n/a
Hi,

Oh, really?. If your UDF function is not called, is your calculation no problem?.

Thank you

FJ
  Reply With Quote

Old   April 15, 2004, 03:19
Default Re: C_VOF_G works???
  #10
Shekhar
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; }

  Reply With Quote

Old   April 15, 2004, 21:49
Default Re: C_VOF_G works???
  #11
FJ
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
Geng Fu likes this.
  Reply With Quote

Old   April 16, 2004, 05:50
Default Re: C_VOF_G works???
  #12
shekhar
Guest
 
Posts: n/a
thanks FJ, i ll try it n let u know

shekhar
  Reply With Quote

Old   April 5, 2012, 08:48
Default Same problem
  #13
New Member
 
Join Date: Feb 2012
Posts: 1
Rep Power: 0
Fourati is on a distinguished road
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
Fourati is offline   Reply With Quote

Old   March 23, 2014, 09:33
Default gradient of volume fraction in Euler-Euler
  #14
New Member
 
pannsave
Join Date: Apr 2009
Posts: 25
Rep Power: 9
pannsave is on a distinguished road
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);} }
pannsave is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
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
UDF - Interpreted works and compiled doesn't AlwaysLearning FLUENT 5 August 30, 2006 05:44
Importing from Solid Works mettler FLUENT 1 March 6, 2005 00:45


All times are GMT -4. The time now is 01:09.