|
[Sponsors] |
August 21, 2012, 21:48 |
invalid lvalue in assignment
|
#1 |
Member
Musango Lungu
Join Date: Dec 2011
Location: China
Posts: 73
Rep Power: 14 |
Dear Friends,
I am trying to program a custom drag function but I am getting an invalid lvalue assignment in line 17.Kindly help me and give Suggestions. The line in question is in bold. #include "udf.h" #define pi 4.atan(1.) #define diam2 4.06e-4 DEFINE_EXCHANGE_PROPERTY(Cao_Ahmadi_drag,cell,mix_ thread,s_col,f_col) { Thread *thread_g,thread_s; real x_vel_g,x_vel_s,y_vel_g,y_vel_s,abs_v,slip_x,slip_ y, rho_g,rho_s,mu_g,reyp,vof_g,vof_s,vof_m,taup,k_g_s ; vof_m = 0.644; /* find the threads for the gas(primary)*/ /* and solids(secondary phases) */ thread_g = THREAD_SUB_THREAD(mix_thread, s_col);/* gas phase */ thread_s = THREAD_SUB_THREAD(mix_thread, f_col);/* solid phases*/ /* find phase velocities and properties*/ x_vel_g = C_U(cell,thread_g); y_vel_g = C_V(cell,thread_g); x_vel_s = C_U(cell,thread_s); y_vel_s = C_V(cell,thread_s); rho_g = C_R(cell,thread_g); rho_s = C_R(cell,thread_s); mu_g = C_MU_L(cell,thread_g); /* compute slip*/ abs_v = sqrt(slip_x*slip_x + slip_y*slip_y); /* compute reynolds number*/ reyp = rho_g*abs_v*diam2/mu_g; /* compute particle relaxation time*/ taup = rho_s*vof_s/k_g_s vof_g = C_VOF(cell,thread_g);/* gas vol frac */ vof_s = C_VOF(cell,thread_s);/* solid vol frac*/ k_g_s = 18.*mu_g*vof_s*(1.+ 0.1*pow(reyp,0.75))/diam2/diam2/pow(1.-(vof_s/vof_m),2.5*vof_m); return k_g_s; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
gamma-ReTheta turbulence model for predicting transitional flows | FelixL | OpenFOAM Programming & Development | 123 | August 30, 2022 12:50 |
compilation problem with "fvPatch::lookupPatchField" | Ya_Squall2010 | OpenFOAM Programming & Development | 9 | November 15, 2021 23:01 |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 19:00 |
OpenFOAM install on Ubuntu Natty 11.04 | bkubicek | OpenFOAM | 13 | May 26, 2011 06:48 |
Phase locked average in run time | panara | OpenFOAM | 2 | February 20, 2008 15:37 |