CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Parallel UDF on Compute Canada MP2

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2019, 23:19
Default DEFINE_PROPERTY on parallel Linux
  #1
New Member
 
Alexandre Coulombe
Join Date: Feb 2019
Posts: 7
Rep Power: 7
alex2293 is on a distinguished road
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 17, 2019 at 23:35. Reason: Shorter question
alex2293 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
does Hyperthreading affect the application of UDF? SJSW Fluent UDF and Scheme Programming 11 October 10, 2018 22:28
Error running openfoam in parallel fede32 OpenFOAM Programming & Development 5 October 4, 2018 16:38
Dynamic mesh in parallel udf rsarma Fluent UDF and Scheme Programming 3 August 2, 2018 07:02
Error code: 126 when loading parallel UDF Coop Fluent UDF and Scheme Programming 0 July 13, 2018 08:33
UDF Compiling / Parallel mode MV78 Fluent UDF and Scheme Programming 6 May 29, 2018 05:02


All times are GMT -4. The time now is 20:18.