|
[Sponsors] |
Access patch geometrical variables using fvPatchVectorField |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 26, 2019, 08:06 |
Access patch geometrical variables using fvPatchVectorField
|
#1 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 8 |
Dear all,
I know that I can obtain the required info from the mesh directly, but, in any case, do you know a way to access patches and thier geometrical quantities from fvPatchVectorField ? With the following line, I can get the patch field number patchi: - const fvPatchVectorField& Up = U.boundaryField()[patchi]; Starting from Up, can I get faceCells in some way or Cf() for example? Thank you! |
|
February 26, 2019, 08:57 |
|
#2 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
Quote:
and going back to the object itself seen here it's fvPatchFields. Code:
makeFvPatchField(fvPatchScalarField) makeFvPatchField(fvPatchVectorField)//line 587 in fvPatchField.h makeFvPatchField(fvPatchSphericalTensorField) makeFvPatchField(fvPatchSymmTensorField) makeFvPatchField(fvPatchTensorField) header for fvPatchField it seems you should be able to call patch() and snGrad(); these two caught my eye but there are many other functions and it's time consuming to trace down what they all do. |
||
February 26, 2019, 11:55 |
|
#3 | |
Member
Vishal Achasrya
Join Date: Nov 2011
Posts: 38
Rep Power: 15 |
Quote:
You can try... const fvPatchVectorField& Up = U.boundaryField()[patchI]; const labelList faceCellList = Up.patch().faceCells(); you can also access it as a subList using labelList::subList. Hope this helps? |
||
February 26, 2019, 12:05 |
|
#4 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 8 |
Hello guys,
thank you for the help. Yes that workd I have also find out that this is working as well: - const fvPatch& ptch=U.boundaryField()[patchI].patch(); and then I can acces to the info using ptch.faceCells() Cheers and Thank you! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Fluent msh and cyclic boundary | cfdengineering | OpenFOAM Meshing & Mesh Conversion | 48 | January 25, 2013 04:28 |
Cyclic Boundary Condition | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Running, Solving & CFD | 36 | July 2, 2012 13:23 |
chtMultiRegionFoam Tutorial | m.nichols19 | OpenFOAM | 12 | September 9, 2010 12:56 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |
access to variables at interface of porous media? | Mazyar | FLUENT | 0 | October 10, 2003 15:59 |