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

Add or subtract two variables in TUI

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 16, 2017, 09:30
Default Add or subtract two variables in TUI
  #1
Member
 
Tarantino
Join Date: Feb 2013
Posts: 46
Rep Power: 13
Tarantino is on a distinguished road
Hello all

I want to do a simple math in TUI as the following:

Code:
(define a pick-a-real "report surface-integrals volume-flow-rate bc1 ,,")
(define b pick-a-real "report surface-integrals volume-flow-rate bc2 ,,")

(- a b)

and I got this error:

Error: - (subtract): invalid argument [1]: wrong type [not a number]
Error Object: #[compound-procedure]



I tried also:

Code:
(rpsetvar 'x (pick-a-real "report surface-integrals volume-flow-rate bc1 ,,"))
(rpsetvar 'y (pick-a-real "report surface-integrals volume-flow-rate bc2 ,,"))

(- x y)

and I got this error:

Error: eval: unbound variable
Error Object: x


Anyone know what is the problem and how can I fix it?
Thanks.
Tarantino is offline   Reply With Quote

 


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
How to add a new variable in the list of variables for MESH ADAPTATION ?? Tramery CFX 3 September 28, 2011 10:27
diffusion Term for add. Variable Zaktatir CFX 9 July 16, 2011 09:51
How to limit a variable ash OpenFOAM Running, Solving & CFD 1 June 26, 2008 20:32
Problem in installation of OpenFOAM sachin OpenFOAM Installation 7 January 22, 2008 01:40
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 04:27


All times are GMT -4. The time now is 08:56.