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

UDF hooking error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 19, 2007, 02:23
Default UDF hooking error
  #1
ranjit
Guest
 
Posts: n/a
Even after hooking the udf , the solve-->iterate option isnt enabled. I tried to initialize the solution and it gave an error, What is wrong with the method?

yes, i udf interpreted fine without error.
  Reply With Quote

Old   January 19, 2007, 03:17
Default Re: UDF hooking error
  #2
Akshay
Guest
 
Posts: n/a
Without hooking try to initialize. If it does then, this should be error with your udf. If you can paste your udf here, I may help you.

Regards, Akshay

  Reply With Quote

Old   January 19, 2007, 05:35
Default Re: UDF hooking error
  #3
ranjit
Guest
 
Posts: n/a
i Tried it with a very simple UDf, it interprets well

#include "udf.h"

DEFINE_PROPERTY(temperature, c, t) {

real temp = C_T(c, t);

return temp; }

My main concern is with the following udf, it doesnt interpret properly

#include "udf.h"

DEFINE_PROPERTY(temp, c, t) { cell_t c; Thread *t; real tmp;

begin_c_loop(c, t) { tmp=C_T(c, t); return tmp; } end_c_loop(c, t) }

it gives an absurd error like, Line4: function returns float instead of float.

please can anyone help me with this?
  Reply With Quote

Old   January 19, 2007, 08:58
Default Re: UDF hooking error
  #4
Akshay
Guest
 
Posts: n/a
Hi ranjit, Define property macro visits all the cells. So you dont need a macro to loop over all the cells. In continuation to the above, you dont need to define cell_t c and Thread *t as they are already defined variable for this macro.

See the definition given in the manual. DEFINE_PROPERTY( name, c, t) Argument Type Description char name UDF name. cell_t c Cell index. Thread *t Pointer to cell thread on which the property function is to be applied.

As a whole you have to modify your second UDF to first one which you have already done.

I think you are looking at something more than this.

  Reply With Quote

Old   January 19, 2007, 10:53
Default Re: UDF hooking error
  #5
ranjit
Guest
 
Posts: n/a
ok thanks, i guess the reason it doesnt enable the solve--->iterate option is because the udf doesnt do much other than read the temperature and return the same.

  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
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 07:25
groovyBC sega OpenFOAM Running, Solving & CFD 12 February 17, 2010 10:30
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
attach/detach (valve opening/closing) phsieh2005 OpenFOAM Running, Solving & CFD 2 March 21, 2009 06:18
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


All times are GMT -4. The time now is 22:48.