CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Q-criterion in Tecplot360

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2021, 14:24
Post Q-criterion in Tecplot360
  #1
New Member
 
ioannis filippou
Join Date: Nov 2021
Posts: 8
Rep Power: 5
john filippou is on a distinguished road
Hello everyone, i want to make clear that i am pretty new to CFD so my question might be idiotic.
I am using tecplot360 in order to make a 3D plot of the wake behind a wind turbine and more precisely i want to model the vorticity.

I have a ".dat" file and i want to load it with the PLOT3D loader in order to calculate the Q-criterion since i read online that this variable is available only in this loader.
So my question is how do i convert the .dat file into a file type that can be loader with the PLOT3D loader.
Thank you in advance.
john filippou is offline   Reply With Quote

Old   November 24, 2021, 00:51
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
From where does this ".dat" file originate? .dat is not a standardized format and is informally recognized as a text file with data in it.


Can't help you with PLOT3D if you are asking how to use PLOT3D. But Q-criterion can be calculated using tecplot tools.
LuckyTran is offline   Reply With Quote

Old   November 24, 2021, 06:25
Default
  #3
New Member
 
ioannis filippou
Join Date: Nov 2021
Posts: 8
Rep Power: 5
john filippou is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
From where does this ".dat" file originate? .dat is not a standardized format and is informally recognized as a text file with data in it.


Can't help you with PLOT3D if you are asking how to use PLOT3D. But Q-criterion can be calculated using tecplot tools.
The thing is that q-criterion is only available in tecplot when you load your data with PLOT3D loader.

My .dat file originates from a gfortran code that i am running (lifting line method) and it contains the velocity field in the wake of a wind turbine.

So what i want to do is calculate Q.

What i have achieved so far is to calculate lambda2, which is an alternative to the Q, through a specified set of equations by the use of the second (in magnitude) eigenvalue.

There are two ways to go about using the Q criterion.
1) Manage to load my input file with PLOT3D and use the calculate variables tab (Q-criterion variable)
2) Change the equations set that are used for the lambda2 criterion to make them calculate Q.


Any ideas on how to do one of those two alternatives?
Thank you in advance
john filippou is offline   Reply With Quote

Old   November 24, 2021, 11:59
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Or... you know, you could just calculate it. I saw in another thread (rant: why do people always do this!?) that you were looking for the macro to do this...

Here is the download link for Qcriterion.mcr


If you can calculate lambda-2, you can calculate Q-criterion. Actually you calculate something very closely related to Q-criterion along the way to get lambda-2.
LuckyTran is offline   Reply With Quote

Old   November 24, 2021, 17:50
Default
  #5
New Member
 
ioannis filippou
Join Date: Nov 2021
Posts: 8
Rep Power: 5
john filippou is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Or... you know, you could just calculate it. I saw in another thread (rant: why do people always do this!?) that you were looking for the macro to do this...

Here is the download link for Qcriterion.mcr


If you can calculate lambda-2, you can calculate Q-criterion. Actually you calculate something very closely related to Q-criterion along the way to get lambda-2.

I found the equations for Q-criterion. By the way the link you sent does not work.
john filippou is offline   Reply With Quote

Old   November 24, 2021, 19:18
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Try copying the link into your browser directly. Check pop up blockers. Try another browser. I don't know why the internet doesn't work for you.
LuckyTran is offline   Reply With Quote

Old   November 24, 2021, 19:20
Default
  #7
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Heck I dump the scipt here. All rights reserved by their owners.



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|]
LuckyTran is offline   Reply With Quote

Old   November 25, 2021, 05:39
Default
  #8
New Member
 
ioannis filippou
Join Date: Nov 2021
Posts: 8
Rep Power: 5
john filippou is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Heck I dump the scipt here. All rights reserved by their owners.



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|]
That is really nice of you and thank you but as i mentioned earlier i got the equations for the Q criterion. Comparing my own with yours at the moment. Thank you for your time again.
These are the ones that i have
{Ω}= (0.5*{dudy}-0.5*{dvdx})**2+(0.5*{dudz}-0.5*{dwdx})**2+
(0.5*{dvdx}-0.5*{dudy})**2+(0.5*{dvdz}-0.5*{dwdy})**2+
(0.5*{dwdx}-0.5*{dudz})**2+(0.5*{dwdy}-0.5*{dvdz})**2
{S}={dudx}**2+(0.5*{dvdx}+0.5*{dudy})**2+(0.5*{dwd x} +0.5*{dudz})**2+
(0.5*{dvdx}+0.5*{dudy})**2+{dvdy}**2+(0.5*{dwdy}+0 .5*{dvdz})**2 +
(0.5*{dwdx}+0.5*{dudz})**2+(0.5*{dwdy}+0.5*{dvdz}) **2+{dwdz}**2
{Q}=0.5*({Ω} - {S})

Last edited by john filippou; November 25, 2021 at 08:14.
john filippou is offline   Reply With Quote

Old   November 25, 2021, 16:20
Default
  #9
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I don't understand this tone. They're not my equations. If you have an issue then take it up with tecplot. I don't work for tecplot.
LuckyTran is offline   Reply With Quote

Old   November 25, 2021, 17:09
Default
  #10
New Member
 
ioannis filippou
Join Date: Nov 2021
Posts: 8
Rep Power: 5
john filippou is on a distinguished road
What is weird about my tone? I just said thank you for taking the time to answer and even post the equations. Its all good.
john filippou is offline   Reply With Quote

Old   December 10, 2021, 05:40
Default
  #11
New Member
 
Join Date: Jan 2015
Posts: 19
Rep Power: 11
el_mojito is on a distinguished road
Quote:
Originally Posted by john filippou View Post
The thing is that q-criterion is only available in tecplot when you load your data with PLOT3D loader.

That's not correct. You can calculate the Q-criterion under "Analyze" -> "Calculate variables" no matter the data format of the file (since Tecplot 2017R2).
Why should the data format matter anyway?
el_mojito is offline   Reply With Quote

Old   December 14, 2021, 07:45
Default
  #12
New Member
 
ioannis filippou
Join Date: Nov 2021
Posts: 8
Rep Power: 5
john filippou is on a distinguished road
Well Q-criterion does not appear in the list of variables..i solved the issue via the qcriterion equations. Thank you anyway
john filippou 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
[General] 3D plot Q criterion Ursmooth ParaView 1 November 25, 2021 15:42
problem with Min/max rho tH3f0rC3 OpenFOAM 8 July 31, 2019 10:48
Stopping criterion for outer iteration loop luftraudi Main CFD Forum 3 February 22, 2017 09:59
Asymptotic stopping criterion is not working rob50904 STAR-CCM+ 2 January 28, 2013 09:25
convergence criterion Dominique FLUENT 5 November 24, 2006 03:36


All times are GMT -4. The time now is 22:26.