Contours on contours

Tecplot's automation language

Python scripts were supported in the alpha version for Legacy 360 (2013). Python inquiries in 2017 should be directed to the PyTecplot Forum.

Moderators: davetaflin, salter, steve, jprenaud, straton, Chris Idso

morten
Newbie
Posts: 5
Joined: Mon Jun 25, 2012 5:16 am
Location: Denmark

Contours on contours

Postby morten » Tue Nov 27, 2012 5:19 am

Hi guys,
I want to find stationary points of a 2d flow. I am trying to do this by making a contour with u=0 and then create a new zone from this. Then, I will make a contour on this zone with v=0 and these points are then the stationary points. The problem is that for the first zone created I cannot plot a new contour. The only visible plot I can make in this zone is the mesh plot.

Cheers
Morten

Chris Idso
Jedi Master
Posts: 249
Joined: Mon Jan 15, 2007 10:07 am
Location: Bellevue, WA
Contact:

Re: Contours on contours

Postby Chris Idso » Tue Nov 27, 2012 8:27 am

Morten,

Not sure what is happening here. Would you please go to Data/Dataset Info and click on the Zone / Variable Info tab and tell us what is displayed in the lower left portion of that dialog? Specifically we need to know what values are shown for I, J, and K.
Chris


Christopher Idso

Tech Support Lead
Tecplot, Inc

morten
Newbie
Posts: 5
Joined: Mon Jun 25, 2012 5:16 am
Location: Denmark

Re: Contours on contours

Postby morten » Wed Nov 28, 2012 2:07 am

Hey Chris,
Thanks for the quick response.

In Data Set Information then Zone/Var Info there is no I,J,K information.

For the original data set it says
Zone Type : FE -Quad
Pts : 359,601
Elem : 358,400

My original data set is made of only square elements.

For the zone extracted from the contour u=0 it says

Zone Type : FE - LineSeg
Pts: 6,467
Elem: 6,452.


/Morten

Chris Idso
Jedi Master
Posts: 249
Joined: Mon Jan 15, 2007 10:07 am
Location: Bellevue, WA
Contact:

Re: Contours on contours

Postby Chris Idso » Wed Nov 28, 2012 8:15 am

Thank you for the additional information.

If I understand correctly, you were hoping to use the contour at u=0 to create a zone which was a subset of your original zone. (Such as all the cells where u <=0).

Tecplot thinks of a contour as the line separating contour color bands. This is what it will show you in the contour legend. So when you extract a contour (Data/Extract menu) you get zones that look like lines, which is why the elements in such a zone are FE LineSeg. LineSeg elements are just lines - they have no area to fill with color, so there is no way to make a contour plot from them. So another approach is needed here.

Instead of extracting a contour line, we suggest using value blanking to blank out the portion of your original zone you do not want to see. Then you can use the CRSFEZ addon (it is under the Tools menu but it needs to be activated before you can use it) to create a finite element zone which is the remainder of your original zone (after blanking).

Then you could extract the points you wanted where v=0 from your new subzone.

To activate the CRSFEZ addon, close out of Tecplot, and go to the folder where Tecplot was installed. Locate the file called tecplot.add and open it in a text editor. Then find the line that says this:

# $!LoadAddon "crsfez" # Extract finite-element sub-zone

and delete the '#' at the beginning of the line. Then save and close the file and restart Tecplot, so it can reread the tecplot.add file. Then the CRSFEZ addon will appear in Tecplot's Tools menu. It is easy to use. You need only to adjust the scale of the X and y axes, or just zoom in/out, so the portion of the plot you want to extract is the only thing you see on the screen. Then jst click the addon and it will extract that portion of your zone for you.
Chris





Christopher Idso



Tech Support Lead

Tecplot, Inc

morten
Newbie
Posts: 5
Joined: Mon Jun 25, 2012 5:16 am
Location: Denmark

Re: Contours on contours

Postby morten » Wed Nov 28, 2012 11:29 pm

Hey again and thanks for the fast and long response.

My overall goal is to identify points in a 2d flow with u=0 and v=0 for many datasets. I have done this 'manually' by plotting the contours u=0 and v=0 and then zooming in where the curves intersect. I would like to automate this. So another approach could be to use a tool to find these intersections automatically.

My previous idea was to make the curve u=0 and on this dataset find v=0 for example by using the contour command again. The result would only be some discrete points.

Since I need u=0 and not u<=0 I am afraid the blanking of the dataset from zooming in is not a handy option in this case.

Chris Idso
Jedi Master
Posts: 249
Joined: Mon Jan 15, 2007 10:07 am
Location: Bellevue, WA
Contact:

Re: Contours on contours

Postby Chris Idso » Thu Nov 29, 2012 7:19 am

Thank you.

A macro can read the data you have loaded into tecplot, and if you extracted a contour line that represented u=0 to a zone then a macro could read the points in that zone too. It could check the values of v for each point in that zone and mark in some way those points which had a value of v close enough to zero to suit you.

But if you want to know the exact coordinates of the point(s) where the contour lines at u=0 and v=0 intersect, then we suggest writing a python script or addon, sincer they would do the work much faster than a macro.
Chris





Christopher Idso



Tech Support Lead

Tecplot, Inc

morten
Newbie
Posts: 5
Joined: Mon Jun 25, 2012 5:16 am
Location: Denmark

Re: Contours on contours

Postby morten » Thu Nov 29, 2012 8:05 am

Ok, to make this robust I should look at sign change of v on the curve u=0. This requires knowledge of how the points in u=0 are connected e.g. I should get the connectivity matrix. Is this accessible?

Chris Idso
Jedi Master
Posts: 249
Joined: Mon Jan 15, 2007 10:07 am
Location: Bellevue, WA
Contact:

Re: Contours on contours

Postby Chris Idso » Thu Nov 29, 2012 1:00 pm

Not in the macro language. You can acess it in an addon or in a python script though.
Chris





Christopher Idso



Tech Support Lead

Tecplot, Inc


Return to “Tecplot Macro Language”

Who is online

Users browsing this forum: No registered users and 2 guests

cron