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

Scheme - output temperature as an input + increment

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2020, 08:52
Cool Scheme - output temperature as an input + increment
  #1
New Member
 
Radomir Filip
Join Date: Jan 2020
Posts: 4
Rep Power: 6
rydol is on a distinguished road
Dear all,

I'm standing in front of following problem during my transient simulation: I wanna define input temperature as an output temperature + some constant increment.

I have done something like this so far :

Defining a variable tout = outlet temperature + increment (400), then using that variable to define boundary conditions

(rp-var-define 'tout' float #f ((pick-a-real "rep/surface/area-weighted-avg 10, temperature n") + 400))
(ti-menu-load-string "define/boundary-conditions mass-flow-inlet inlet yes yes no 10 no tout no 0 no yes")


ofcourse this doesnt work, so I'm not sure if this approch is valid or if I'm just struggling with syntaxes.

I would appreciate any helpful comments.
rydol is offline   Reply With Quote

Old   January 9, 2020, 00:55
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
(ti-menu-load-string "define/boundary-conditions mass-flow-inlet inlet yes yes no 10 no ~a no 0 no yes"(rpgetvar 'tout))
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 9, 2020, 05:36
Default
  #3
New Member
 
Radomir Filip
Join Date: Jan 2020
Posts: 4
Rep Power: 6
rydol is on a distinguished road
Dear Alexander,

thank you for your comment, I used your suggested modification as:

(rp-var-define 'tout' ((pick-a-real "rep/surface/area-weighted-avg outlet, temperature n") + 400))
(ti-menu-load-string "define/boundary-conditions mass-flow-inlet inlet yes yes no 68 no ~a no 0 no yes"(rpgetvar 'tout))

Nevertheless I'm still getting this error message:

Error: eval: unbound variable
Error Object: t

I guess the problem is in definition of variable tout, but I wasn't able to troubleshoot it, since the syntax of the scheme language remains mystery for me.

I would appreciate any help
rydol is offline   Reply With Quote

Old   January 9, 2020, 06:53
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
(ti-menu-load-string (format #f "(define (make-new-rpvar name default type)(if (not (rp-var-object name))(rp-var-define name default type #f)))"))
(ti-menu-load-string (format #f "(make-new-rpvar 'tout 273.15 'real)"))
(rpsetvar 'tout (+ (pick-a-real "rep/surface/area-weighted-avg outlet () temperature no") 400))
(ti-menu-load-string (format #f "(define/boundary-conditions mass-flow-inlet inlet yes yes no 68 no ~a no 0 no yes" (rpgetvar 'tout))))
rydol likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 9, 2020, 07:47
Default
  #5
New Member
 
Radomir Filip
Join Date: Jan 2020
Posts: 4
Rep Power: 6
rydol is on a distinguished road
Dear Alexander,

Thanks a lot! It seems to be working, just had to delete some extra brackets in the last term.
rydol is offline   Reply With Quote

Reply

Tags
inlet temperature, scheme language


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
increment in temperature of two-phase flow farhad-j Fluent Multiphase 0 December 2, 2019 06:59
How to input time varying temperature condition in ansys steady state thermal ashwin7588 ANSYS 1 July 20, 2015 05:19
[OpenFOAM] Paraview 3.98 - errors when saving geometry file pajot ParaView 1 September 28, 2013 11:45
airfoil design- input x and CP. output y OR input Qspec gcjin07 Main CFD Forum 3 April 28, 2011 18:01
How to input the wall temperature b.c.? Jimmy Siemens 9 March 14, 2008 10:31


All times are GMT -4. The time now is 21:09.