|
[Sponsors] |
Scheme - output temperature as an input + increment |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 8, 2020, 08:52 |
Scheme - output temperature as an input + increment
|
#1 |
New Member
Radomir Filip
Join Date: Jan 2020
Posts: 4
Rep Power: 6 |
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. |
|
January 9, 2020, 00:55 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
January 9, 2020, 05:36 |
|
#3 |
New Member
Radomir Filip
Join Date: Jan 2020
Posts: 4
Rep Power: 6 |
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 |
|
January 9, 2020, 06:53 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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))))
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 9, 2020, 07:47 |
|
#5 |
New Member
Radomir Filip
Join Date: Jan 2020
Posts: 4
Rep Power: 6 |
Dear Alexander,
Thanks a lot! It seems to be working, just had to delete some extra brackets in the last term. |
|
Tags |
inlet temperature, scheme language |
|
|
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 |