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

Error occurred during calculate mass flux

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 28, 2015, 07:16
Default Error occurred during calculate mass flux
  #1
New Member
 
AaronSyu
Join Date: May 2015
Posts: 13
Rep Power: 10
aronsyu is on a distinguished road
Hello everyone,

I am trying to calculate the mass flux in my multi-phase model using UDF.

Here is the equation below(ignore term (1-beta))



When I wrote all of equation into my UDF, an error occurred.

Quote:
Error: cx-set-real-entry: wta[2](float)
Error Object: -1.#inf
I've search on Google, but I didn't get too much useful information.

I think the problem occurred due to the syntax error, but still can't figure it out.

Here is my UDF code below

Parameter "p_sat" and "mass_flux" are new code I added.

If I calculate p_sat, mass flux and q_vap, the case will diverge due to Temperature, so I try to reduce the relaxation factor of Energy, but it didn't work.

If I just calculate p_sat and mass flux, the case work well but can't read contour after calculate(The error above will occur.)

Can anyone help me?

Thanks a lot !


Quote:
DEFINE_SOURCE(laser_source, c, t, ds, eqn)
{
Thread *pt,*pt2;
int phase_index = 1;
int phase_index2 = 0;
face_t f;
real time,source,sourceup;
real radq,conv,epsi,delfc, y_dir_grad_vof, mass_flux, p_sat;

real x[ND_ND],s[ND_ND];

pt = THREAD_SUB_THREAD(t,phase_index);
pt2 = THREAD_SUB_THREAD(t,phase_index2);
time = RP_Get_Real("flow-time");

C_CENTROID(x,c,t);
s[0]=vel*(time-3.6e-8);


delfc = code ;
source =code;
y_dir_grad_vof = code;

p_sat = 101325*(exp((47.8679*9.86*pow(10,6))/8.314*3533)*(1-(3533/C_T(c,pt)))); //7
mass_flux = sqrt((47.8679/(8.314*2*3.141)))*(p_sat/sqrt(C_T(c,pt))); //8
q_vap = -9.83*pow(10,6)*mass_flux*C_UDMI(c,t,delta)*(((1-C_VOF(c,pt2))*C_R(c,pt))/C_R(c,t));//9

C_UDMI(c,t,psat) = p_sat;
C_UDMI(c,t,mflux) = mass_flux;
C_UDMI(c,t,qvap) = q_vap;

return source;
}
aronsyu is offline   Reply With Quote

Reply

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
To calculate area averaged species mass fraction from PDF Bharadwaj B S Fluent UDF and Scheme Programming 3 March 8, 2016 02:22
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
Mass Flux vs Velocity Inlet Sandra FLUENT 5 July 20, 2005 13:09
total mass flux correction for compressible fluid? Francesco Di Maio Main CFD Forum 0 August 21, 2000 04:23


All times are GMT -4. The time now is 13:50.