Hi again... I don't know if it can help you, but it may help others searching for the same thing.
First of all, rotations in 3D are very different from rotations in 2D. 3D rotations belong to SO3 group, which is not a vector space, but a manifold. 3D rotations can be parametrized in different ways; a set of 3 or 4 parameters is needed to build the rotational operator. Then, in contrast to the 2D case, 3D rotations are not commutative, and the parameters are often not additive. I know that OpenFOAM can use quaternions to rotate a vector field (I dont know if another set of parameters can be used, the quaternions play the role of your angles). Quaternions are a set a of 4 parameters that parametrize a 3D rotation globally. Since OF is thought to be 3D, you would probably have to use a 3D function and feed it with a 2D rotation parameters. As far as I know, that may not be enough, there is a function called transform such that, passing the quaternion as a parameter you obtain the rotated vector field. This is: Code:
Foam::tmp<Foam::vectorField> Foam::transform |
Thank you very much dear Martin for your answer
|
Quote:
If you have the rotation matrix, you can just do that directly. Eg Code:
tensor rot Code:
tensor rot = axesRotation(axis1, axis2).R(); /mark |
All times are GMT -4. The time now is 08:36. |