CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS

Parrallel UDF error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2020, 03:09
Default Parrallel UDF error
  #1
New Member
 
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6
Tianxu is on a distinguished road
Hi,

It is urgent!!!!

I am doing 2D rotating detonation engine (RDE) simulation in ANSYS Fluent.
For inlet boundary condition, there are three possible cases:
1. Pi > Po, where Pi is the pressure inside the domain immediately at the inlet and Po is the total inflow pressure. In this case the pressure inside the RDE at this point is very high and blocks inflow of new mixture through the inlet face. The inlet boundary acts as a wall.
2. Pcr < Pi < Po, where Pcr is the critical pressure. In this case the inlet is not chocked and new mixture flows into the RDE according to: mass flow rate = the integral of (rho*u*dA).
3. Pi < Pcr, in this case the pressure inside the domain is low. The inlet at this point is choked, so maximum flow rate of fuel is flowing into the domain. Pcr is calculated from isentropic relation.

According to the above cases, I wrote velocity inlet boundary UDF. It works in serial mode (parrallel t0 mode), but it took very long time. To speed up the calculation, I tried to modify my code to parrallel. It can be compiled or interpreted (tried both). When I tried run it, some error appeared before first iteration:

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

Node 0: Process 16084: Received signal SIGSEGV.

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

Node 1: Process 16300: Received signal SIGSEGV.

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

Node 2: Process 6876: Received signal SIGSEGV.

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

Node 3: Process 12828: Received signal SIGSEGV.

================================================== ============================
999999: mpt_accept: error: accept failed: No such file or directory

999999: mpt_accept: error: accept failed: No such file or directory

999999: mpt_accept: error: accept failed: No such file or directory

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

The fl process could not be started.

Can anyone help me with this?

Sincerely regards
Tianxu is offline   Reply With Quote

Old   August 3, 2020, 03:10
Default
  #2
New Member
 
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6
Tianxu is on a distinguished road
Here is the code:

#include "udf.h"
DEFINE_PROFILE(inlet_velocity,th,i)
{
face_t f;
Domain *d = Get_Domain(1);
Thread *t = Lookup_Thread(d,5);
real po;
real pcr;
real To;
real gamma;
real R;
real p_cur;
po = 1013250; // stagnation pressure
gamma = 1.29;
pcr = po * pow(2/(gamma + 1), gamma/(gamma-1)); // critical pressure
To = 300; // stagnation temperature
R = 368.9; // J/kg k

#if !RP_HOST

begin_f_loop(f,th)
{

p_cur = F_P(f,th); //pressure on one face

if(p_cur >= po)
F_PROFILE(f,th,i) = 0.0000001;

else if(p_cur <= po && p_cur > pcr)
F_PROFILE(f,th,i) = sqrt( 2*gamma/(gamma-1) *R*To * (1 - pow(p_cur/po, gamma-1/gamma)) );

else if(p_cur <= pcr)
F_PROFILE(f,th,i) = sqrt(2*gamma/(gamma+1) *R*To); //386.8m/s

}
end_f_loop(f,th)
#endif

}



DEFINE_PROFILE(inlet_temperature,th,i)
{
face_t f;
Domain *d = Get_Domain(1);
Thread *t = Lookup_Thread(d,5);
real To;
real p_cur;
real po;
real gamma;
po = 1013250; // stagnation pressure
To = 300; // stagnation temperature
gamma = 1.29;

#if !RP_HOST

begin_f_loop(f,th)
{
p_cur = F_P(f,th); //pressure on one face
F_PROFILE(f,th,i) = To * pow(p_cur/po,(gamma - 1)/gamma); // Temperature
}
end_f_loop(f,th)
#endif
}
Tianxu is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for DPM particle deposition modelingpa haghshenasfard Fluent UDF and Scheme Programming 10 September 15, 2019 02:03
Undeclared Identifier Errof UDF SteveGoat Fluent UDF and Scheme Programming 7 October 15, 2014 07:11
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


All times are GMT -4. The time now is 04:11.