CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   to get values from udf (https://www.cfd-online.com/Forums/fluent/138401-get-values-udf.html)

ozy July 3, 2014 08:59

to get values from udf
 
Hi all,

I have a problem to getting the results(output file) from udf. Can anybody help me please . My udf is as follows ,

DEFINE_UDS_FLUX(particle_flux, f, t, i)
{
real NV_VEC(vs_vec), NV_VEC(A);
real settling_flux;
real x[ND_ND];

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

F_AREA(A, f, t);

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);
}


For example how can i get the output value of the " vs_vec "


thanks in advance

pakk July 3, 2014 10:11

Quote:

Originally Posted by ozy (Post 499854)
Hi all,

I have a problem to getting the results(output file) from udf. Can anybody help me please . My udf is as follows ,

DEFINE_UDS_FLUX(particle_flux, f, t, i)
{
real NV_VEC(vs_vec), NV_VEC(A);
real settling_flux;
real x[ND_ND];

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

F_AREA(A, f, t);

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);
}


For example how can i get the output value of the " vs_vec "


thanks in advance

One possible way to do this:
*add 3 user defined memories (UDMs)
*In your code: C_UDMI(f,t,0)=vs_x;C_UDMI(f,t,1)=vs_y;C_UDMI(f,t,2 )=vs_z;
*You can now access them in Fluent.

ozy July 3, 2014 10:18

thank you a lot for your interest. I will try it now


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