|
[Sponsors] |
[Technical] Order of points in a boundary patch |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 16, 2010, 07:43 |
Order of points in a boundary patch
|
#1 |
New Member
yvin
Join Date: Dec 2009
Posts: 7
Rep Power: 16 |
Hello,
I try to get the order of points (whitout redundancy) in a boundary field to correctly apply a pointVectorField to modify a mesh. I precise that I use an external software to evaluate this field. I tried with a polyPatch : label PatchId = mesh.boundaryMesh().findPatchID("name"); const polypatch& namePolyPatch = mesh.boundaryMesh()[PatchID]; But after that I don't know what to do. How extract ID of points or they coordinates in the right order that OpenFOAM use ? Thanks for helping. Camille |
|
April 16, 2010, 08:35 |
|
#2 | |
New Member
yvin
Join Date: Dec 2009
Posts: 7
Rep Power: 16 |
Hello, it's me again.
I think I am not far away. I use : label PatchId = mesh.boundaryMesh().findPatchID("name"); const polypatch& namePolyPatch = mesh.boundaryMesh()[PatchID]; labelList test(namePolyPatch.boundaryPoints()); forAll( test , pos) { Info << test[pos] << endl; } But the number of label given is not enought so I thing it's not a good method. I keep searching. Quote:
|
||
April 16, 2010, 09:02 |
|
#3 | |
New Member
yvin
Join Date: Dec 2009
Posts: 7
Rep Power: 16 |
Hello, It's me again .
I think I succeed in having what I want (only the position). It's not a pretty solution but it could help. My code : #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" label PatchID = mesh.boundaryMesh().findPatchID("tuyau"); const polyPatch& patchFound = mesh.boundaryMesh()[PatchID]; labelList labelPatchFound( patchFound.meshPoints() ); pointField meshPoints(mesh.points()); long nombre = 0; forAll(labelPatchFound , label) { vector coord = meshPoints[labelPatchFound[label]]; Info << coord[0] << " " << coord[1] << " " << coord[2] << endl; nombre++; } Info << nombre << endl; Any comment will be appreciated. Quote:
|
||
September 12, 2011, 10:18 |
|
#4 |
Member
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16 |
Hi Camille,
I need to find coordinate points of the mesh also so this here helps a lot. I am very interested, however, in finding out how do you know for example that by typing .meshPoints() you will get the mesh points. Is there a list of classes somewhere where I can read about the name of the different classes and what they do? I will appreciate any help. Thanks |
|
September 30, 2011, 05:15 |
|
#5 |
New Member
Mehran Saeedi
Join Date: Jan 2010
Posts: 8
Rep Power: 16 |
Hi Camille,
Thanks for your hints on finding the coordinates, it was much of help. |
|
October 30, 2013, 09:01 |
|
#6 |
Member
Join Date: May 2012
Posts: 55
Rep Power: 15 |
you can use the localPoints function, too.
this code does the same: Code:
const List<vector>& patchFound = mesh.boundaryMesh()[patchID].localPoints(); Info << "### localPoints" << patchFound << endl; |
|
May 24, 2015, 08:00 |
|
#7 | |
Member
Fei Fan
Join Date: Jun 2013
Location: NanJing, China
Posts: 54
Rep Power: 13 |
Quote:
************code****************** for(int ii=0; ii<mesh.boundaryMesh().size();ii++) Info<<mesh.boundaryMesh()[patchWallID][ii].localPoints<<endl; ************************************** kind regards Fan Fei |
||
August 5, 2015, 17:14 |
|
#8 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18 |
hello Fanfei,
I do not know much about this, but I think you need to add parentasis () at the end so: .localPoints() Hope this helps Wouter |
|
November 11, 2015, 10:31 |
|
#9 |
New Member
Nitish
Join Date: Oct 2015
Location: Delft, Netherlands
Posts: 5
Rep Power: 10 |
Hello,
I need to log the position and velocity of a time dependent problem. I know this piece of code will be really helpful for me. However, since I am now to OF am not able to figure out where to add. Any help will be appreciated.!! |
|
Tags |
boundary, order, point |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
y+ and u+ values with low-Re RANS turbulence models: utility + testcase | florian_krause | OpenFOAM | 114 | August 23, 2023 05:37 |
Radiation in semi-transparent media with surface-to-surface model? | mpeppels | CFX | 11 | August 22, 2019 07:30 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 06:28 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 08:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 05:12 |