|
[Sponsors] |
April 17, 2019, 00:19 |
DEFINE_PROPERTY on parallel Linux
|
#1 |
New Member
Alexandre Coulombe
Join Date: Feb 2019
Posts: 7
Rep Power: 7 |
Hello everyone,
This winter I wrote the following UDF to calculate the saturation temperature of each cell in the domain. I am trying to simulate the water vapor condensation of humid air in heat exchanger. The interpreted UDF is working on my computer. I want to run it on a Linux HPC. However when I initialize the solution I get Saturation_temperature <= 0 on node 0 if running in serial and node 0 and 1 if running on 2 nodes. Do you have any clue for me? #include "udf.h" DEFINE_PROPERTY(saturation_temperature,c,thread) { real p_operating; real p_pressure; real abs_pressure; real p_press; real sat_temp; real w; #if !RP_HOST Thread *t_humid_air = THREAD_SUB_THREAD(thread,1); Thread *t_wl = THREAD_SUB_THREAD(thread,0); w = C_YI(c,t_humid_air,0); p_pressure = C_P(c,t_humid_air); p_operating = RP_Get_Real("operating-pressure"); abs_pressure = p_operating + p_pressure; p_press = ((w/18)/((1-w)/27))*abs_pressure; sat_temp = 13.57*log(p_press)+187,67; if (sat_temp<=0) { sat_temp =273; return sat_temp; } else { return sat_temp; } #endif } Last edited by alex2293; April 18, 2019 at 00:35. Reason: Shorter question |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
does Hyperthreading affect the application of UDF? | SJSW | Fluent UDF and Scheme Programming | 11 | October 10, 2018 23:28 |
Error running openfoam in parallel | fede32 | OpenFOAM Programming & Development | 5 | October 4, 2018 17:38 |
Dynamic mesh in parallel udf | rsarma | Fluent UDF and Scheme Programming | 3 | August 2, 2018 08:02 |
Error code: 126 when loading parallel UDF | Coop | Fluent UDF and Scheme Programming | 0 | July 13, 2018 09:33 |
UDF Compiling / Parallel mode | MV78 | Fluent UDF and Scheme Programming | 6 | May 29, 2018 06:02 |