CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Why are the rotational transformation tensors in transform.H transposed?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2020, 10:58
Default Why are the rotational transformation tensors in transform.H transposed?
  #1
Member
 
Join Date: Sep 2018
Posts: 53
Rep Power: 7
tecmul is on a distinguished road
Hi all,
The rotational transformation tensors in transform.H seem to be the transpose of the actual transformation tensors.
For example:
Code:
//- Rotational transformation tensor about the z-axis by omega radians
inline tensor Rz(const scalar& omega)
{
    const scalar s = sin(omega);
    const scalar c = cos(omega);
    return tensor
    (
        c,  s,  0,
       -s,  c,  0,
        0,  0,  1
    );
}
This is the rotational transformation tensor around the z-axis.
\begin{bmatrix}
\cos \theta & -\sin \theta & 0 \\
\sin \theta & \cos \theta & 0 \\
0 & 0 & 1 \\
\end{bmatrix}

I checked multiple versions of OpenFoam and they all do the same thing. Why is this?
tecmul is offline   Reply With Quote

Old   October 29, 2020, 10:36
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by tecmul View Post
Hi all,
The rotational transformation tensors in transform.H seem to be the transpose of the actual transformation tensors.
...
I checked multiple versions of OpenFoam and they all do the same thing. Why is this?

It is best phrased as a question of perspective. Does the transform represent how to get from a global coordinate orientation to a local coordinate orientation, or how to get from a local coordinate orientation to a global one?


If you can be content with "transform" meaning "how do I transform to get everything into the global reference?", it seems OK.


The axesRotation.C might make the local/global relationship clearer.

https://develop.openfoam.com/Develop...otation.C#L128
olesen is offline   Reply With Quote

Old   October 29, 2020, 12:09
Default
  #3
Member
 
Join Date: Sep 2018
Posts: 53
Rep Power: 7
tecmul is on a distinguished road
Quote:
Originally Posted by olesen View Post
It is best phrased as a question of perspective. Does the transform represent how to get from a global coordinate orientation to a local coordinate orientation, or how to get from a local coordinate orientation to a global one?
Ah, I think I understand now. I was thinking in terms of transforming a vector, not the coordinate system. Thank you very much.
tecmul is offline   Reply With Quote

Reply

Tags
rotation, rotation tensor, transform, transformation tensor


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
Material change during phase transformation (FePO4 > LiFePO4) concentration distribut kimsw0103 CFX 0 January 15, 2016 22:05


All times are GMT -4. The time now is 17:32.