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

UDF: using if

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 17, 2009, 04:45
Default UDF: using if
  #1
New Member
 
Join Date: Apr 2009
Posts: 10
Rep Power: 8
lucioantonio is on a distinguished road
dear to all,

i'm trying to use the "if" command in an UDF.
when i interpreted the UDF by Fluent, it wrote:
"invalid expression type for if: double."

the line of the error is the first of this group:

if (Tg=0)
Kr=0;
else {
Kr=qrnet/(Tg);
}

Kr,qrnet,Tg were declared as real.
can someone help me?
best regards to all
lucioantonio is offline   Reply With Quote

Old   April 17, 2009, 04:56
Default
  #2
Member
 
O.D.Y.'s Avatar
 
Join Date: Mar 2009
Posts: 49
Rep Power: 8
O.D.Y. is on a distinguished road
hi,

I think you is the if-question! you assign 0 to Tg, but I think the boolean expression is supposed to be:

if (tg == 0.0)

cheers
O.D.Y. is offline   Reply With Quote

Old   April 17, 2009, 05:02
Default
  #3
New Member
 
Join Date: Apr 2009
Posts: 10
Rep Power: 8
lucioantonio is on a distinguished road
Quote:
Originally Posted by O.D.Y. View Post
hi,

I think you is the if-question! you assign 0 to Tg, but I think the boolean expression is supposed to be:

if (tg == 0.0)

cheers

oh!... it's right!!!... i can't say with words how much i am grateful...
thanks a lot!!!

best regards!
lucioantonio 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
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 01:27
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 14:35.