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

why is DEFINE_ADJUST printing the message twice ?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 13, 2022, 03:05
Default why is DEFINE_ADJUST printing the message twice ?
  #1
Member
 
Odisha
Join Date: Jan 2020
Posts: 59
Rep Power: 6
Siba11 is on a distinguished road
Hi everyone.
I've written a small DEFINE_ADJUST udf.

Code:
#include "udf.h"

DEFINE_ADJUST(name,d)
{

int k = 0;
Message("k is %d \n",k);

}
As you can see in the attached image, it is printing the message twice per iteration. I know that ADJUST udf is called every time at the start of the solver iteration. But why is it printing the text twice, when it should print only once?
Attached Images
File Type: png adjust_udf_prblm.png (25.6 KB, 13 views)
Siba11 is offline   Reply With Quote

Old   September 13, 2022, 03:12
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you run fluent in parallel:
1 host node and 1 computational mode (which is default)
Siba11 likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   September 13, 2022, 03:58
Default
  #3
Member
 
Odisha
Join Date: Jan 2020
Posts: 59
Rep Power: 6
Siba11 is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
you run fluent in parallel:
1 host node and 1 computational mode (which is default)
Hello Alexander.

Thank you for responding.
To my knowledge, the current versions of FLUENT do not support serial mode. So, to make my UDF print the message only once, do I need to parallelize it ?
Siba11 is offline   Reply With Quote

Old   September 15, 2022, 01:40
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
yes

you may use Message0 macro to write data from node_0 only

Look into ansys fluent customization manual for examples
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ 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
cma-permission-denied message for parallel running choist31 OpenFOAM Running, Solving & CFD 4 August 3, 2023 14:07
Guide: Getting Started with the CFD Online Discussion Forums pete Site Help, Feedback & Discussions 8 July 29, 2016 06:00
single directional message transmit in parallel model su_junwei OpenFOAM Programming & Development 1 December 17, 2009 08:00
error message susan Siemens 0 August 17, 2007 01:27
Error Message on es-ice [BUG] Wendy Tjia Siemens 0 February 10, 2005 09:40


All times are GMT -4. The time now is 14:33.