CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

uds's flux term in multiphase flow

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

LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2009, 06:08
Question uds's flux term in multiphase flow
New Member
Nan Zhang
Join Date: Mar 2009
Location: Beijing
Posts: 4
Rep Power: 17
nonyear is on a distinguished road
Send a message via MSN to nonyear
dear all
I tried to use DEFINE_UDS_FLUX to return the default flux term \nabla(\alpha\rhoU\cdotA) in multiphase(Eulerian model) flow, but the calculated scalar \phi is out of range, i.e. greadter than 1 even if the inlet value is 1. I have tried first-order upwind and central-differencing scheme but the scalars were still out of range.
so can anyone help? Thanks at first!

Below are my codes.

#include "udf.h"

DEFINE_UDS_FLUX(cd, face, thread_g, i)
cell_t c0, c1 = -1;
Thread *tg0, *tg1 = NULL;

real NV_VEC(A), flux = 0.0;

real flux0 = 0.0, flux1 = 0.0, NV_VEC(psi_vec0), NV_VEC(psi_vec1);

real rho_g0, vof_g0, vof_g1;

c0 = F_C0(face, thread_g);
tg0 = F_C0_THREAD(face, thread_g);
F_AREA(A, face, thread_g);

rho_g0 = F_R(face, thread_g);
rho_g0 = C_R(c0, tg0);

NV_DS(psi_vec0, =, F_U(face, thread_g), F_V(face, thread_g), F_W(face, thread_g), *, rho_g0);
flux = NV_DOT(psi_vec0, A) * F_VOF(face, thread_g);
c1 = F_C1(face, thread_g);
tg1 = F_C1_THREAD(face, thread_g);

vof_g0 = C_VOF(c0, tg0);
vof_g1 = C_VOF(c1, tg1);

NV_DS(psi_vec0, =, C_U(c0, tg0), C_V(c0, tg0), C_W(c0, tg0), *, C_R(c0, tg0));
NV_DS(psi_vec1, =, C_U(c1, tg1), C_V(c1, tg1), C_W(c1, tg1), *, C_R(c1, tg1));

flux0 = NV_DOT(psi_vec0, A) * vof_g0;
flux1 = NV_DOT(psi_vec1, A) * vof_g1;
flux = 0.5 *(flux0 +flux1);
return flux ;
nonyear is offline   Reply With Quote


define_uds_flux, uds

Thread Tools Search this Thread
Search this Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
Boundary Flow and Total Source Term Summary NH CFX 1 December 16, 2008 17:24
the shock in multiphase flow wgl CFX 0 November 26, 2008 03:17
correct visualization of multiphase flow jemteo CFX 0 April 5, 2006 06:27
Help! UDF_flux vs mass flow flux Wei FLUENT 1 October 14, 2004 04:59

All times are GMT -4. The time now is 16:53.