-
-
January 30, 2018 at 9:05 pm
Wantedmania89
SubscriberHi 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;
Â
}
Â
-
February 7, 2018 at 7:32 pm
Raef.Kobeissi
SubscriberAfter you interpreted it did you try to hook the udf again using parallel processing? -
February 9, 2018 at 4:00 pm
Wantedmania89
SubscriberHi Raef,
Yes, that's exactly what I did, but Fluent crashed with the error above.
Thanks
-
April 19, 2018 at 7:53 pm
marinak
Subscriber -
April 20, 2018 at 7:38 am
sooraj546
SubscriberStart again the problem from the beginning using UDF compile ...its always better to use compile than interpret ok
-
- The topic ‘Error While Using UDF in Parallel FLUENT’ is closed to new replies.
-
5844
-
1906
-
1420
-
1305
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.