# UDF Problem

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 21, 2005, 17:17 UDF Problem #1 Jan Guest   Posts: n/a Hello, I try to get the number of faces for a cell via UDF (function C_NFACES). My code looks like that: #include "udf.h" DEFINE_PROPERTY(cell_density, cell, thread) { real rho; real temp = C_T(cell, thread); int number = C_NFACES(cell, thread); rho = 101325/(8.314*temp)*28.966/1000; return rho; } Most of it is taken from the Fluent UDF manual. Everything works fine if I delete the line "int number ...". If I write the line to get the number of faces for "cell", I get the following message: non-integer subscript expression: unsigned char Could anyone help me to find the mistake? I have nearly given up. I would be thankful for any advice. Regards Jan

 June 22, 2005, 01:07 Re: UDF Problem #2 Joey Guest   Posts: n/a The "number" seems do nothing in the UDF. And I can not find anything incorrect. I think there could be something wrong with the code you have not paste here.

 June 22, 2005, 01:36 Re: UDF Problem #3 Jan Guest   Posts: n/a This is all the code I tried at the moment. Okay, here the "number" is still unused, but I wanted to build up my code step by step. But not even this small code is working. I use interpreted UDFs. May that be the problem?

 June 22, 2005, 03:02 Re: UDF Problem #4 Luca Guest   Posts: n/a Hi Jan. I compiled your UDF and there's no problem! I suggest always compiling UDFs even if they are quite simple...Luca

 June 22, 2005, 07:23 Re: UDF Problem #5 Jan Guest   Posts: n/a Thanks for your help. Everything works fine in compiled mode. Regards Jan

 June 27, 2005, 04:05 Re: UDF Problem #6 zubier Guest   Posts: n/a i want to know how to model electric field distribution inside a heating cell using voltage and current (ohmic heating) i need help thanks in advance

 July 9, 2005, 01:00 Re: UDF Problem #7 linzhaowei Guest   Posts: n/a Interpreted UDFs are restricted in the use of the C programming language,but compile not. use interpreted UDFs for small, straightforward functions. use compiled UDFs for complex functions that have a significant CPU requirement (e.g., a property UDF that is called on a per-cell basis every iteration). .

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post Rizwan Fluent UDF and Scheme Programming 32 May 8, 2015 06:05 july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56 mansha goraya FLUENT 0 October 29, 2007 01:31 akr FLUENT 3 August 22, 2007 07:14 chiseung FLUENT 4 January 10, 2002 10:58

All times are GMT -4. The time now is 02:40.

 Contact Us - CFD Online - Top