CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

udf in parallel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2015, 11:23
Default udf in parallel
  #1
New Member
 
yanboliu
Join Date: May 2015
Posts: 1
Rep Power: 0
yanboliu is on a distinguished road
Hello all:
I have a simulation that requires apolynomialTemperature at the inlet. In order to do this I have written the udf shown below and it can work well for serial operation,but when i try to load it for parallel implementation. I have found it appear error shown below.
Thanks all in advance for any help provided.


#include "udf.h"
#include "math.h"

DEFINE_PROFILE(unsteady_temperature, thread, position)
{

real t, temperature;

face_t f;

begin_f_loop(f, thread)
{
t = RP_Get_Real("flow-time");
temperature = 295.869+5.3462*pow(10,-18)*pow(t,4)-6.3431*pow(10,-13)*pow(t,3)+1.2431*pow(10,-8)*t*t+0.00042227*t;
F_PROFILE(f, thread, position) = temperature;
}
end_f_loop(f, thread)

}




cpp -I"C:\Program Files\ANSYSI~1\v140\fluent\fluent14.0.0/src" -I"C:\Program Files\ANSYSI~1\v140\fluent\fluent14.0.0/cortex/src" -I"C:\Program Files\ANSYSI~1\v140\fluent\fluent14.0.0/client/src" -I"C:\Program Files\ANSYSI~1\v140\fluent\fluent14.0.0/mult
port/src" -I. -DUDFCONFIG_H="<udfconfig-host.h>" "C:\Users\Administrator\Desktop\udf unsteady temperature s.c"
C:\\Users\\Administrator\\Desktop\\udf unsteady temperature s.c:2: math.h: No such file or directory

999999 (..\src\mpsystem.c@1173): mpt_read: failed: errno = 10054

999999: mpt_read: error: read failed trying to read 4 bytes: Invalid argument
MPI Application rank 0 exited before MPI_Finalize() with status -1073741819
The Parallel FLUENT process could not be started.
yanboliu is offline   Reply With Quote

Old   May 28, 2015, 11:31
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Two suggestions:

1) try to move "face_t f;" before the "real" declaration

2) try to get the flow time as "t = CURRENT_TIME;" Indeed, note that the manual suggests:

"You should not access a scheme variable using any of the RP_GET_... functions from inside
a cell or face looping macro (c_loop or f_loop). This type of communication between the
solver and cortex is very time consuming and therefore should be done outside of loops."

sbaffini 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
"Define_Profile" UDF for parallel solver Antoine Fluent UDF and Scheme Programming 9 February 29, 2016 06:09
Problem in using UDF in parallel computing Yogini Fluent UDF and Scheme Programming 0 January 22, 2013 08:23
UDF Error with Parallel affter several step trantoan2008 Fluent UDF and Scheme Programming 0 January 7, 2013 07:33
Parallel UDF Error Andrew FLUENT 2 March 30, 2007 11:11
UDF in parallel version. yobee FLUENT 0 August 17, 2004 04:12


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