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

VOF in Eulerian model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2009, 06:45
Default VOF in Eulerian model
  #1
isabel
Guest
 
Posts: n/a
Hi everybody, I need to access to volume of fluid gradient and temperature gradient to use as a source. I am using Eulerian model. Fluent compiles well but when I try to iterate it gives me this 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: ()

The code is:

#include "udf.h"

#include "sg.h"

#include "sg_mphase.h"

#include "flow.h"

#include "mem.h"

DEFINE_ADJUST(area_density, domain)

{

Thread *t;

Thread **pt;

cell_t c;

Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,P_PHASE);

real voidx, voidy, voidz=0;

{

Alloc_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_N ULL);

Scalar_Reconstruction(pDomain, SV_VOF,-1,SV_VOF_RG,NULL);

Scalar_Derivatives(pDomain,SV_VOF,-1,SV_VOF_G,SV_VOF_RG,

Vof_Deriv_Accumulate);

}

{

Alloc_Storage_Vars(domain, SV_T_RG, SV_T_G, SV_NULL);

T_derivatives(domain);

Free_Storage_Vars(domain, SV_T_RG, SV_NULL);

}

mp_thread_loop_c (t,domain,pt)

if (FLUID_THREAD_P(t))

{

Thread *tp = pt[P_PHASE];

begin_c_loop (c,t)

{

C_UDMI(c,t,0) = (C_VOF_G(c,tp)[0]*C_T_G(c,t)[0]+C_VOF_G(c,tp)[1]*C_T_G(c,t)[1]);

}

end_c_loop (c,t)

}

Free_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NU LL);

Free_Storage_Vars(domain, SV_T_G, SV_NULL);

}

DEFINE_SOURCE(gas, cell, thread, dS, eqn)

{

real x[ND_ND];

real source;

Thread *tm = THREAD_SUPER_THREAD(thread);

Thread **pt = THREAD_SUB_THREADS(tm);

source = -0.6*(C_UDMI(cell,tm,0)/40);

C_UDMI(cell, tm, 1) = source;

dS[eqn] =0;

return source;

}

DEFINE_SOURCE(liquid, cell, thread, dS, eqn)

{

real x[ND_ND];

real source;

Thread *tm = THREAD_SUPER_THREAD(thread);

Thread **pt = THREAD_SUB_THREADS(tm);

source = -C_UDMI(cell, tm, 1);

dS[eqn] = 0;

return source;

}

  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Singularity in two fluid model (Eulerian-Eulerian) Zak Main CFD Forum 4 February 28, 2010 17:54
Eulerian model X.Min FLUENT 0 May 7, 2005 20:35
about eulerian model major FLUENT 4 October 15, 2004 00:04
enabling UDS in Eulerian-eulerian multiphase model shao1 FLUENT 0 July 14, 2002 22:23
eulerian-eulerian model gorman FLUENT 3 January 18, 2002 16:51


All times are GMT -4. The time now is 21:35.