|
[Sponsors] |
[mesh manipulation] transformPoints and rotateMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 14, 2021, 10:30 |
rotate a zone
|
#21 |
New Member
|
Hi there, did you find how to rotate a cellZone only?
Many thanks |
|
May 14, 2021, 10:54 |
|
#22 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,695
Rep Power: 40 |
Quote:
If you do have that, then a solution would be to write a small coded function object that calculates the updated point positions for your zone and call that via postProcess. |
||
May 14, 2021, 12:22 |
|
#23 | |
New Member
|
Quote:
Thank you so much for your response, I am still a beginner in OpenFOAM and I have definitely not stated clearly my problem. The cellZone I am referring to is a whole component of an overset mesh, that's why I thought I could rotate it without conflicts. I came across this thread after some days of searching how to solve the problem I have posted in this other thread: Mesh motion control at run-time, not prescribed In a nutshell: I am trying to control the position of an overset mesh at runtime by means of an external controller (e.g. PID). As far as I know, I cannot prescribe the whole motion with tabulated6DoFMotion or any other motion functions available. My idea was to write a program that runs the sim, let's say, for 10 time steps, rotates the overset mesh to the desired position and keeps on another 10 steps, repeating the process until the setpoint is reached. As I state in the original thread, I'd like to avoid (for the moment) to write and compile my own dynamicMesh library because the scope of the project is limited and I am a total newcomer to that part of foaming... Thanks for reading and contributing. PS: I was pleased to find your name as the person who answered, I just happen to have read your post on "not so open source" about the copyright of your contributions and also abouth Jasak's story on that. I support you! |
||
December 24, 2023, 17:15 |
|
#24 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hello everyone,
I have done a mesh with SnappyHexMesh; how can I rotate the entire mesh with an angle of 30° about the z axis (YAW)? Regards, Nafiz |
|
December 26, 2023, 09:47 |
|
#25 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,086
Rep Power: 26 |
Hello,
I don't know what OpenFOAM version you are using, but try typing: Code:
transformPoints -help Cheers, Yann |
|
December 28, 2023, 12:36 |
|
#27 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,086
Rep Power: 26 |
If you type transformPoints -help you will get this:
Code:
Usage: transformPoints [OPTIONS] Options: -allRegions Use all regions in regionProperties -auto-centre Use bounding box centre as centre for rotations -case <dir> Case directory (instead of current directory) -centre <point> Use specified <point> as centre for rotations -decomposeParDict <file> Alternative decomposePar dictionary file -parallel Run in parallel -recentre Recentre the bounding box before other operations -region <name> Use specified mesh region. Eg, -region gas -regions <wordRes> Use specified mesh region. Eg, -regions gas Or from regionProperties. Eg, -regions '(gas "solid.*")' -rollPitchYaw <vector> Rotate by '(roll pitch yaw)' degrees -rotate <(vectorA vectorB)> Rotate from <vectorA> to <vectorB> - eg, '((1 0 0) (0 0 1))' -rotate-angle <(vector angle)> Rotate <angle> degrees about <vector> - eg, '((1 0 0) 45)' -rotate-x <deg> Rotate (degrees) about x-axis -rotate-y <deg> Rotate (degrees) about y-axis -rotate-z <deg> Rotate (degrees) about z-axis -rotateFields Read and transform vector and tensor fields too -scale <scalar | vector> Scale by the specified amount - Eg, for uniform [mm] to [m] scaling use either '(0.001 0.001 0.001)' or simply '0.001' -time <time> Specify the time to search from and apply the transformation (default is latest) -translate <vector> Translate by specified <vector> before rotations -yawPitchRoll <vector> Rotate by '(yaw pitch roll)' degrees -doc Display documentation in browser -help Display short help and exit -help-compat Display compatibility options and exit -help-full Display full help and exit Transform (translate / rotate / scale) mesh points. Note: roll=rotate about x, pitch=rotate about y, yaw=rotate about z Using: OpenFOAM-2306 (2306) - visit www.openfoam.com Build: _fbf00d6b-20230626 Arch: LSB;label=32;scalar=64 Then the option you chose, -rotate, needs 2 vectors but you provided only one. If you need to rotate your mesh around the z axis, probably it will be easier to use the -rotate-z option instead. Cheers, Yann |
|
December 29, 2023, 11:35 |
|
#28 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Dear Yann,
Thanks a ton for your reply. I've rotated my mesh by following your suggestions. But the entire blockMesh is actually rotated by 30 degrees. But I want to rotate only the actuator disc, which is nothing but generated from the snappyHexMesh. Any suggestions for this one? 6.jpg Sorry for asking too many questions. I'm a new learner of OpenFoam. Regards and Thanks Nafiz |
|
|
|