|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 ![]() |
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 } |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for DPM particle deposition modelingpa | haghshenasfard | Fluent UDF and Scheme Programming | 10 | September 15, 2019 03:03 |
Undeclared Identifier Errof UDF | SteveGoat | Fluent UDF and Scheme Programming | 7 | October 15, 2014 08:11 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
Installation OF1.5-dev | ttdtud | OpenFOAM Installation | 46 | May 5, 2009 03:32 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |