|
[Sponsors] |
March 2, 2016, 10:52 |
Return a value from TUI
|
#1 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 14 |
Hi!
How can I return a value from TUI? With a TUI command, I get a velocity in a point in my simulation domain and I want to set this value somewhere in my boundaries. Therefore, I need to return this value from TUI to be able to use it. Any idea?! thanks. |
|
March 2, 2016, 11:24 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
What do you mean?
The way I understand what you do: You type a TUI command. For example: Code:
(secretfunctiontogivevelocity) Code:
24.5119 Is this what you want, or is it what you want but you want it to be different? |
|
March 2, 2016, 11:39 |
|
#3 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 14 |
Hello and thanks for your reply.
Let's assume that I got the temperature on point_1 by the following command: Code:
report surface-integrals facet-avg point_1 , temp , Code:
291 Code:
define boundary-conditions inlet ,,,,,,,,, XX ,, Hopefully it is clear now. thanks. |
|
March 2, 2016, 11:51 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
OK, I understand. This is possible, I think, but you have to deal with annoying scheme-code.
To get a number from the TUI as variable, you can use pick-a-real. Code:
(pick-a-real "report surface-integrals facet-avg point_1 , temp ,") Code:
(ti-menu-load-string "define boundary-conditions inlet ,,,,,,,,, XX ,,") Code:
(format #f "define boundary-conditions inlet ,,,,,,,,, ~a ,," 300) Code:
(ti-menu-load-string (format #f "define boundary-conditions inlet ,,,,,,,,, ~a ,," (pick-a-real "report surface-integrals facet-avg point_1 , temp ,"))) |
|
March 3, 2016, 06:05 |
|
#5 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 14 |
Hello again and thanks a lot.
It works perfect. Just one more question. Is it possible to have if statement here in the Scheme? thanks. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add Temperature to multiphaseInterFoam | nthiers | OpenFOAM Programming & Development | 6 | February 17, 2016 09:42 |
Derive fixed number of phase from clone () in multiphaseEulerFoam Solver | Aj Nair | OpenFOAM Programming & Development | 0 | December 16, 2013 21:41 |
Error in CFX Solver | Leuchte | CFX | 5 | November 6, 2010 07:12 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 12:48 |
Define animate using TUI | Zurlugh | FLUENT | 1 | July 24, 2008 09:55 |