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

xPlus utility

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By syavash
  • 1 Post By wyldckat
  • 1 Post By delsolman

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 18, 2015, 06:36
Default xPlus utility
  #1
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Dear Foamers,

Is there any utility developed for calculating xPlus and zPlus in a LES simulation?!

Thanks,
Syavash
syavash is offline   Reply With Quote

Old   August 18, 2015, 10:48
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick question: Can you please provide more details on what are you talking about?
In other words: What are "x+" and "z+"?
wyldckat is offline   Reply With Quote

Old   August 18, 2015, 14:01
Default
  #3
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick question: Can you please provide more details on what are you talking about?
In other words: What are "x+" and "z+"?

Hi Bruno,

You make me ashamed of myself!!
By x+ I meant a cell streamwise grid spacing, non-dimensionalized by friction velocity and dynamic viscosity. Maybe I should have named it deltax+.
It is just like deltay+ except in spatial direction.
I need to evalute my grid spacings to compare with literature in terms of x+ and z+ distribution on the wall.

Syavash

-----

A good starting point may be yPlusLES utility, but I cannot manage to find how to consider streamwise grid spacing instead of wall normal spacing.
ozgunoglu and Gang Wang like this.

Last edited by wyldckat; August 18, 2015 at 14:20. Reason: merged posts that were a few minutes apart
syavash is offline   Reply With Quote

Old   August 18, 2015, 14:28
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Mmm... sorry, I was expecting something more related to LES modelling, perhaps something related to the filters or something like that... hence my question.

The problem is that the "x" and "z" measurements can't be easily done generically:
  • The "y" value is the distance of the centre of the face on the wall to the centre of the cell, which are both well defined.
  • The remaining dimensions would possibly have to rely on the bounding box of the cell, i.e. to create the minimum and maximum measurements for all vertices of each cell, but in the coordinates of the flow.
This to say that its probably why there is not yet such a utility that calculates this for OpenFOAM.

Either way, you can draw some calculation ideas from the solver "applications/solvers/incompressible/boundaryFoam".
Luttappy likes this.
wyldckat is offline   Reply With Quote

Old   May 14, 2021, 16:25
Default
  #5
New Member
 
Lukas Kutej
Join Date: Jan 2016
Location: Darmstadt
Posts: 20
Rep Power: 10
delsolman is on a distinguished road
Hello everyone...is there some possibility to make it happen?
Could be somehow computed the distance between two nodes in x- y- z- direction?

I mean it is not necessary to define stream and spanwise. This can be understood by user from geometry arrangement.

But anyway those node distances would be very helpful to estimate appropriate mesh resolution by LES.

Thank you :-)
delsolman is offline   Reply With Quote

Old   May 15, 2021, 14:52
Default
  #6
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Hi,

I think you can use the writeCellCentres function object to obtain the position vectors of the cell centres in a given coordinate system.

Then, you can convert them from physical units to wall units (i.e. +) by scaling the position vector elements by the value of (delta/nu). e.g.

x^+ = (x * uTau)/nu = x * scaleFactor

where

uTau is the magnitude of the friction velocity which becomes constant for a fully-developed flow (e.g. downstream of a plane channel flow), and nu is the constant kinematic viscosity (for incompressible flows).

I think you can use the multiply function object, a coded function object or an external utility to do the elementwise multiplication by using the scaleFactor. (or hopefully one day with the expression function object).

If you want to obtain x^+ field for a subset of cells inside the domain (e.g. only the first cells adjacent to a given patch), you can then use one of the topoSets (link) to get the required cells. (e.g. patchToCell or my favourite haloToCell).

I hope I didn't misunderstand you.

Hope these help.
HPE is offline   Reply With Quote

Old   May 21, 2021, 17:03
Default
  #7
New Member
 
Lukas Kutej
Join Date: Jan 2016
Location: Darmstadt
Posts: 20
Rep Power: 10
delsolman is on a distinguished road
Hello Herpes free... thank you for your replay :-)
Can you clear me this please: When I use this writeCellCentres function, then I get dependent on the position of my coordiate system, right?

But I would like to have the delta-value, that means, the difference between nodes of neighborhood cells... as the people above said.

Is there some possibility to modify this function to get this please? It should be also divided by direction.

Another way would be using delta, what means here the volume of the cells, but somehow determine the face length in each direction... Would be something like that possible please?

Oh, I am not the first guy who want to control my LES... :-)
delsolman is offline   Reply With Quote

