CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Labels of nodes and faces on a patch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2019, 08:59
Default Labels of nodes and faces on a patch
  #1
New Member
 
Join Date: Aug 2016
Posts: 19
Rep Power: 10
mtgoncalves is on a distinguished road
I have a mesh with a single patch named outerBoundary. I want to move the nodes that are on this patch. To determine in which direction to move a given node p, I want to average the normal vectors of the patch faces that have node p in common. This means I need an outer loop for looping over the nodes on the patch and an inner loop to loop over the faces that connect to a given node.

I can get a lot of mesh connectivity information using the code from here, but the information I am still missing is

1) how to determine the labels of nodes that are on a given patch and
2) how to determine for an arbitrary face if the face is a patch face or an internal face.

How can I get this information?
mtgoncalves is offline   Reply With Quote

Old   April 19, 2019, 05:33
Default
  #2
Member
 
Vu
Join Date: Nov 2016
Posts: 42
Rep Power: 10
DoQuocVu is on a distinguished road
Hi,


1. Take a look at this thread:
How to access to faces of a patch
and this:

Loop over Points of a boundary / patch


2. Try:
Code:
mesh.isInternalFace(yourFaceID);
which will return true if given face is internal
DoQuocVu is offline   Reply With Quote

Reply

Tags
mesh


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface Kryo OpenFOAM Meshing & Mesh Conversion 13 February 17, 2022 08:34
[snappyHexMesh] Help with Snappy: no layers growing GianF OpenFOAM Meshing & Mesh Conversion 2 September 23, 2020 09:26
[snappyHexMesh] Layers not growing at all zonda OpenFOAM Meshing & Mesh Conversion 12 June 6, 2020 12:28
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 04:21
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38


All times are GMT -4. The time now is 16:02.