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

UDF error for flux

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 10, 2014, 11:07
Default UDF error for flux
  #1
ozy
New Member
 
oguzayin
Join Date: Jan 2014
Location: France
Posts: 12
Rep Power: 12
ozy is on a distinguished road
Hi All,

i am trying to solve transport equation in fluent with udf. I wrote the udf for this and it is well compiled but when i run the simulation it gives error. please help me ?

My Udf is as follows
#include"udf.h"
#define dp 150.e-6
#define miu 1.7894e-5
#define rho 1.225
#define Cc (1.+0.066e-6/dp*(2.34+1.05*exp(-0.39*dp/0.066e-6)))
#define vs_x 0.0
#define vs_y (-998.2*dp*dp*9.81*Cc/(18.*miu))
#define vs_z 0.0

// dp=particle diameter
// miu=air densty
//rho=air density
//vk=kinematic viscisity of air
//Cc=cunningham correction factor
//Brownian=Brownian diffusion coefficient
//Sc=Schmidt number
//Sc3=pow(Sc,-1/3.)
//vs_x=x component of the settling velocity
//vs_y=y component of the settling velocity
//vs_z=z component of the settling velocity
/************************************************** *********************/
/* UDF to add gravitational settling velocity into the convective term */
/* of particle species conservation equation */
/************************************************** *********************/

DEFINE_UDS_FLUX(particle_flux, f, t, i)

{

real NV_VEC(vs_vec), NV_VEC(A);

real settling_flux;

real x[ND_ND];

// vs_vec=settling velocity vector
// A=face normal vector
// settling_flux=particle settling flux, which is a scalar
// x=position of face centroid

/* Define the settling velocity vector */

NV_D(vs_vec, = , vs_x, vs_y, vs_z);

/* obtain the face normal vector of the current face */

F_AREA(A, f, t);

/* calculate the superimposed mass flow vector */

if (!BOUNDARY_FACE_THREAD_P(t))

settling_flux = NV_DOT(vs_vec, A);

else

settling_flux = 0.0;

return (F_FLUX(f, t) / rho + settling_flux);
}
ozy is offline   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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 04:03.