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

Data comparision using 'if' for tecplot macros

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 17, 2012, 23:53
Default Data comparision using 'if' for tecplot macros
  #1
oth
New Member
 
othniel manikonda
Join Date: Apr 2012
Posts: 2
Rep Power: 0
oth is on a distinguished road
Hi,

I've written a macro for comparing my output data to a constant value. My output file is a 3-dimensional block type data. In total there are 120 zones and 19 variables. I want to compare each and every point from all the zones with a constant value. I'm trying to compare the variables value like this :

$!LOOP |var|
----
----
$!LOOP |zone|
----
----
$!IF |V|var|[|zone|](i,j,k)| == 1
$!ALTERDATA
----
----
$!ENDIF
$!ENDLOOP
$!ENDLOOP

var - variable number ;
zone - zone number;
i,j,k - indexes of an arbitrary point;

but it's saying that's not the correct format etc.

Could someone help me with this?

Thanks,
Othniel
oth is offline   Reply With Quote

Old   April 18, 2012, 01:04
Default
  #2
Member
 
SergeAS's Avatar
 
Serge A. Suchkov
Join Date: Oct 2011
Location: Moscow, Russia
Posts: 74
Blog Entries: 5
Rep Power: 6
SergeAS is on a distinguished road
Send a message via Skype™ to SergeAS
Quote:
Originally Posted by oth View Post
Hi,

I've written a macro for comparing my output data to a constant value. My output file is a 3-dimensional block type data. In total there are 120 zones and 19 variables. I want to compare each and every point from all the zones with a constant value. I'm trying to compare the variables value like this :

$!LOOP |var|
----
----
$!LOOP |zone|
----
----
$!IF |V|var|[|zone|](i,j,k)| == 1
$!ALTERDATA
----
----
$!ENDIF
$!ENDLOOP
$!ENDLOOP

var - variable number ;
zone - zone number;
i,j,k - indexes of an arbitrary point;

but it's saying that's not the correct format etc.

Could someone help me with this?

Thanks,
Othniel
In your case I would first apply the operation "Value Blanking"
__________________
OpenHyperFLOW2D Project
SergeAS is offline   Reply With Quote

Old   April 18, 2012, 01:18
Default
  #3
oth
New Member
 
othniel manikonda
Join Date: Apr 2012
Posts: 2
Rep Power: 0
oth is on a distinguished road
Hi,

Thanks for the reply. Actually I can understand what you are saying. If we use 'value blanking' we can eliminate data which we don't need, but in this case I want to further modify the data after comparison with the constant value. Like, I want to count the number of data points whose value is equal to 1. I would like to know how to correctly use the IF statement there.

Thanks,
Othniel
oth is offline   Reply With Quote

Old   April 18, 2012, 02:21
Default
  #4
Member
 
SergeAS's Avatar
 
Serge A. Suchkov
Join Date: Oct 2011
Location: Moscow, Russia
Posts: 74
Blog Entries: 5
Rep Power: 6
SergeAS is on a distinguished road
Send a message via Skype™ to SergeAS
Quote:
Originally Posted by oth View Post
Hi,

I want to count the number of data points whose value is equal to 1.

Thanks,
Othniel
In this case the best way (ImHO) it is use "Integrate" option.
__________________
OpenHyperFLOW2D Project
SergeAS is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 12 May 2, 2013 10:52
export data at nodes Meenu FLUENT 1 December 30, 2011 02:24
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
accessing solver data with UDF macros Dushan FLUENT 0 October 4, 2006 01:39
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27


All times are GMT -4. The time now is 11:49.