CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to access VOF of a face (https://www.cfd-online.com/Forums/fluent-udf/84197-how-access-vof-face.html)

gandesk January 23, 2011 03:09

How to access VOF of a face
 
Hi all,

I want to access volume of fluid value of a face on a boundary and store it in a array. My following code says access violation error. It would be great if anyone can point out my mistake


int y, j;
float c[200];
face_t f;

for (j=0;j<200;j++)
{
c[j]=j;
}
y = 0;

begin_f_loop(f,t)
{
c[y]=F_VOF(f,t);
y = y+1;
}
end_f_loop(f,t)


Thanks
Sandeep

ComputerGuy February 2, 2011 21:24

This sounds silly, but is your code being passed a pointer to a face thread which exists on a multiphase cell? A little more definition (elaboration) of the code would be helpful.

Quote:

Originally Posted by gandesk (Post 291744)
Hi all,

I want to access volume of fluid value of a face on a boundary and store it in a array. My following code says access violation error. It would be great if anyone can point out my mistake


int y, j;
float c[200];
face_t f;

for (j=0;j<200;j++)
{
c[j]=j;
}
y = 0;

begin_f_loop(f,t)
{
c[y]=F_VOF(f,t);
y = y+1;
}
end_f_loop(f,t)


Thanks
Sandeep



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