
[Sponsors] 
use the message in macro DEFINE_PROFILE with parallel processor 

LinkBack  Thread Tools  Search this Thread  Display Modes 
May 7, 2022, 14:19 
use the message in macro DEFINE_PROFILE with parallel processor

#1 
New Member
ali
Join Date: Dec 2021
Posts: 4
Rep Power: 4 
hello everybody. I have a problem with my UDF code.
when I need, for example, to show a message in console of fluent. Messages are displayed by the number of cores per iteration. so my UDF is. #include "udf.h" DEFINE_PROFILE(test,t,i) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f,t,i) = 20; } end_f_loop(f, t) # if RP_NODE Message("I am node number %d and my total area =\n"); #endif } Can someone help me? for example in my console there are.... 50 1.2234e03 8.8863e08 8.6806e08 3.9153e06 1.6958e05 0:00:02 150 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 51 1.2175e03 8.5994e08 8.4665e08 3.8269e06 1.6073e05 0:00:02 149 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 52 1.1948e03 8.5537e08 8.4834e08 3.7380e06 1.5363e05 0:00:01 148 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 53 1.1977e03 8.2946e08 8.2868e08 3.6486e06 1.4522e05 0:00:01 147 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 54 1.1569e03 8.2664e08 8.3097e08 3.5597e06 1.3840e05 0:00:01 146 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 55 1.1443e03 8.0552e08 8.1521e08 3.4713e06 1.3142e05 0:00:01 145 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = iter continuity xvelocity yvelocity k omega time/iter 56 1.1370e03 7.9410e08 8.0782e08 3.3842e06 1.2490e05 0:00:29 144 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 57 1.1135e03 7.7823e08 7.9737e08 3.2968e06 1.1884e05 0:00:23 143 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 58 1.0998e03 7.6748e08 7.8946e08 3.2125e06 1.1345e05 0:00:19 142 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 59 1.0798e03 7.5316e08 7.7951e08 3.1289e06 1.0884e05 0:00:15 141 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 60 1.0539e03 7.4476e08 7.7332e08 3.0445e06 1.0461e05 0:00:12 140 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 61 1.0358e03 7.2458e08 7.5681e08 2.9638e06 9.9771e06 0:00:09 139 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 62 1.0257e03 7.1945e08 7.5367e08 2.8832e06 9.5769e06 0:00:07 138 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 63 1.0150e03 6.9986e08 7.3691e08 2.8055e06 9.1605e06 0:00:06 137 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 64 1.0260e03 6.9069e08 7.2931e08 2.7292e06 8.7510e06 0:00:05 136 I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 6283 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = I am node number 0 and my total area = 65 9.8946e04 6.7944e08 7.2016e08 2.6519e06 8.4356e06 0:00:04 135 ! 65 solution is converged Flow time = 0.001s, time step = 1 999 more time steps 

May 11, 2022, 00:53 

#2 
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 
Code:
Message("I am node number %d and my total area =\n",myid);
__________________
best regards ****************************** press LIKE if this message was helpful 

May 11, 2022, 01:35 

#3 
New Member
ali
Join Date: Dec 2021
Posts: 4
Rep Power: 4 

May 11, 2022, 02:08 

#4 
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 
Code:
#include "udf.h" DEFINE_PROFILE(test,t,i) { real x[ND_ND]; real y; int curr_ts; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f,t,i) = 20; } end_f_loop(f, t) curr_ts = N_TIME; if (last_ts != curr_ts) { last_ts = curr_ts; # if RP_NODE Message("I am node number %d and my total area =\n"); #endif } }
__________________
best regards ****************************** press LIKE if this message was helpful 

Tags 
define_profile 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Boundary condition problem (Freestream)  KAYANO  OpenFOAM Running, Solving & CFD  5  June 1, 2021 05:57 
AMI speed performance  danny123  OpenFOAM  21  October 24, 2020 04:13 
MPI run run fails of quadcore openfoam2.4  Priya Somasundaran  OpenFOAM Running, Solving & CFD  3  January 25, 2016 08:50 
decomposePar allRegions  stru  OpenFOAM PreProcessing  2  August 25, 2015 03:58 
Superlinear speedup in OpenFOAM 13  msrinath80  OpenFOAM Running, Solving & CFD  18  March 3, 2015 05:36 