CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Tecplot (https://www.cfd-online.com/Forums/tecplot/)
-   -   Some problem of "Qcriterion.mcr& (https://www.cfd-online.com/Forums/tecplot/127583-some-problem-qcriterion-mcr.html)

yuyuxuan December 15, 2013 02:30

Some problem of "Qcriterion.mcr&
 
I load the fluent "*.cas and *.dat" and then play the macro in http://download.tecplot.com/macros/Qcriterion.mcr

But it shows "enter the variable number"

What the variable number means? is it the nodes number of my own structure or the range of the x axis or the number of points need to paint. I don't know.

http://i730.photobucket.com/albums/w...TextString.jpg

So I ask for help.

scott_rumage December 16, 2013 11:33

I believe the macro is looking to confirm (and match-up) the name of the variable of velocity in the x direction (typically labeled U). The macro will also go on to ask for the name of the variable in the y & z direction (typically labeled V & W).

yuyuxuan December 18, 2013 06:22

Quote:

Originally Posted by scott_rumage (Post 466683)
I believe the macro is looking to confirm (and match-up) the name of the variable of velocity in the x direction (typically labeled U). The macro will also go on to ask for the name of the variable in the y & z direction (typically labeled V & W).

Thanks for replying
I do the following to type
http://i730.photobucket.com/albums/w...TextString.jpg

But it gives the error.

http://i730.photobucket.com/albums/w..._003_Error.jpg

I give the code

Code:

#!MC 1400
# Created by Tecplot 360 build 14.0.2.35002

$!ALTERDATA
  EQUATION = '{Q} = 0'

$!VarSet |NUMVARSINIT| = |NUMVARS|
$!VarSet |NUMVARSINIT| += 1

$!PROMPTFORTEXTSTRING |U|
INSTRUCTIONS = "Enter the variable number for U"
$!PROMPTFORTEXTSTRING |V|
INSTRUCTIONS = "Enter the variable number for V"
$!PROMPTFORTEXTSTRING |W|
INSTRUCTIONS = "Enter the variable number for W"

$!GLOBALTHREEDVECTOR UVAR = |U|
$!GLOBALTHREEDVECTOR VVAR = |V|
$!GLOBALTHREEDVECTOR WVAR = |W|


$!ALTERDATA
  EQUATION = '{dudx} = ddx(u)'
$!ALTERDATA
  EQUATION = '{dvdx} = ddx(v)'
$!ALTERDATA
  EQUATION = '{dwdx} = ddx(w)'
$!ALTERDATA
  EQUATION = '{dudy} = ddy(u)'
$!ALTERDATA
  EQUATION = '{dvdy} = ddy(v)'
$!ALTERDATA
  EQUATION = '{dwdy} = ddy(w)'
$!ALTERDATA
  EQUATION = '{dudz} = ddz(u)'
$!ALTERDATA
  EQUATION = '{dvdz} = ddz(v)'
$!ALTERDATA
  EQUATION = '{dwdz} = ddz(w)'
$!ALTERDATA
  EQUATION = '{s11} = {dudx}'
$!ALTERDATA
  EQUATION = '{s12} = 0.5*({dudy}+{dvdx})'
$!ALTERDATA
  EQUATION = '{s13} = 0.5*({dudz}+{dwdx})'
$!ALTERDATA
  EQUATION = '{s22} = {dvdy}'
$!ALTERDATA
  EQUATION = '{s23} = 0.5*({dvdz}+{dwdy})'
$!ALTERDATA
  EQUATION = '{s33} = {dwdz}'
$!ALTERDATA
  EQUATION = '{Omga12} = 0.5*({dudy}-{dvdx})'
$!ALTERDATA
  EQUATION = '{Omga13} = 0.5*({dudz}-{dwdx})'
$!ALTERDATA
  EQUATION = '{Omga23} = 0.5*({dvdz}-{dwdy})'
$!ALTERDATA
  EQUATION = '{s2o2_11} = {s11}**2 + {s12}**2 + {s13}**2 - {Omga12}**2 - {Omga13}**2'
$!ALTERDATA
  EQUATION = '{s2o2_12} = {s11}*{s12} + {s12}*{s22} + {s13}*{s23} - {Omga13}*{Omga23}'
$!ALTERDATA
  EQUATION = '{s2o2_13} = {s11}*{s13} + {s12}*{s23} + {s13}*{s33} - {Omga12}*{Omga23}'
$!ALTERDATA
  EQUATION = '{s2o2_22} = {s12}**2 + {s22}**2 + {s23}**2 - {Omga12}**2 - {Omga23}**2'
$!ALTERDATA
  EQUATION = '{s2o2_23} = {s12}*{s13} + {s22}*{s23} + {s23}*{s33} - {Omga12}*{Omga13}'
$!ALTERDATA
  EQUATION = '{s2o2_33} = {s13}**2 + {s23}**2 + {s33}**2 - {Omga13}**2 - {Omga23}**2'
$!ALTERDATA
  EQUATION = '{Q} = 2*{Omga12}**2 + 2*{Omga13}**2 + 2*{Omga23}**2 - {S11}**2 - {S22}**2 - {S33}**2 - 2*{S12}**2 - 2*{S13}**2 - 2*{S23}**2'

$!VarSet |NUMVARSFIN| = |NUMVARS|
$!DELETEVARS [|NUMVARSINIT|-|NUMVARS|]


scott_rumage December 19, 2013 14:22

I have another suggestion that I would like you to try. In Tecplot 360’s top menu line click on “Data” the “Data Set Info..”. A table of variables will appear. From that list there will be a number associated to the x-velocity (and y & z velocity), it may be something like “4: x-velocity, 5: y-velocity, 6: z-velocity”. It is this number that the macro may be seeking for the variable number.

So at the macro prompt, enter the variable number that is next to x-velocity variable name. In this example is would be 4 for U.

yuyuxuan December 20, 2013 21:17

Quote:

Originally Posted by scott_rumage (Post 467092)
I have another suggestion that I would like you to try. In Tecplot 360’s top menu line click on “Data” the “Data Set Info..”. A table of variables will appear. From that list there will be a number associated to the x-velocity (and y & z velocity), it may be something like “4: x-velocity, 5: y-velocity, 6: z-velocity”. It is this number that the macro may be seeking for the variable number.

So at the macro prompt, enter the variable number that is next to x-velocity variable name. In this example is would be 4 for U.

Forgive my late response because I try it. You are right. It's the No. before the variable name. and for example, if there are 38 variables and I enter the 49, it will error. And if I enter 5(the velocity number). It is Ok, Thank you very much.:D You solve my question.

Светлана January 9, 2014 19:55

Thanks for cross-posting.

Azy May 26, 2014 14:46

invalid macro file header
 
hello every one,

I just try this macro in tecplot 360, it comes up with this error, I dont know how to fix it, is anybody could help me about it?

thanks,

hxaxtma September 22, 2014 13:04

type in the number of the variable,

lookt it up at data->data set info

Durrell4 September 23, 2014 11:53

Q-criteria and Lambda 2 improvements
 
Hi All,

We will be making the q-criteria and Lambda 2 available later this year in the main interface of Tecplot 360 EX to improve the ease of use. I would recommend that you join our beta program at the link below to be among the 1st to try the new technology.

http://www.tecplot.com/my/be-a-beta-tester/

also check the whitepaper on vortex topography here: http://download.tecplot.com/docs/Som..._Revisited.pdf

Durrell

swethaprakash February 12, 2016 03:27

Qcriterion.mcr
 
Thanks a lot for this thread.. Helped me a lot..:)


All times are GMT -4. The time now is 00:48.