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

Cannot Execute on Demand

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 14, 2013, 07:53
Unhappy Cannot Execute on Demand
  #1
New Member
 
Join Date: Apr 2013
Location: Netherlands
Posts: 2
Rep Power: 0
Denis is on a distinguished road
Dear forum users,

I am new to Fluent and have the following problem:

I compile an ON_DEMAND UDF:
=====
#include "udf.h"
DEFINE_ON_DEMAND(on_demand_calc)
{
Domain *d;
Thread *t;
d = Get_Domain(1);

printf("Hello World\n");
}
======
It compiles without errors, then I Load it. When I go to Define-> User-Defined -> Execute on Demand, choose "on_demand_calc::libudf", and press Execute, totally nothing happens (no any new text is coming in the Fluent console). Then when I quit Fluent, the "Hello World" text appears in the console (that many times as I have pressed the Execute button) just half a second before Fluent closes. Or sometimes the text appears when I unload the "libudf" in "Manage".

I have this issue for serial and parallel(3 cores) sessions of Fluent.

My software and system:
Ansys 14.5
Windows 8
MS Visual Studio 2010.


Can anybody please give a suggestion what is going wrong?
Thanks in advance!

Last edited by Denis; April 14, 2013 at 14:25.
Denis is offline   Reply With Quote

Old   April 15, 2013, 05:33
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 9
coglione is on a distinguished road
Your code is definitely ok, maybe there is something in the GUI going on.
Try Message0("Hello World\n") instead of printf and see what happens.

cheers
coglione is offline   Reply With Quote

Old   April 19, 2013, 09:19
Default
  #3
New Member
 
Join Date: Apr 2013
Location: Netherlands
Posts: 2
Rep Power: 0
Denis is on a distinguished road
Thank you, the Message("Hello World\n"); worked.
Denis is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
execute udf after convergence wanghaojie Fluent UDF and Scheme Programming 4 January 24, 2012 19:01
execute udf in ss & transient simulation hosseinhgf FLUENT 0 December 1, 2010 09:41
error while execute on demand Anderson Main CFD Forum 4 October 17, 2008 11:48
On demand UDF error RS FLUENT 0 May 10, 2007 12:54
execute on demand pourak FLUENT 0 April 20, 2007 06:24


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