Transformation/Rotating a Coordinate Axis

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
Posts: 4
Joined: Wed Nov 06, 2013 12:03 pm
Location: New York

Transformation/Rotating a Coordinate Axis

Postby » Fri Nov 08, 2013 12:41 pm

Hi All,

I'm new to Tecplot (and this forum) but I had a question for a project I am working on. Here is the problem:

I have a rectangular box which rotates about an axis located at the back end of the box. It sweeps through a range of angles (theta) where snapshots of data are taken (at each angle) and then used to calculate the relevant variables. I have a set of computational and experimental data that contains location and flow variables (x,y,z, vorticity, temperature, etc.). Right now the computations resolve the data in an inertial frame.

I am trying to write a Tecplot macro that transforms any variable by the rotation matrix, T(theta,phi), which relates the non-inertial frame to the body frame. This should be able to be done by multiplying the inertial values by the transformation matrix.

For example:
xnew = T11*x + T12*y + T13*z
ynew = T21*x + T22*y + T23*z
znew = T31*x + T32*y + T33*z
vorticitynew = ….
enthalpynew = ….

In this case, the box sweeps through a range of angle theta (0 : pi/30 : 2pi/3) and calculates values at each angle theta.

Does anyone have any suggestions as to how I could write this? I also looked into recording a macro and using that but I'm not quite sure how to do that either. Any help would be appreciated. Also, if anyone knows of any sites/ways to learn Tecplot (and its macros) quickly, I'd love to use them since I'm having a little trouble learning it.

Thank you!

Posts: 93
Joined: Sun Dec 22, 2013 3:08 pm
Location: Australia

Re: Transformation/Rotating a Coordinate Axis

Postby Svetlana » Thu Jan 09, 2014 4:33 pm

Do ROTATE3DVIEW, ROTATE2DDATA, TRANSFORMCOORDINATES in the scripting guide appear to be of interest?

Return to “Tecplot Macro Language”

Who is online

Users browsing this forum: No registered users and 13 guests