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

How can I print a UDF Profile?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By `e`
  • 1 Post By `e`

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2016, 07:28
Default How can I print a UDF Profile?
  #1
New Member
 
Zerzura
Join Date: Nov 2015
Posts: 14
Rep Power: 10
Zerzura is on a distinguished road
Goodmorning/afternoon,

I have a question, how is it possible to print a User Defined Profile to the GUI? I am not sure wether Fluent interprets my flux function correctly:

DEFINE_PROFILE(flux_UDS0, thread, position)
{
face_t f;
real time = CURRENT_TIME;
real factor, MW;

begin_f_loop(f, thread)
{
F_PROFILE(f,thread,position) = factor*2e4*(51-time*21/(60*60*24))*1e-6/(MW);

printf("Flux_UDS0", F_PROFILE);

}
end_f_loop(f,thread)
}

If you could help me, that would be great!
Zerzura is offline   Reply With Quote

Old   April 4, 2016, 17:07
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Use the Message(); function for printing to the screen / command line.
Zerzura likes this.
`e` is offline   Reply With Quote

Old   April 7, 2016, 11:27
Default
  #3
New Member
 
Zerzura
Join Date: Nov 2015
Posts: 14
Rep Power: 10
Zerzura is on a distinguished road
Thank you,

in the end I used printf, because that worked out fine!
The problem was to generate a new for loop, that only puts the first face out.

Kind regards
Zerzura is offline   Reply With Quote

Old   April 15, 2016, 05:31
Default
  #4
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
You could use a flag which turns to zero after the first loop, for example:

Code:
#include "udf.h"

DEFINE_PROFILE(flux_UDS0, thread, position)
{
	face_t f;
	real time = CURRENT_TIME;
	real factor, MW;
	int flag = 1;

	begin_f_loop(f, thread)
	{
		F_PROFILE(f,thread,position) = factor*2e4*(51-time*21/(60*60*24))*1e-6/(MW);

		if (flag)
		{
			Message("Flux_UDS0 = %e\n;", F_PROFILE);
		}

		flag = 0;
	}
	end_f_loop(f,thread)
}
Zerzura likes this.
`e` is offline   Reply With Quote

Reply

Tags
f_profile, print, udf


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 inlet velocity profile mismatch with Fluent ChristineL Fluent UDF and Scheme Programming 15 November 25, 2016 06:45
Accessing profile data from a UDF ral007 Fluent UDF and Scheme Programming 1 October 14, 2015 09:21
UDF : velocity, k and epsilon (radial profile) cdiako Fluent UDF and Scheme Programming 23 July 30, 2013 08:29
defining temperature profile with UDF mohammadkm Fluent UDF and Scheme Programming 11 July 3, 2013 00:15
Read profile file from UDF DonQuijote Fluent UDF and Scheme Programming 0 February 18, 2013 11:56


All times are GMT -4. The time now is 17:38.