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

UDF: using if

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 17, 2009, 05:45
Default UDF: using if
  #1
New Member
 
Join Date: Apr 2009
Posts: 10
Rep Power: 16
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, 05:56
Default
  #2
Member
 
O.D.Y.'s Avatar
 
Join Date: Mar 2009
Posts: 49
Rep Power: 17
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, 06:02
Default
  #3
New Member
 
Join Date: Apr 2009
Posts: 10
Rep Power: 16
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 Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 08:37
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 22:38
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 12: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 22:17.