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

Help with Fluent Expressions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2020, 06:28
Default Help with Fluent Expressions
  #1
New Member
 
John Mayor
Join Date: Feb 2020
Posts: 1
Rep Power: 0
jm623 is on a distinguished road
Hi

Im conducting a transient analysis as part of my final year project on a bimetallic strip heat capture device.The model comprises of only the strip (made from two materials) inside a domain with an inlet and outlet for cooling.The strip is heated from the bottom applied as a temp to the bottom faces, and then cooled by a blast of air from the front. The aim is to investigate how fast different materials can react to various temperature changes. I have the model set up and it works as expected with static inputs. However, i need to write an expression so that when the strip reaches a certain average temperature, the inlet velocity will 'switch on' or increase to a certain velocity and cool the strip.

An ANSYS tutorial (http://storage.ansys.com/webinar/190502-0716.mp4) does almost the same thing @28:56 except I'm changing the input velocity at a certain temp instead of heating a face. However with my setup it always seems to return the 'false' part of the IF statement. Ive setup up a few reports to try monitor the average temp of the strip so i can see the 'air on' temperature being reached, and also one to view the velocity of the inlet so i can see whether it is being changed to the 'air on' velocity.

The expression InletVelocity is used to switch 'on' or 'off' the airflow and is used in the velocity magnitude field of the inlet. AirOn and AirOff are constant values on 2m/s and 0.001 m/s respectively, InletTemp and StripTemp are also constants of 300K and 472.15K. All expressions minus InletVelocity seem to working and are inputing values into the correct places.



https://imgur.com/a/jGea9kf


Does anybody have any idea why its failing to change velocity to the 'AirOn' velocity when the temp is over 300K?

I can provide a link to the archived analysis if anybody is wiling to take a look, if nothing seems wrong from the code provided.

Thank you very much for reading i will await your answers, cheers!
jm623 is offline   Reply With Quote

Old   February 13, 2020, 10:53
Default Max or Min
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Since expressions are rather new, most of the users are not very experienced with their behavior in Fluent. The expression looks alright but to debug, could you try using either min or max function instead of average?
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   February 13, 2020, 11:31
Default
  #3
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,672
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Try hard-coding the boolean true in order to force it to execute the true-IF branch and this should force it to use the AirOn, e.g. IF(true,AirOn,AirOff)

My concern is nested expressions. Instead of IF(blahblah,AirOn,AirOff) try hard-coding the values, e.g. IF(blahblah,2,0,001)


Finally, try putting names in string quotes. IF(blahblah,"AirOn","AirOff")
LuckyTran is offline   Reply With Quote

Reply


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
CFX vs. FLUENT turbo CFX 4 April 13, 2021 08:08
Two questions on Fluent UDF Steven Fluent UDF and Scheme Programming 7 March 23, 2018 03:22
heat transfer with RANS wall function, over a flat plate (validation with fluent) bruce OpenFOAM Running, Solving & CFD 6 January 20, 2017 06:22
batch mode fluent - beginner CompIng FLUENT 1 November 30, 2015 11:48
Problems in lauching FLUENT Lourival FLUENT 3 January 16, 2008 16:48


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