|
[Sponsors] |
April 4, 2016, 08:28 |
How can I print a UDF Profile?
|
#1 |
New Member
Zerzura
Join Date: Nov 2015
Posts: 14
Rep Power: 11 |
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! |
|
April 4, 2016, 18:07 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Use the Message(); function for printing to the screen / command line.
|
|
April 7, 2016, 12:27 |
|
#3 |
New Member
Zerzura
Join Date: Nov 2015
Posts: 14
Rep Power: 11 |
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 |
|
April 15, 2016, 06:31 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
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) } |
|
Tags |
f_profile, print, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 07:45 |
Accessing profile data from a UDF | ral007 | Fluent UDF and Scheme Programming | 1 | October 14, 2015 10:21 |
UDF : velocity, k and epsilon (radial profile) | cdiako | Fluent UDF and Scheme Programming | 23 | July 30, 2013 09:29 |
defining temperature profile with UDF | mohammadkm | Fluent UDF and Scheme Programming | 11 | July 3, 2013 01:15 |
Read profile file from UDF | DonQuijote | Fluent UDF and Scheme Programming | 0 | February 18, 2013 12:56 |