transformPoints and rotateMesh
hi at all!
i have a mesh which i would like to translate and rotate so that the coordinate system is in the middle of the inlet (nearly a circle) and the z-axis should be normal to the inlet surface. when i read in just the inlet i get the following coordinates: Bounds: X Range: 0.00153 to 0.00418 (delta: 0.0026) Y Range: 0.159 to 0.16 (delta: 0.00179) Z Range: -0.218 to 0.216 (delta: 0.00212) does anyone know how i can accomplish my aim with the utilities transformPoints -translate and rotateMesh? with regards! |
Hi bephi,
simple way to get the center: x_c = 0.5 * (0.00153 + 0.00418) y_c = 0.5 * (0.159 + 0.16) z_c = 0.5 * (-0.218 to 0.216) Test in paraview: - Just import "inlet"-patch - Sources->Sphere - insert x_c, y_c and z_c in "Center" - "Radius" = 0.00005 More exact way: - import "inlet" patch into paraview - File->Save Data, "Files of type: .csv" - FieldAssociation "Points" - Import the .csv-file into OpenOffice Calc - use "AVERAGE" function for each column Result is: (0.002850023 0.159609 -0.2167553) Check in paraview as described above. Move mesh with: Code:
transformPoints -translate "(-0.002850023 -0.159609 +0.2167553)" The surface normal is "0.004016555 0.7621565 0.647346". Desired direction is "0 0 -1". Code:
rotateMesh "(0.004016555 0.7621565 0.647346)" "(0 0 -1)" Have fun Martin |
Thank you very much! Everything worked fine! I always used a wrong normal vector! Now the mesh is like its supposed to be!
|
Hi
I like to move my all cells of my mesh only by dx/2 and dy/2 and create a new mesh. Could you please help me how to apply transform mesh command to create a new mesh whose cells are moved by dx/2 and dy/2 relative to the first mesh? Thanks a lot Ehsan |
Hi all,
I want to rotate my primary mesh block(around x axis) that is produced by blockMesh to align it with my STL file, but when I run: Code:
rotateMesh "(0 1 0)" "(0 0 1)" Code:
/*---------------------------------------------------------------------------*\ Regards, Ali |
Dear Ali
you can use following command Code:
transformPoints -rotate '( (0 1 0) (0 0 1) )' |
Thanks for the reply Nima.
|
rotate
Hi namasam
I want to rotat airfoil without rotated mesh. and using simplefoam in Different angles of attack please can you help me? |
its impossible to rotate airfoil but! fixed the mesh :P
you may want to change the direction of inlet velocity |
Hi,
short & simple question: how to use the transformPoints utility from a custom directory? Example: Code:
transformPoints -roots sourceDir/sourceCase -case targetDir/targetCase -scale "(2.0 2.0 2.0)" Quote:
Quote:
Code:
transformPoints sourceDir/sourceCase targetDir/targetCase -scale "(2.0 2.0 2.0)" Quote:
Ilya |
maybe you want to choose -case
Quote:
|
Ah ok,
it works, thanks. For that, I have to copy the mesh from the source to the target first. I was just irritated by the Hrvoje's post: Quote:
|
hi
i typed following and got an error Code:
transformPoints -scale (1000 1000 1000) before, i done blockmesh and snappyhexmesh. the problem, the stl points will be interpreted as meters, but should be millimeters. the error: Code:
Wrong number of arguments, expectet 0 found 2 |
Dear Porisel
you are trying to use the wrong command! the transformPoints command is used to transform an existing mesh which has been created with sHM or blockMesh. In order to transform your stl file however you need the command: surfaceTransformPoints to see how it works type: surfaceTransformPoints -help To get more insight on the commands available and what to use them for have a look at the documentation of OpenFoam chapter 3.6 where you find a detailed list of all utilities. regards Colin |
Hi colinB,
thank you for your answer. i already have generated the mesh with blockmesh and snappyhexmesh. now i want to scale the whole mesh, because i dont want to have exorbitant velocity and pressure values ;) but i will try surfaceTransformpoints. kind regards, Porisel |
Oh sorry I misunderstood your post:
"before, i done blockmesh and snappyhexmesh." the error then is that you forgot the inverted commas around your vector so the correct command reads: transformPoints -scale '(1000 1000 1000)' maybe you also have to add a source file and a target file (I'm not sure, but for surfaceTransformPoints you have to do so) regards |
with inverted commas it dont work, too. but with quotationmarks it works well.
|
4 Attachment(s)
Hi to all,
i tried to change my coordinate system. At the moment it is in the inlet, I tried to move it in the outlet at a waterlevel of 0.85. So i used transformPoints -translate (15 0 0.85) But the only thing thats changed is that my mesh moved 15 m in x direction and 0.85 m in the z direction. The coordinate system remains the same. (Pictures) Can someone fix my problem? Tanks |
ok i found my mistake, i move it into the negative way (- 15 0 -0.85) Then it's Zero in the outlet.
But now i want to do setFields again. But i didn't work anymore? But why? I doesnt write in the alpha.water file and dont make a box in my case. Isnt it allowd to do setFields after transform points? |
Small q: can i rotate a zone?
The utility says i can rotate a region but i would like to rotate a cell zone... Any advice |
All times are GMT -4. The time now is 14:42. |