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

UDF for parallel use in combination with scheme possible?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2020, 06:46
Default UDF for parallel use in combination with scheme possible?
  #1
Member
 
Deutschland
Join Date: Jun 2020
Location: https://t.me/pump_upp
Posts: 43
Rep Power: 5
schwaral is on a distinguished road
Send a message via ICQ to schwaral Send a message via AIM to schwaral Send a message via Yahoo to schwaral
Hi I have the follwoing code that comuptes the variable fnew. Depending on the value ><0 I set the variable veldirect to 0 or 1. Everything works fine in serial, but not in parallel.

In parallel the printed value for veldirect is always 0. I use this variable in a scheme code that is executed every timestep. I am not sure if this will affect the parallel usage. I tried several types of this code now but I am not really sure around which line I should use host or node execution. In other codes it was more intuitive to me.

[CODE]
**** calculated fnew here ****

DEFINE_ADJUST(adjust_UDS_bc, d)
{
#if !RP_NODE /*execute on host or in serial */
if (fnew >= 0)
{
RP_Set_Integer("veldirect", 0);
}
else
{
RP_Set_Integer("veldirect", 1);
}
#endif
}
[CODE]

node_to_host_int_1(count); this is something that migth be needed as well? But again I couldnt really understand where in my case to use.
schwaral 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
Sutile and Tricky : Drive Fluent UDF parameters directly from workbench amscosta Fluent UDF and Scheme Programming 4 July 21, 2020 16:50
Replicating Scalable Wall Function with a UDF yousefaz FLUENT 0 August 4, 2017 02:30
2nd order upwind scheme (Fluent and CFX) Far FLUENT 0 May 22, 2011 01:50
How to combine UDF and Scheme? ali hemmati Fluent UDF and Scheme Programming 3 March 19, 2011 14:45
How to implement a numerical scheme by using UDF? Furui Xiong FLUENT 0 July 29, 2010 01:30


All times are GMT -4. The time now is 10:26.