Hi Everyone,

I'm currently running a transient simulation of air and SF6 flow in an aircraft cabin model on FLUENT (ANSYS V.18.2). Although the case runs smoothly on many mesh configurations, either for the steady or transient modes, without a UDF, when I try to initialize the solution after interpreting the **UDF shown below** and using it as a velocity inlet profile at one zone **on the parallel mode**, FLUENT crashes after giving me the following error:

**Received signal SIGSEGV.**

**MPI Application rank 0 exited before MPI_Finalize() with status 2**

However, when I switch FLUENT to the serial mode, the solution initialization process goes by fine, and I could run the case for some iterations.

**My question is: is there any way I can fix this problem and do parallel simulation for my case using this UDF? **

**THE UDF CODE I INTERPRETTED:**

#include "udf.h"

DEFINE_PROFILE(velocity_magnitude, thread, position)

{

double M, time, velocity_inj, CPFR, PVT, tau, a1, a2, b1, b2, c1, c2, A, gender, CEV, flowrate;

double gamma1, gamma2;

face_t f;

PVT = 0.0664;

CEV = 2.5;

gender=1.0;

A=0.0000396;

time = 1.0;

tau = time/PVT;

if (gender == 1.0)

CPFR = (CEV-2.4448)/0.138; /* originally (CEV-0.2983)/0.138 */

else

CPFR = (CEV+0.043)/0.204;

a1 = 1.680;

b1 = 3.338;

c1 = 0.428;

a2 = (CEV/(PVT*CPFR))-a1;

b2 = ((-2.158*CEV)/(PVT*CPFR))+10.457;

c2 = 1.8/(b2-1);

gamma1=2.792;

if (CEV==0.5)

gamma2=2.13;

else if (CEV==2.5) /* Use this and adjust the CPFR equation above accordingly to get CPFR = 0.4 l/s */

gamma2=836.8;

else if (CEV==5.0)

gamma2=1247.28;

if (tau <= 1.2)

M=(a1*pow(tau,b1-1)*exp(-tau/c1))/(gamma1*pow(c1,b1));

else

M=(a1*pow(tau,b1-1)*exp(-tau/c1))/(gamma1*pow(c1,b1))+(a2*pow(tau-1.2,b2-1)*exp(-(tau-1.2)/c2))/(gamma2*pow(c2,b2));

flowrate=0.001*M*CPFR;

velocity_inj = flowrate/A;

F_PROFILE(f, thread, position) = velocity_inj;

}