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/)
-   -   UDF for power law viscosity Received signal SIGSEGV (https://www.cfd-online.com/Forums/fluent-udf/244818-udf-power-law-viscosity-received-signal-sigsegv.html)

bio August 30, 2022 07:58

UDF for power law viscosity Received signal SIGSEGV
 
Hi guys,

I‘m using FLUENT 20.0 to do a simulation with non-Newton fluid governed by a power law. the udf code was as follows.
===============================================
#include "udf.h"
DEFINE_PROPERTY(non_newtonian_viscosity,cell,threa d)
{
real viscosity;
real stress;
real visc_min=1;
real visc_max=18;
real stress_min=0.1;
real stress_max=100001;
real n=0.15;
real k=2.52;
stress= C_STRAIN_RATE_MAG(cell,thread);
if (stress>=stress_max)
{
viscosity=visc_min;
}
else if (stress<=stress_min)
{
viscosity=visc_max;
}
else if ((stress>stress_min)&&(stress<stress_max))
{
viscosity=k*pow(stress,n-1);
}
return viscosity;
}
===============================================
The udf could work in fluent,but an error is reported after 2k iterations.

Reversed flow on 7 faces of pressure-outlet 16.
! 2706 solution is converged
2706 3.0994e-04 2.7519e-04 1.9778e-04 9.7265e-05 2.6660e-04 1.4593e-04 0:00:28 18

================================================== ============================

Node 10: Process 18148: Received signal SIGSEGV.

================================================== ============================

999999: mpt_accept: error: accept failed: No error

999999: mpt_accept: error: accept failed: No error

999999: mpt_accept: error: accept failed: No error

999999: mpt_accept: error: accept failed: No error

999999: mpt_accept: error: accept failed: No error

999999: mpt_accept: error: accept failed: No error

Can anyone give me some advise, I have no idea what to do..
Thank you very much.


All times are GMT -4. The time now is 16:40.