Old   May 22, 2021, 05:53
Default
  #8
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
It's been a pretty long time since I asked the question.

For simple configurations like channel flow or flat-plate boundary-layer, the streamwise spacing is usually constant. It's pretty straightforward to calculate x+, having u_tau distribution along the wall.

For more complex configurations such as airfoil, the trick is using cell volume in conjunction with the cell wall distance. Assuming a constant spanwise spacing:

dx=cell_volume/(dz*2d),

where d refers to the cell wall distance. While having dx, x+ can be calculated in a similar way to y+:

dx+=dx*u_tau/nu

A separate utility can be constructed accordingly based on y+ utility which was present in foam older versions.

I hope this will help to clear some doubts.

Bests,
syavash

Last edited by syavash; May 23, 2021 at 02:59.
syavash is offline   Reply With Quote

Old   May 22, 2021, 16:51
Default
  #9
New Member
 
Lukas Kutej
Join Date: Jan 2016
Location: Darmstadt
Posts: 20
Rep Power: 10
delsolman is on a distinguished road
Hey Ehsan... I refer to your sentence:
"By x+ I meant a cell streamwise grid spacing, non-dimensionalized by friction velocity and dynamic viscosity. Maybe I should have named it deltax+."

so let me clear the convention:
x+ y+ z+ means dimensionsless distance of cell node to the wall. It could be very high for example in the middle of the channel flow.

x y z dimensions between cell node and the wall. By the channel flow (if x is stremwise) makes x no sence

deltax+ deltay+ deltaz+ are dimensionsless dimensions between two neighborhood cell nodes
...am I right please?

Those delta values are inportant to determinate a proper LES mesh without wall function.
You can find in literature recomended values: deltay+ = 1, deltax+ = 50 (100), deltaz+ = 20

So...I have unstructured snappy hex mesh and I want to check everywhere in the domain my grid spacing in all three directions (not only cell_volume / 3) value
delsolman is offline   Reply With Quote

Old   May 23, 2021, 02:59
Default
  #10
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Yes, dx+, dy+, and dz+ are defined based on the distance between two neighboring cells. But note that y+ is calculated commonly based on half cell height in the wall vicinity.

You are correct in the sense that dx+ should be used instead of x+. Hence, I should modify the relationship in my previous post. However, "y+" notation is commonly used in literature instead of dy+/2 (wall vicinity).

In general, these dimensionless parameters are used to address mesh spacing in vicinity of the wall. Away from the wall, other criteria are employed to assess the mesh resolution.

As for snappy, I have not used it for LES so far, so I may not be able to give recommendations.

Bests
syavash
syavash is offline   Reply With Quote

Old   May 24, 2021, 13:19
Default
  #11
New Member
 
Lukas Kutej
Join Date: Jan 2016
Location: Darmstadt
Posts: 20
Rep Power: 10
delsolman is on a distinguished road
OK, we can talk briefly about the theoretical background...
y+ dimensionless normal wall distance is important by high Re and low Re models:
- by low Re model is the viscous sublayer integrated to the wall, so one have to go with grid spacing to y+ = 1
- high Re model uses wall function which takes the value from log law and approximate the viscous sublayer. Because of that the first cell has to lay in log low, let's say y+ > 30.

This is only one part of the story...
When one generate the mesh, the RANS model is not sensitive to long cells in streamwise direction. So only what cares is y+

But by LES is mesh the filter between solved and modeled part.
- so one have to care about the mesh resolution
- of course one can check k_unresolved / k_total: Pope said that 80% has to be solved...
- my idea was to control the mesh resolution by delta_x, delta_y, delta_z in each direction separately and so better react
- with CFL can be adjusted the time step
- delta/eta tells how times bigger vortexes than kolmogorov could my captured by the grid.
Luiz likes this.
delsolman is offline   Reply With Quote

Reply


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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
[mesh manipulation] mirrorMesh utility preserving regions zfaraday OpenFOAM Meshing & Mesh Conversion 1 November 7, 2016 21:51
Something doens't work with wallHeatFlux utility or externalWallHeatFluxTemperat BC!! zfaraday OpenFOAM Post-Processing 0 February 5, 2015 16:47
How to compile a new utility rudy OpenFOAM 4 October 1, 2011 22:48
Sample Utility not working in OpenFoam 1.6 titio OpenFOAM Post-Processing 0 February 5, 2010 12:12


All times are GMT -4. The time now is 18:47.