|
[Sponsors] |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#21 | |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
OK.
thanks for good clarification! then it splits only the first cell. how does it calculates the number of splitts? and if I change the mesh by blockMesh I have to use refine tool again? Quote:
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
||
![]() |
![]() |
![]() |
![]() |
#22 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,969
Blog Entries: 45
Rep Power: 127 ![]() ![]() ![]() ![]() ![]() ![]() |
With this:
Code:
refineLevelValue = ceil ( std::log(YpMax/targetYPlusValue)/std::log(scalar(2.0)) ); Quote:
Quote:
It does not affect the "blockMeshDict" file, because it's used for creating a mesh, it's not "the mesh" ![]()
__________________
|
|||
![]() |
![]() |
![]() |
![]() |
#23 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
and another question.if y+ be 1 for example and we want to increase it to 30 this tool can't be used,can?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
![]() |
![]() |
![]() |
![]() |
#24 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,969
Blog Entries: 45
Rep Power: 127 ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
![]() You can check post #14 for more ideas: http://www.cfd-online.com/Forums/ope...tml#post397239
__________________
|
||
![]() |
![]() |
![]() |
![]() |
#25 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
Hi
why the first cell height after refining is bigger than second one? I used Code:
refineWallLayerSmart -basedOnYPlus -targetYPlus .7 -overwrite walls 1.5
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
![]() |
![]() |
![]() |
![]() |
#26 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
in this version
1) it works on yPMax instead of yPMean.so the maximum y+ in the domain will be lower than specified -targetYPlus that leads more accurate results than the average. 2)also the modification of first cell that was bigger than second cell has done according to Bernhard proposed .C file. 3)also it now accepts float numbers for -targetYPlus like -targetYPlus .5 Hope it be useful.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
![]() |
![]() |
![]() |
![]() |
#27 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
in what it used to be till now we wanted to maximum yPlus be lower
than targetYPlus (as above post) now I want minimum yPlus be bigger than targetYplus.it refines mesh still(when for example minimum of y+ is 200) but min(yPlus)>=30(that uses in high-Re mesh's) it seems an equation should be changed from max(yPlus)<=target to min(yPlus)>=target. I'm using average version now but if anyone could have a look into it too it will be more accurate. its nice to modify above post file. thanks.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
![]() |
![]() |
![]() |
![]() |
#28 | |
New Member
Join Date: Mar 2013
Posts: 9
Rep Power: 12 ![]() |
Quote:
I used your Version of the tool on my mesh but the first cell height ist still larger than the second, just like in your post. I used Code:
refineWallLayerSmart -basedOnYPlus -targetYPlus 1 Wall 1.15 -overwrite |
||
![]() |
![]() |
![]() |
![]() |
#29 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
Hi
in my case it works right. send your mesh to me.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
![]() |
![]() |
![]() |
![]() |
#30 |
New Member
Join Date: Mar 2013
Posts: 9
Rep Power: 12 ![]() |
Hi!
This is my case, it's just a simple 2D BlockMesh... |
|
![]() |
![]() |
![]() |
![]() |
#31 | |
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 20 ![]() |
Quote:
Using YpMax seems to me too cruel. ![]()
__________________
~ Daniel WEI ------------- Boeing Research & Technology - China Beijing, China |
||
![]() |
![]() |
![]() |
![]() |
#32 | |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
Quote:
then you expect what to be refined in y-direction?!
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. Last edited by immortality; July 9, 2013 at 15:24. |
||
![]() |
![]() |
![]() |
![]() |
#33 | |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
Quote:
in cases we want for example y+<1 its more accurate that maximum value of y+ on cells be lower than 1 too at least I think so if you want to correct my understanding I welcome!
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
||
![]() |
![]() |
![]() |
![]() |
#34 |
New Member
Join Date: Mar 2013
Posts: 9
Rep Power: 12 ![]() |
What do you mean by that? Why would it work in only one direction?
I expect nothing to be refined in the y-direction, it's a 2D mesh and it lies in the x-z-plane... I'm sorry but I didn't understand your concerns about that, the refinement works just fine (see attached screenshot). Only "problem" is the first cell being larger than the second... |
|
![]() |
![]() |
![]() |
![]() |
#35 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
I had forgotten how it was working.I don't know whats wrong with your case.it ends with a crash.
have you set faces correct?I think maybe there is an issue in blockMeshDict.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
![]() |
![]() |
![]() |
![]() |
#36 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,969
Blog Entries: 45
Rep Power: 127 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings to all!
@mezomatic: I was not able to reproduce the same error ![]() I ran blockMesh, then yPlusRAS and then the command indicated above: Quote:
Code:
--> FOAM FATAL ERROR: targetYPlusValue is larger than max yPlus (0), no need to refine the wall layer mesh. Or you can use "refineLevel" option to force refine. Bruno
__________________
|
||
![]() |
![]() |
![]() |
![]() |
#37 |
New Member
Join Date: Mar 2013
Posts: 9
Rep Power: 12 ![]() |
Hey Bruno,
try running simpleFoam on it first for a few timesteps, so the yPlusRAS tool can compute the y+ values properly. Otherwise it's just zero everywhere (see error message) and as that is already below the desired y+ of 1, there won't be anything refined... |
|
![]() |
![]() |
![]() |
![]() |
#38 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,969
Blog Entries: 45
Rep Power: 127 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi mezomatic,
Quote:
Nonetheless, I checked the y+ values on the wall at the iteration 500... and the maximum value of "y+ = 1e9" is waaaaaaaaaaaay too much! Which means that refining the mesh to "y+ = 1" would require the cells to be so thin near the wall, that... uhm... maybe as thin as an atom? ![]() Therefore, I strongly advise you to first make your case simulate without crashing, and only then you should try refining the mesh near the wall ![]() Best regards, Bruno
__________________
|
||
![]() |
![]() |
![]() |
![]() |
#39 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 25 ![]() |
as Bruno says I received an error too and it seems your BC's and maybe other settings have a big problem in them!find that first.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
![]() |
![]() |
![]() |
![]() |
#40 |
New Member
Join Date: Mar 2013
Posts: 9
Rep Power: 12 ![]() |
Hmm that's strange... I've got no problems at all running the the case without the refinement. My max y+ is 59.
Maybe there's someting wrong with the files. Here's the case again. I'm using Version 2.2.0 |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! | divergence | OpenFOAM Meshing & Mesh Conversion | 0 | January 23, 2019 05:17 |
[mesh manipulation] Wall mesh refinement based on y+ | Hrushi | OpenFOAM Meshing & Mesh Conversion | 1 | July 9, 2017 07:06 |
[snappyHexMesh] snappyHexMesh - geometry does not appear in Mesh | czhongrong | OpenFOAM Meshing & Mesh Conversion | 1 | January 20, 2016 06:26 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |