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

Time Averaged Data (for flow field) TECPLOT

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By JMcGarry

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2015, 08:23
Default Time Averaged Data (for flow field) TECPLOT
  #1
New Member
 
Join Date: May 2015
Posts: 2
Rep Power: 0
biancab is on a distinguished road
Hi there,

I am using Tec360 EX15. Trying to archieve a time-averaged variable I loaded data from different timesteps into Tecplot. Then I tried to specify an equation. Due to having a lot of zones I wrote a Macro:
"
#!MC 1400

$!VarSet |NUMAVG| = (|NUMZONES|-1)

$!Loop |NUMAVG|
$!AlterData
Equation = "V21 = V6 + V6[|LOOP|]"
$!EndLoop

$!AlterData[|NUMZONES|]
Equation = "V22 = V6/|NUMAVG|"

But it gives me the error:
"Incompatible zones referenced in equation...V21 = V6 +V6[1]
"
so does this mean it only reads in 1 zone??

Could somebody please help me :/
Best regards
biancab is offline   Reply With Quote

Old   October 5, 2015, 18:17
Default RE: Time Averaged Data (for flow field) TECPLOT
  #2
New Member
 
Jared McGarry
Join Date: Jul 2015
Location: Bellevue, WA
Posts: 3
Rep Power: 11
JMcGarry is on a distinguished road
Hello BiancaB,

I believe the issue was with defining V21 as a function of V6 for all zones summed with V6 for a specific zone ( V6[|LOOP|] ). Also, if you want to find the sum, you must set the sum variable as the addition of the previous sum variable in the loop and the desired variable for that zone in the loop. You can also run in to this error if V21 or V22 have not already been defined. To avoid this, it is often safer to create new variables based on a specific name rather than on variable number.


Below is a macro that will, based on your chosen variable (in this case V6), create two new variables for the sum {sum_V6} and average {avg_V6}:


#!MC 1400

$!VarSet |NUMAVG| = (|NUMZONES|)


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

$!Loop |NUMAVG|
$!AlterData
EQUATION = '{sum_V6} = {sum_V6} + V6[|LOOP|]'
$!EndLoop

$!AlterData[|NUMZONES|]
Equation = '{avg_V6} = {sum_V6}/|NUMZONES|'



Let me know if this helps!


Jared



Technical Support Specialist

Web: www.tecplot.com
scott_rumage likes this.

Last edited by JMcGarry; October 22, 2015 at 17:41.
JMcGarry is offline   Reply With Quote

Old   August 9, 2016, 09:18
Default
  #3
Senior Member
 
Manu Chakkingal
Join Date: Feb 2016
Location: Delft, Netherlands
Posts: 129
Rep Power: 10
manuc is on a distinguished road
Hi

WHat if the time steps are not equal. Can tecplot handle that with time weighted average
__________________
Regards
Manu
manuc is offline   Reply With Quote

Old   November 30, 2016, 12:49
Default
  #4
New Member
 
Peng Yang
Join Date: Nov 2016
Posts: 3
Rep Power: 9
yp1990 is on a distinguished road
Quote:
Originally Posted by biancab View Post
Hi there,

I am using Tec360 EX15. Trying to archieve a time-averaged variable I loaded data from different timesteps into Tecplot. Then I tried to specify an equation. Due to having a lot of zones I wrote a Macro:
"
#!MC 1400

$!VarSet |NUMAVG| = (|NUMZONES|-1)

$!Loop |NUMAVG|
$!AlterData
Equation = "V21 = V6 + V6[|LOOP|]"
$!EndLoop

$!AlterData[|NUMZONES|]
Equation = "V22 = V6/|NUMAVG|"

But it gives me the error:
"Incompatible zones referenced in equation...V21 = V6 +V6[1]
"
so does this mean it only reads in 1 zone??

Could somebody please help me :/
Best regards
Hi, did you solve this problem? I also encountered the same thing.
yp1990 is offline   Reply With Quote

Old   November 30, 2016, 12:50
Default
  #5
New Member
 
Peng Yang
Join Date: Nov 2016
Posts: 3
Rep Power: 9
yp1990 is on a distinguished road
Quote:
Originally Posted by JMcGarry View Post
Hello BiancaB,

I believe the issue was with defining V21 as a function of V6 for all zones summed with V6 for a specific zone ( V6[|LOOP|] ). Also, if you want to find the sum, you must set the sum variable as the addition of the previous sum variable in the loop and the desired variable for that zone in the loop. You can also run in to this error if V21 or V22 have not already been defined. To avoid this, it is often safer to create new variables based on a specific name rather than on variable number.


Below is a macro that will, based on your chosen variable (in this case V6), create two new variables for the sum {sum_V6} and average {avg_V6}:


#!MC 1400

$!VarSet |NUMAVG| = (|NUMZONES|)


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

$!Loop |NUMAVG|
$!AlterData
EQUATION = '{sum_V6} = {sum_V6} + V6[|LOOP|]'
$!EndLoop

$!AlterData[|NUMZONES|]
Equation = '{avg_V6} = {sum_V6}/|NUMZONES|'



Let me know if this helps!


Jared



Technical Support Specialist

Web: www.tecplot.com
Thank you! I tried your way, but it still did not go through. I don't know why.
yp1990 is offline   Reply With Quote

Old   November 30, 2016, 12:53
Default
  #6
Senior Member
 
Manu Chakkingal
Join Date: Feb 2016
Location: Delft, Netherlands
Posts: 129
Rep Power: 10
manuc is on a distinguished road
I ran simulation for sometime again ..checked Delta time... Wrote date at that time step times a whole number...and just averaged by number of time steps saved...I couldn't find any other way
__________________
Regards
Manu
manuc is offline   Reply With Quote

Old   November 30, 2016, 13:01
Default
  #7
New Member
 
Peng Yang
Join Date: Nov 2016
Posts: 3
Rep Power: 9
yp1990 is on a distinguished road
Quote:
Originally Posted by manuc View Post
I ran simulation for sometime again ..checked Delta time... Wrote date at that time step times a whole number...and just averaged by number of time steps saved...I couldn't find any other way
Thank you!
yp1990 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
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 03:20
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 15:06
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 05:35
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58


All times are GMT -4. The time now is 04:41.