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/)
-   -   HELP with FATAl error (https://www.cfd-online.com/Forums/fluent-udf/202187-help-fatal-error.html)

Mahadev May 23, 2018 09:09

HELP with FATAl error
 
Hy
I am using the following code to define density as a function of pressure and temperature but I am getting fatal error and when I am using parallel processing fluent could not even interpret it as the fluent window shuts down.
Please help me with it. Thanks in advance.

#include "udf.h"
DEFINE_PROPERTY(superfluid_density, c, t)
{
double rho;
double p, temp;
p = C_P(c,t) ;
temp = C_T(c,t);
rho = (12.19)-(0.0398*temp)+(0.00003551*p);
return rho;
}

obscureed May 23, 2018 10:05

Hi Mahadev,


The help files say: "In order to stabilize the pressure solution for compressible flows in ANSYS Fluent, an extra term related to the speed of sound is needed in the pressure correction equation. Consequently, when you want to define a custom density function for a compressible flow, your model must also include a speed of sound function."


Also, you might want to look at the effect of the Operating Pressure. Depending on that, and what is going on in your model, your equation for density could easily go negative. That will not end well.


It would be a good idea to get warmed up with only temperature dependence, not pressure dependence. If the model does not absolutely need pressure-dependent density, then it will save trouble to neglect it.


Good luck!
Ed

Mahadev May 23, 2018 11:15

Thank you for replying me.
Do I have to include the speed of sound in the density function or it should be given separately in the speed of sound section???

obscureed May 23, 2018 12:08

Hi Mahadev,


Please consult the help files.


Best regards,
Ed


All times are GMT -4. The time now is 07:23.