CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

How to create faceSet/cellSet with wall faces exceeding a user-defined y+ value

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 27, 2011, 05:17
Default How to create faceSet/cellSet with wall faces exceeding a user-defined y+ value
  #1
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 8
florian_krause is on a distinguished road
Dear all,
my issue is the following. I have a quite complex 3D geometry and I am using simpleFoam and the kOmegaSST model. I am calculating the y+ value of the wall adjacent cells with my plusPostRANS utility, see y+ and u+ values with low-Re RANS turbulence models: utility + testcase

Suppose I have a grid with: y+_max = 2, y+_min = 0.002 and y+_avg = 0.5. In order to locate the region of all the wall faces (or wall adjacent cell) with y+>1.0 I would like to store either the wall faces or the wall adjacent cells in a faceSet or a cellSet respectively.

The corresponding code snippet of the plusPostRANS utility is

forAll(patches, patchi)
{
const fvPatch& currPatch = patches[patchi];

if (typeid(currPatch) == typeid(wallFvPatch))
{
yPlusTemp.boundaryField()[patchi] =
d[patchi]
*sqrt
(
RASModel->nu().boundaryField()[patchi]
*mag(U.boundaryField()[patchi].snGrad())
)
/RASModel->nu().boundaryField()[patchi];

const scalarField& YpTemp = yPlusTemp.boundaryField()[patchi];
}

So my question is the following: Within the loop, how can I store the wall faces or wall adjacent cells, which have y+>1, into a faceSet or cellSet respectively. With this I would be able to nicely locate them in Paraview using the include sets option. As you can see, I have the y+ values stored in a scalarField YpTemp on which I perform for instance the min and max operations.

As always, any help is appreciated!

Best regards,
Florian
florian_krause is offline   Reply With Quote

Old   May 27, 2011, 07:04
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 13
Bernhard is on a distinguished road
Did you consider the option to write the value of y+ to a volScalarField. I think that is much more easy to post-process in paraview.
Bernhard is offline   Reply With Quote

Old   May 27, 2011, 08:26
Default
  #3
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 8
florian_krause is on a distinguished road
Hello Bernhard,
indeed, thats possible, although I would prefer to create a seperated faceSet or cellSet as it is done when failing a checkMesh check. The reason is, that I would have to play around with contour scaling (max. = user-defined y+ limit) and colors. For me the much more elegant way is to create a faceSet/cellSet, although its maybe slightly more complicated to code. Thatswhy I asked for it and not the volScalarField

Anyway for the time being I will create a volScalarField.

Thanks and best regards,
Florian
florian_krause is offline   Reply With Quote

Old   May 27, 2011, 08:37
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 13
Bernhard is on a distinguished road
In paraview, you can use the treshold value, and select only the cells with y+ in a certain range of specified values. This has the same effect as specifying a cellSet. This is the route that I would follow probably.
Bernhard is offline   Reply With Quote

Old   May 27, 2011, 08:47
Default
  #5
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 8
florian_krause is on a distinguished road
you are right, that should give the same... thanks for the hint! I will give it a try.

Best,
Florian
florian_krause is offline   Reply With Quote

Reply

Tags
cellset, faceset, yplus

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paraview User defined view prapanj ParaView 3 January 3, 2014 21:54
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
user defined turbulence model manuutin STAR-CD 5 October 14, 2009 05:29
User defined memory Hp FLUENT 0 September 24, 2004 00:10
CFX 5.5 Roued CFX 1 October 2, 2001 16:49


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