CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   receive fluent received a fatal signal (Segmentation fault). (https://www.cfd-online.com/Forums/fluent/149695-receive-fluent-received-fatal-signal-segmentation-fault.html)

chenkaiqe March 6, 2015 15:50

receive fluent received a fatal signal (Segmentation fault).
 
hi,
I have a UDF as,
#include "udf.h"
#include "mem.h"
DEFINE_PROPERTY(viscosity3, c, t)
{

real tt,time;
real Z;
real strain_rate_nu;
real yield_stress;
real vis;

tt=C_T(c,t);
strain_rate_nu=C_STRAIN_RATE_MAG(c,t);

Z=strain_rate_nu*1.0e-15*exp(196835.0/8.314/tt);
yield_stress = 188.68*log(pow(Z/6.26,1.0/5.06)+pow(pow(Z/6.26,2.0/5.06)+1.0,0.5));
vis=yield_stress*1e6/3.0/strain_rate_nu;
return vis;
}


but every time when I try to use this, the fluent received a fatal signal (Segmentation fault). shows, even when I try to run it without UDF and then put it back, the errors shows up, someone can help me ~~~~~~:(:(

vasava March 10, 2015 06:48

The only reason I can think of is that you have not activated the energy equation. Because of that the simulation can not access the temperature data via C_T(c,t).

pakk March 10, 2015 09:21

Quote:

Originally Posted by chenkaiqe (Post 534989)
Z=strain_rate_nu*1.0e-15*exp(196835.0/8.314/tt);

Are you sure this equation has no typo's?

If I try a temperature of 300 Kelvin, then exp(196835.0/8.314/tt) is equal to 1.8e34. This number may be too big to hold, if you are running single precision.

If this equation is really what you want, then you might use some numerical tricks to make it numerically better:

Code:

Z=exp(196835.0/8.314/tt+log(strain_rate_nu*1.0e-15);


All times are GMT -4. The time now is 19:59.