CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   HELP! Fluent UDF Iterate error (https://www.cfd-online.com/Forums/fluent/48715-help-fluent-udf-iterate-error.html)

Sam July 8, 2008 23:01

HELP! Fluent UDF Iterate error
 
Hi everybody:

I wrote a UDF to add a force in the source term. The calculation is unsteady. The Interpreted and Compile steps were successful. Then I hooked the source term in the Define-> Boundary Conditions->Fluid pannel. I marked the source term and load the y momentum with the compiled UDF. While Iterating, there were errors in Fluent sayed as:

Error:

FLUENT received fatal signal (ACCESS_VIOLATION)

1. Note exact events leading to error.

2. Save case/data under new name.

3. Exit program and restart to continue.

4. Report error to your distributor.

Error Object: ()

Could anyone help me? Thank you very much!!

Paul July 9, 2008 15:32

Re: HELP! Fluent UDF Iterate error
 
Maybe someone will help you if list the UDF code ? :)

Sam July 10, 2008 21:29

Re: HELP! Fluent UDF Iterate error
 
The source codes are as follows:

#include "udf.h"

DEFINE_SOURCE(cellsourceinloop, cell, thread, dS, eqn) { real source; real x[ND_ND]; /* this will hold the position vector */ real y;

real min=0.;

begin_c_loop(cell,thread) /* loops over all cell in the thread passed

in the DEFINE macro argument */ {

if (C_VOF(cell,thread) >0.&& C_VOF(cell,thread) < 1.)

{

C_CENTROID(x,cell,thread);

y = x[1];

if (fabs(y)<=min) {

min=fabs(y);

}

}

} end_c_loop(cell,thread)

begin_c_loop(cell,thread) /* loops over all cell in the thread passed

in the DEFINE macro argument */

{

if (C_VOF(cell,thread) >0.&& C_VOF(cell,thread) < 1.)

{

/* source term */

source = -1e-20/(6*3.14159*2*min);

dS[eqn] = 0.0;

return source;

}

} end_c_loop(cell,thread) }


All times are GMT -4. The time now is 11:38.