CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   first time posting: UDF problem for solving a tank (https://www.cfd-online.com/Forums/fluent/176636-first-time-posting-udf-problem-solving-tank.html)

weirdsda August 23, 2016 09:18

first time posting: UDF problem for solving a tank
 
Hi everyone,

this is my first time here in CFD, I am working on a thixotropic UDF for my stirring tank model in Fluent. Here is my code:
Code:

#include "udf.h"

DEFINE_PROPERTY(mu_yahourt,c,tc)
{
real g_dot=C_STRAIN_RATE_MAG(c,tc);
real t;
real mu=1000.;

if ((g_dot>1.)||(C_UDSI(c,tc,0)>1e-1))
{
 t=MIN(CURRENT_TIME,C_UDSI(c,tc,0));
 mu=MIN(1000.,2313./30.*pow(g_dot,-1.5)*pow(MAX(t,1e-2),(-0.95*pow(g_dot,-0.31))));
}

return mu;

}

However, I cannot run this UDF in Fluent, the error message is:

999999: mpt_read: error: read failed trying to read 8 bytes: No such file or directory The fl process could not be started.

some times it says 8 bytes and some times 4 bytes.

I am really stuck here, So I hope anyone could help me!

Best,

Louis

ComputerGuy August 23, 2016 10:59

Try 3 things:
1) Ensure your user defined scalar has been initialized before you call it
2) Try to run this UDF in serial mode to see if it works
3) If yes to 1 & 2, try compiling the UDF instead of interpreting -- this will solve issues with UDF's in parallel execution mode.

ComputerGuy

weirdsda August 24, 2016 08:09

Thank you so much ComputerGuy, I tried 2 and 3, but I have no idea how to do 1.

could you tell me more about how to initialize the user defined scalar ?

Thank you sooo much!!!!!


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