|
[Sponsors] |
How to print a message only once with printf in a UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 23, 2017, 11:08 |
How to print a message only once with printf in a UDF
|
#1 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 14 |
Hello all,
I want to print a variable in a UDF hooked to a BC in my case. However, in each iteration, the message printed several times: Code:
BC Pressure: -1.19 [Pa] BC Pressure: -1.19 [Pa] BC Pressure: -1.19 [Pa] BC Pressure: -1.19 [Pa] BC Pressure: -1.19 [Pa] BC Pressure: -1.19 [Pa] BC Pressure: -1.19 [Pa] BC Pressure: -1.19 [Pa] BC Pressure: -1.19 [Pa] Any idea how can I call "printf" only once, no matter how many time hooked UDF to the BC called? Thanks. |
|
September 25, 2017, 22:41 |
|
#2 | |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
Quote:
if(f==0) printf(xxxxxxx); |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] Another cylinder question | bendel_boy | OpenFOAM Meshing & Mesh Conversion | 5 | January 6, 2015 06:09 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
UDF message error (SEGMENTATION VIOLATION" C_H_G | louiza | FLUENT | 0 | July 16, 2009 05:38 |
Parse Error Message While interpreting UDF in FLUENT | dhimans | Fluent UDF and Scheme Programming | 1 | July 10, 2009 07:29 |
error message when compiling the udf | brusly | FLUENT | 6 | October 6, 2006 05:30 |