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

use the message in macro DEFINE_PROFILE with parallel processor

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2022, 15:19
Wink use the message in macro DEFINE_PROFILE with parallel processor
  #1
New Member
 
ali
Join Date: Dec 2021
Posts: 4
Rep Power: 4
alireza_T is on a distinguished road
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.2234e-03 8.8863e-08 8.6806e-08 3.9153e-06 1.6958e-05 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.2175e-03 8.5994e-08 8.4665e-08 3.8269e-06 1.6073e-05 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.1948e-03 8.5537e-08 8.4834e-08 3.7380e-06 1.5363e-05 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.1977e-03 8.2946e-08 8.2868e-08 3.6486e-06 1.4522e-05 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.1569e-03 8.2664e-08 8.3097e-08 3.5597e-06 1.3840e-05 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.1443e-03 8.0552e-08 8.1521e-08 3.4713e-06 1.3142e-05 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 x-velocity y-velocity k omega time/iter
56 1.1370e-03 7.9410e-08 8.0782e-08 3.3842e-06 1.2490e-05 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.1135e-03 7.7823e-08 7.9737e-08 3.2968e-06 1.1884e-05 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.0998e-03 7.6748e-08 7.8946e-08 3.2125e-06 1.1345e-05 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.0798e-03 7.5316e-08 7.7951e-08 3.1289e-06 1.0884e-05 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.0539e-03 7.4476e-08 7.7332e-08 3.0445e-06 1.0461e-05 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.0358e-03 7.2458e-08 7.5681e-08 2.9638e-06 9.9771e-06 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.0257e-03 7.1945e-08 7.5367e-08 2.8832e-06 9.5769e-06 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.0150e-03 6.9986e-08 7.3691e-08 2.8055e-06 9.1605e-06 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.0260e-03 6.9069e-08 7.2931e-08 2.7292e-06 8.7510e-06 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.8946e-04 6.7944e-08 7.2016e-08 2.6519e-06 8.4356e-06 0:00:04 135
! 65 solution is converged
Flow time = 0.001s, time step = 1
999 more time steps
alireza_T is offline   Reply With Quote

Old   May 11, 2022, 01:53
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
Code:
Message("I am node number %d and my total area =\n",myid);
alireza_T likes this.
__________________
best regards


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

Old   May 11, 2022, 02:35
Default
  #3
New Member
 
ali
Join Date: Dec 2021
Posts: 4
Rep Power: 4
alireza_T is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
Code:
Message("I am node number %d and my total area =\n",myid);
tanks Mr. but my problem is "showing message every each iteration" I need to show message every each time step
alireza_T is offline   Reply With Quote

Old   May 11, 2022, 03:08
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
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
	}
}
alireza_T likes this.
__________________
best regards


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

Reply

Tags
define_profile


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
Boundary condition problem (Freestream) KAYANO OpenFOAM Running, Solving & CFD 5 June 1, 2021 06:57
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 05:13
MPI run run fails of quadcore openfoam2.4 Priya Somasundaran OpenFOAM Running, Solving & CFD 3 January 25, 2016 09:50
decomposePar -allRegions stru OpenFOAM Pre-Processing 2 August 25, 2015 04:58
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36


All times are GMT -4. The time now is 16:37.