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

Rotating 2D mesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 31, 2017, 06:26
Default Rotating 2D mesh
  #1
Member
 
Emre
Join Date: Nov 2015
Location: Izmir, Turkey
Posts: 58
Rep Power: 4
ordinary is on a distinguished road
Hello,

I'm trying to rotate my 2D mesh by centroid of the object. (i.e. I'm yawing it 50 degrees)

Code:
surfaceTransformPoints -rollPitchYaw (0 0 50) old.stl new.stl
Unfortunately it rotates the object by global coordinate system. Here it is:

yaw.png


I tried to change relevant source code below, but it seems confusing:

Code:
    else if (args.optionFound("rollPitchYaw"))
    {
        vector v(args.optionLookup("rollPitchYaw")());

        Info<< "Rotating points by" << nl
            << "    roll  " << v.x() << nl
            << "    pitch " << v.y() << nl
            << "    yaw   " << v.z() << endl;


        // Convert to radians
        v *= pi/180.0;

        quaternion R(v.x(), v.y(), v.z());

        Info<< "Rotating points by quaternion " << R << endl;
        points = transform(R, points);
    }
If you have any idea, please do not hesitate to reply.
Thank you.
ordinary is offline   Reply With Quote

Reply

Tags
rollpitchyaw, rotating, surfacetransformpoints

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
Star CCM Overset Mesh Error (Rotating Turbine) thezack Siemens 7 October 12, 2016 11:14
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38
[ICEM] Rotating Mesh and export Mesh ahmadreza ANSYS Meshing & Geometry 10 July 12, 2015 04:17
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38


All times are GMT -4. The time now is 13:51.