CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > Tecplot

multiple conditions for an if

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2015, 04:10
Default multiple conditions for an if
  #1
New Member
 
Simon Harbeke
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Hoyskipoyski is on a distinguished road
Hey.
i a wrote a macrofunction to get my variables into a desired order. This functions should only be executed if the existing variables aren't in that order. In order to control that i would like to have an $!IF with multiple conditions, like:

$!If ("|VARNAME[4]|" != "Density")||("|VARNAME[5]|" != "VelocityX")
$!RUNMACROFUNCTION "sort_vars"
$!EndIf

Unfortunately this doesn't work no matter in which combination it put brackets around the whole and/or the single conditions. One condition alone works just fine.
Perhaps anyone of you already worked around a similar problem?
I think there should be some way work around because without being able to implement multiple conditions the logic operator AND and OR would be unnecessary. Maybe using like a temporary boolean variable that evaluates the logic expression in advance?
Thanks for any help or advice! I'm still pretty new to Tecplot scripting.
Hoyskipoyski is offline   Reply With Quote

Old   May 29, 2015, 14:50
Default
  #2
New Member
 
Simon Harbeke
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Hoyskipoyski is on a distinguished road
I worked around with multiple elseif conditions. Not the best solution in my oppinion but tecplot scripting doesn't seem to support such thing as i originally intended to do.
Hoyskipoyski 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
Modeling a Fan by the Multiple reference frame (MRF) method in CFX. saisanthoshm88 CFX 11 February 17, 2021 12:30
[blockMesh] Multiple boundary conditions in one block EOC OpenFOAM Meshing & Mesh Conversion 13 November 3, 2020 02:26
Axial Fan boundary conditions HVLS Siemens 1 June 4, 2012 17:59
Fluent fan boundary conditions. aqstax FLUENT 0 April 6, 2012 01:44
initial conditions in multiple zones Ryan FLUENT 0 July 21, 2006 14:46


All times are GMT -4. The time now is 01:03.