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

Grid Motion in Parallel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2020, 19:56
Default Grid Motion in Parallel
  #1
Member
 
j
Join Date: Apr 2020
Posts: 34
Rep Power: 0
buckngnr11 is on a distinguished road
Hi, I'm having a small issue with my dynamic mesh UDF. I am running in parallel and end up doing some calculations to figure out how much to displace each wall vertex on my mesh. It seems to work fine except when I hit update dynamic mesh and run 1 iteration, it performs the grid motion twice. I also display a message for how much volume total I am displacing. When I hit update dynamic mesh, the message displays twice. The first tie it shows the correct volume to move the mesh. The second message shows exactly double the first volume. As shown, I use a += statement to loop through all the cells to get this value. This tells me that the entire thing is running twice for some reason. I'm running on 28 processors. The calculations across the processors works great, but again, it's like the function runs twice when I hit update dynamic mesh. Any ideas why this might happen? Could this be something to do with how node 0 communicates with the host? Maybe it's running my entire UDF twice?
Attached Images
File Type: png Screen Shot 2020-04-21 at 6.16.13 PM.png (91.4 KB, 17 views)
File Type: png Screen Shot 2020-04-21 at 6.14.23 PM.png (55.3 KB, 6 views)
buckngnr11 is offline   Reply With Quote

Old   April 22, 2020, 04:42
Default Loop
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
To debug it, print myid within Message. This will tell you whether the message is being printed by host or node, and which node, of course. And that might be helpful in determining why the code runs twice.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 22, 2020, 05:15
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
it is recommended to use
#if RP_NODE
for global summation

#if PARALLEL means nodes + host

however, you have (I_AM_NODE_ZERO_P) so your message function should be executed just once

Usually, Message0 is used to write output to console in case of parallel consideration

If it doesn't help, show the whole code, may be problem is somewhere else
__________________
best regards


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

Reply

Tags
dpm, grid motion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
UDF problem: incorrect grid motion Fil FLUENT 5 December 19, 2020 09:16
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58
decomposing a grid in parallel deeps SU2 2 January 29, 2014 01:01
HELP! grid check failed in parallel fluent restart FLUENT 0 March 5, 2011 09:55
MapFields to New Grid For Extreme Grid Deformations due to Body Motion albcem OpenFOAM 0 May 5, 2009 14:17


All times are GMT -4. The time now is 11:39.