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

[Other] Contribution a new utility: refine wall layer mesh based on yPlus field

Register Blogs Community New Posts Updated Threads Search

Like Tree34Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2013, 16:52
Default
  #41
New Member
 
Join Date: Mar 2013
Posts: 9
Rep Power: 13
mezomatic is on a distinguished road
just noticed that the last upload was the k-epsilon version but it's the same with the k-omega SST. It's running on my system...
mezomatic is offline   Reply With Quote

Old   July 14, 2013, 08:09
Default
  #42
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Greetings to all!

Well, this is somewhat annoying... I found the reason why this occurs, but I have not found the solution... and I'm not in the mood to find it myself .

I reached Bernhard's conclusion:
Quote:
Originally Posted by Bernhard View Post
I still have some doubts on the stretchingRatio, as it will result in a thicker cell in the first layer than in the second layer, which is probably unwanted. I will see if I can think of anything slightly nicer here (except for using a value of 1 here).
So, there are 2 issues occurring here:
  1. @mezomatic: You did not use the "-adjacent" option when you ran refineWallLayerSmart, which is what Bernhard had implemented so that the layer closest to the wall would not be bigger than the 2nd layer.
  2. The "-adjacent" option does not lead to respecting the requested y+.
From what I figure out, when not using the "-adjacent" option:
  • All of this problem is because the original math probably considered that the stretching ratio would always be 1, which meant that the 2 layers closest to the wall would have the same thickness.
  • The bigger problem is that no matter how much refinement we use, when using a ratio larger than 1, is that the layer closest to the wall will always be thicker than the one next to it.
So the conclusion is that at least the following math operations need to be corrected:
  • Code:
    scalar weight = stretchRatio/(stretchRatio+1.);
  • Code:
    refineLevelValue = ceil
                (
                    std::log(YpMax/targetYPlusValue)/std::log(scalar(2.0))
                );
So, since I had to do all of the work of figuring out what is wrong, I leave the solving of this problem to you guys!

Best regards,
Bruno
immortality and FrankFlow like this.
__________________
wyldckat is offline   Reply With Quote

Old   September 17, 2013, 14:06
Default
  #43
New Member
 
Stefan Gracik
Join Date: Oct 2011
Location: Penn State
Posts: 8
Rep Power: 14
stefan.gracik is on a distinguished road
Is this compatible with OpenFOAM 2.2? I did a wmake libso and it seemed to compile ok, but when I try to run it I get a command not found.
stefan.gracik is offline   Reply With Quote

Old   September 17, 2013, 18:04
Default
  #44
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Greetings Stefan,

The command:
Code:
wmake libso
is meant for building libraries.

The command:
Code:
wmake
will build applications... well, and as 2.2.1, it will also build libraries.

As for:
Code:
wmake all
will build any of them, depending on how they were defined.

This is explained here: http://www.openfoam.org/docs/user/co...plications.php

Best regards,
Bruno
immortality likes this.
__________________
wyldckat is offline   Reply With Quote

Old   September 18, 2013, 11:59
Default
  #45
New Member
 
Stefan Gracik
Join Date: Oct 2011
Location: Penn State
Posts: 8
Rep Power: 14
stefan.gracik is on a distinguished road
Thanks, my mistake.

Also it doesn't seem to work for patch groups, which I use since I have a lot of patches in use that need refined. Any chance of adding this?
stefan.gracik is offline   Reply With Quote

Old   September 28, 2013, 11:36
Default
  #46
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Hi Stefan,

Quote:
Originally Posted by stefan.gracik View Post
Also it doesn't seem to work for patch groups, which I use since I have a lot of patches in use that need refined. Any chance of adding this?
I'll need an example case.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 8, 2014, 22:56
Default
  #47
Member
 
Ali
Join Date: Oct 2013
Location: St John's Canada
Posts: 31
Rep Power: 12
ashim is on a distinguished road
Hi,

Thanks to everyone here. I am using OpenFOAM for last 3 months. I was trying to generate layers around a series 60 ship hull. But I couldn't do it. Then I found this thread. According to Bruno's instruction I have built refineWallLayerSmart in OF 2.3, but when I am typing the command "refineWallLayerSmart" it says "command not found". I hope someone knows the solution. Any kind of advice will be appreciated.

Best regards
Ali
ashim is offline   Reply With Quote

Old   May 11, 2014, 15:47
Default
  #48
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Greetings Ali and welcome to the forum!

There are a few variants of "refineWallLayerSmart" here on this thread. To which one are you referring to?

In addition, which commands did you use and what output did you get for each one?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 11, 2014, 18:42
Default
  #49
Member
 
Ali
Join Date: Oct 2013
Location: St John's Canada
Posts: 31
Rep Power: 12
ashim is on a distinguished road
Hi Bruno,

Thank you very much. I have downloaded the latest one in this thread. By the way, I have fixed the problem today. The path name in the file "files" in Make folder was not correct. I am getting the layer now and working with mesh quality using checkMesh

Thank you again.

Best regards,
Ali
ashim is offline   Reply With Quote

Old   October 20, 2014, 16:58
Default
  #50
New Member
 
Leonardo Oliveira
Join Date: Aug 2014
Location: Brazil
Posts: 11
Rep Power: 11
leonardo.oliveira is on a distinguished road
Hi Bruno,

I've downloaded the latest version of the refineWallLayerSmart on this thread, tried on a case of mine and it doesn't worked well.

The command the I call is the following:

Code:
refineWallLayerSmart -basedOnYPlus -targetYPlus 30 -overwrite terrain 1.5
The result log is the following:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : refineWallLayerSmart -basedOnYPlus -targetYPlus 30 -overwrite terrain 1.5
Date   : Oct 20 2014
Time   : 17:44:20
Host   : "lmd1"
PID    : 6771
Case   : /home/lmd/OpenFOAM/leonardo-2.3.0/Askervein_teste
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 219

Note: this utility default is using yPlus, if you have yStar file also in the folder, 
      please double check which one you want to use, and delete the other. Thanks!

Using refineWallLayer utility in a smart way!

Max yPlus is 109321.847959, targetYPlusValue is 30, refineLevel is 12

    Originally, patch 5 named terrain
     d  : min: 1.60987270707 max: 1.62315163794 average: 1.61501716699

Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:190465 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
7028
7449
7450
7451
200103
227839
903710
903747
903748
903749
914626
917148
)

loop:6(1642713 973606 973608 973601 971938 1582210)
anchors:6(200103 7028 7449 7450 7451 227839)
otherPoints:6(914626 903747 903748 903749 917148 903710)
Writing cell for time 219 to "./cell_190465.obj"
Writing loop for time 219 to "./cellLoop_190465.obj"
Writing anchors for time 219 to "./anchors_190465.obj"
Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:190465 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
7028
7449
7450
7451
200103
227839
944378
944415
944416
944417
955294
957816
)

loop:6(1683381 1014274 1014276 1014269 1012606 1622878)
anchors:6(200103 7028 7449 7450 7451 227839)
otherPoints:6(944416 944417 957816 944378 955294 944415)
Writing cell for time 219 to "./cell_190465.obj"
Writing loop for time 219 to "./cellLoop_190465.obj"
Writing anchors for time 219 to "./anchors_190465.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:433033 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
487902
487913
487946
487957
487968
487979
972347
972348
972351
972352
972353
972354
)

loop:6(2451402 2451589 2451567 2451523 2451611 2451369)
anchors:6(487968 487913 487946 487979 487957 487902)
otherPoints:6(972352 972353 972354 972347 972348 972351)
Writing cell for time 219 to "./cell_433033.obj"
Writing loop for time 219 to "./cellLoop_433033.obj"
Writing anchors for time 219 to "./anchors_433033.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:459774 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
487913
487924
487968
533134
533145
533156
972348
972349
972353
976459
976460
976461
)

...

Morphing ...
Writing refined morphMesh to time 219

    After refining, Patch 5 named terrain
     d  : min: 0.000159484278413 max: 0.0130200603168 average: 0.00352650867874

End
Please, help me to find what I am doing wrong.

Thanks in advance.

Sorry for the bad English.

Last edited by wyldckat; October 22, 2014 at 14:46. Reason: Added [CODE][/CODE]
leonardo.oliveira is offline   Reply With Quote

Old   October 22, 2014, 08:53
Default
  #51
New Member
 
Leonardo Oliveira
Join Date: Aug 2014
Location: Brazil
Posts: 11
Rep Power: 11
leonardo.oliveira is on a distinguished road
[SORRY FOR THIS POST, TRIED TO PUT THE WHOLO LOG IN HERE, DIDN'T WORK]

That's the whole log that I got as result.

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : refineWallLayerSmart -basedOnYPlus -targetYPlus 30 -overwrite terrain 1.5
Date   : Oct 20 2014
Time   : 17:44:20
Host   : "lmd1"
PID    : 6771
Case   : /home/lmd/OpenFOAM/leonardo-2.3.0/Askervein_teste
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 219

Note: this utility default is using yPlus, if you have yStar file also in the folder, 
      please double check which one you want to use, and delete the other. Thanks!

Using refineWallLayer utility in a smart way!

Max yPlus is 109321.847959, targetYPlusValue is 30, refineLevel is 12

    Originally, patch 5 named terrain
     d  : min: 1.60987270707 max: 1.62315163794 average: 1.61501716699

Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:190465 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

loop:6(1642713 973606 973608 973601 971938 1582210)
anchors:6(200103 7028 7449 7450 7451 227839)
otherPoints:6(914626 903747 903748 903749 917148 903710)
Writing cell for time 219 to "./cell_190465.obj"
Writing loop for time 219 to "./cellLoop_190465.obj"
Writing anchors for time 219 to "./anchors_190465.obj"
Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:190465 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

loop:6(1683381 1014274 1014276 1014269 1012606 1622878)
anchors:6(200103 7028 7449 7450 7451 227839)
otherPoints:6(944416 944417 957816 944378 955294 944415)
Writing cell for time 219 to "./cell_190465.obj"
Writing loop for time 219 to "./cellLoop_190465.obj"
Writing anchors for time 219 to "./anchors_190465.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:433033 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

loop:6(2451402 2451589 2451567 2451523 2451611 2451369)
anchors:6(487968 487913 487946 487979 487957 487902)
otherPoints:6(972352 972353 972354 972347 972348 972351)
Writing cell for time 219 to "./cell_433033.obj"
Writing loop for time 219 to "./cellLoop_433033.obj"
Writing anchors for time 219 to "./anchors_433033.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:459774 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

loop:6(2595260 2451589 2451402 2451446 2595304 2595293)
anchors:6(487968 533156 487913 533134 487924 533145)
otherPoints:6(972353 976459 976460 976461 972348 972349)
Writing cell for time 219 to "./cell_459774.obj"
Writing loop for time 219 to "./cellLoop_459774.obj"
Writing anchors for time 219 to "./anchors_459774.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:470598 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

loop:6(2500275 2612387 2612376 2612343 2612398 2500253)
anchors:6(542374 500717 542352 542385 500728 542363)
otherPoints:6(973512 973513 977297 977298 977299 977300)
Writing cell for time 219 to "./cell_470598.obj"
Writing loop for time 219 to "./cellLoop_470598.obj"
Writing anchors for time 219 to "./anchors_470598.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:470796 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

loop:6(2612596 2576230 2576241 2451611 2451523 2612585)
anchors:6(524675 542473 487946 487979 542484 524664)
otherPoints:6(972354 975689 975690 977308 977309 972351)
Writing cell for time 219 to "./cell_470796.obj"
Writing loop for time 219 to "./cellLoop_470796.obj"
Writing anchors for time 219 to "./anchors_470796.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:593151 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

loop:6(2839446 2944281 2944270 2944237 2944292 2839402)
anchors:6(656256 656289 656267 614868 656278 614846)
otherPoints:6(984490 984491 984492 984493 980726 980728)
Writing cell for time 219 to "./cell_593151.obj"
Writing loop for time 219 to "./cellLoop_593151.obj"
Writing anchors for time 219 to "./anchors_593151.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:593162 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(614087 614098 614868 647674 656278 980657 980658 980728 983710 984492)
loop:5(2923244 2944281 2839446 2836993 2837037)
anchors:5(614087 614098 614868 656278 647674)
otherPoints:5(984492 980657 980658 980728 983710)
Writing cell for time 219 to "./cell_593162.obj"
Writing loop for time 219 to "./cellLoop_593162.obj"
Writing anchors for time 219 to "./anchors_593162.obj"
Morphing ...
Selected 40000 cells connected to patch terrain

Cutting:
    cells:40000
    edges:40668

--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:144001 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

loop:6(1661445 1054068 1054071 1664359 1661423 1661269)
anchors:6(199399 199443 7229 199454 7230 200383)
otherPoints:6(985064 985065 995988 995898 995902 995903)
Writing cell for time 219 to "./cell_144001.obj"
Writing loop for time 219 to "./cellLoop_144001.obj"
Writing anchors for time 219 to "./anchors_144001.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:190454 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(181251 200103 226508 227817 227839 994248 995962 998363 998482 998484)
loop:5(1724049 1663546 1600619 1721372 1724027)
anchors:5(181251 200103 227817 226508 227839)
otherPoints:5(994248 998482 998484 995962 998363)
Writing cell for time 219 to "./cell_190454.obj"
Writing loop for time 219 to "./cellLoop_190454.obj"
Writing anchors for time 219 to "./anchors_190454.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:190465 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(
...
)

...

loop:6(2956500 3040056 3040034 3040078 2956522 2854904)
anchors:6(585696 645892 645903 613328 645914 613339)
otherPoints:6(1102592 1102593 1105552 1100080 1105553 1105554)
Writing cell for time 219 to "./cell_568533.obj"
Writing loop for time 219 to "./cellLoop_568533.obj"
Writing anchors for time 219 to "./anchors_568533.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:569116 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(596157 596168 646904 646915 646926 1101031 1101032 1105644 1105645 1105646)
loop:5(2896198 3043048 3043015 3042993 2896154)
anchors:5(646915 596168 646926 646904 596157)
otherPoints:5(1101031 1101032 1105644 1105645 1105646)
Writing cell for time 219 to "./cell_569116.obj"
Writing loop for time 219 to "./cellLoop_569116.obj"
Writing anchors for time 219 to "./anchors_569116.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:571569 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(638247 638258 651350 651361 651372 1104857 1104858 1106048 1106049 1106050)
loop:5(3056957 3057012 3027395 3027373 3056979)
anchors:5(651361 638247 651372 638258 651350)
otherPoints:5(1106048 1106049 1106050 1104857 1104858)
Writing cell for time 219 to "./cell_571569.obj"
Writing loop for time 219 to "./cellLoop_571569.obj"
Writing anchors for time 219 to "./anchors_571569.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:571844 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

loop:6(3057562 3057529 3057606 3028033 3028066 3057595)
anchors:6(651680 638533 651691 638544 651669 651702)
otherPoints:6(1106080 1104883 1104884 1106077 1106078 1106079)
Writing cell for time 219 to "./cell_571844.obj"
Writing loop for time 219 to "./cellLoop_571844.obj"
Writing anchors for time 219 to "./anchors_571844.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:571855 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

loop:6(3057562 3057650 3057705 3057683 3028242 3057529)
anchors:6(651680 651713 651724 638610 651669 651735)
otherPoints:6(1106081 1106082 1106083 1104890 1106077 1106078)
Writing cell for time 219 to "./cell_571855.obj"
Writing loop for time 219 to "./cellLoop_571855.obj"
Writing anchors for time 219 to "./anchors_571855.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:572031 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(598137 598148 652076 652087 652098 1101211 1101212 1106114 1106115 1106116)
loop:5(2903964 3058992 3058970 3058926 2903931)
anchors:5(652098 598148 652076 652087 598137)
otherPoints:5(1106114 1106115 1106116 1101211 1101212)
Writing cell for time 219 to "./cell_572031.obj"
Writing loop for time 219 to "./cellLoop_572031.obj"
Writing anchors for time 219 to "./anchors_572031.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:582976 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(608763 608796 608807 635343 643758 1102177 1102180 1102181 1104593 1105358)
loop:5(3021125 3035678 2941529 2941430 2941562)
anchors:5(608807 643758 635343 608763 608796)
otherPoints:5(1102177 1102180 1102181 1105358 1104593)
Writing cell for time 219 to "./cell_582976.obj"
Writing loop for time 219 to "./cellLoop_582976.obj"
Writing anchors for time 219 to "./anchors_582976.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:584252 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

...

loop:6(1732533 1732500 1732654 1732852 1732841 1800167)
anchors:6(196321 196387 196266 196398 196277 224858)
otherPoints:6(1076960 1076961 1076949 1076950 1076954 1079549)
Writing cell for time 219 to "./cell_1043256.obj"
Writing loop for time 219 to "./cellLoop_1043256.obj"
Writing anchors for time 219 to "./anchors_1043256.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1044294 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(266641 266663 304591 304602 340163 1080269 1080271 1083719 1083720 1086953)
loop:5(1915192 1915137 2132430 2052316 2052283)
anchors:5(340163 266663 304591 266641 304602)
otherPoints:5(1083719 1083720 1086953 1080269 1080271)
Writing cell for time 219 to "./cell_1044294.obj"
Writing loop for time 219 to "./cellLoop_1044294.obj"
Writing anchors for time 219 to "./anchors_1044294.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1045546 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

loop:6(2593811 2593778 2646974 2703448 2703437 2728638)
anchors:6(508131 527172 493160 538128 493171 527161)
otherPoints:6(1097920 1097921 1098917 1094829 1094830 1096190)
Writing cell for time 219 to "./cell_1045546.obj"
Writing loop for time 219 to "./cellLoop_1045546.obj"
Writing anchors for time 219 to "./anchors_1045546.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1045587 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

loop:6(2597199 2597166 2650384 2704350 2704471 2729177)
anchors:6(527656 538568 494029 509143 494040 527612)
otherPoints:6(1097961 1097965 1098957 1096282 1094908 1094909)
Writing cell for time 219 to "./cell_1045587.obj"
Writing loop for time 219 to "./cellLoop_1045587.obj"
Writing anchors for time 219 to "./anchors_1045587.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1045859 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(454042 454492 454493 544998 545009 1094118 1094158 1094159 1099527 1099528)
loop:5(2474314 2472652 2739374 2739385 2474311)
anchors:5(544998 545009 454042 454492 454493)
otherPoints:5(1094118 1099527 1099528 1094158 1094159)
Writing cell for time 219 to "./cell_1045859.obj"
Writing loop for time 219 to "./cellLoop_1045859.obj"
Writing anchors for time 219 to "./anchors_1045859.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1045861 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:10(7449 7451 454097 454240 545042 1066419 1066421 1094123 1094136 1099531)
loop:5(1136280 1136273 2739418 2472894 2473400)
anchors:5(454240 454097 545042 7449 7451)
otherPoints:5(1099531 1094123 1066419 1066421 1094136)
Writing cell for time 219 to "./cell_1045861.obj"
Writing loop for time 219 to "./cellLoop_1045861.obj"
Writing anchors for time 219 to "./anchors_1045861.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1046476 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

loop:6(2958942 2959063 3064602 3042300 2959107 2958832)
anchors:6(614032 614065 646706 614131 614109 655486)
otherPoints:6(1102656 1102659 1102663 1102665 1106424 1105626)
Writing cell for time 219 to "./cell_1046476.obj"
Writing loop for time 219 to "./cellLoop_1046476.obj"
Writing anchors for time 219 to "./anchors_1046476.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1046482 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

loop:6(2896264 2896231 3043147 2959184 2959151 2959393)
anchors:6(614153 614219 646959 596179 614142 596190)
otherPoints:6(1101033 1102666 1101034 1102667 1105649 1102673)
Writing cell for time 219 to "./cell_1046482.obj"
Writing loop for time 219 to "./cellLoop_1046482.obj"
Writing anchors for time 219 to "./anchors_1046482.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1046625 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

loop:6(2966554 2966444 2968622 2968732 3071312 2966587)
anchors:6(616485 616430 617105 617138 658742 616474)
otherPoints:6(1106720 1102935 1102938 1102874 1102878 1102879)
Writing cell for time 219 to "./cell_1046625.obj"
Writing loop for time 219 to "./cellLoop_1046625.obj"
Writing anchors for time 219 to "./anchors_1046625.obj"
--> FOAM Warning : 
    From function Foam::cellCuts::calcAnchors
    in file meshCut/cellCuts/cellCuts.C at line 1579
     For cell:1046845 achorpoints and nonanchorpoints are geometrically on same side!
cellPoints:
12
(

)

loop:6(1110515 1110518 1114016 2755888 2755866 1112300)
anchors:6(551973 1775 1335 551962 894 895)
otherPoints:6(1066214 1100011 1100012 1066133 1066134 1066174)
Writing cell for time 219 to "./cell_1046845.obj"
Writing loop for time 219 to "./cellLoop_1046845.obj"
Writing anchors for time 219 to "./anchors_1046845.obj"
Morphing ...
Writing refined morphMesh to time 219

    After refining, Patch 5 named terrain
     d  : min: 0.000159484278413 max: 0.0130200603168 average: 0.00352650867874

End
leonardo.oliveira is offline   Reply With Quote

Old   January 13, 2015, 10:48
Default How to calculate Y distance for a target y+ value?
  #52
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
Hey everybody,

Edit: Continuation from http://www.cfd-online.com/Forums/ope...provement.html

Thanks a lot for such a efficient utility this is one of the reasons http://www.cfd-online.com is the place to be even if you donot have any questions. However I have a question

I have been using the online calculators to estimate my Y distance for the required Y+ for example lets say Y+ of 30 and Y distance I got 0.00033 for airfoil. After my simulations when I check My check my yPlus it has an Y+ Max of 22 and Y+ Avg of 4. well this makes sense since the first velocity was just assumption as the flow over the airfoil we can find only after simulation.

Now I use the velocity from the simulation results to find my actual Y distance to get a Y+ of 30 using the online calculators again and now after the simulation when I run the yPlus utility I get Y+ max of 12 and Y+ Avg 3.

If I have to change from Y+ from 30 to 1 or from 100 to 30 etc this utility does such an amazing job without me even going back to the drawing board.

-But since I want to go from Y+ 12 to 30 I have to go to go the drawing board but my existing problem is I do not know the actual value of Y distance require from me to implement in the mesh as the online calculator appear to be useless for fine tuning !!

- Is there any chance I can make a small changes to these codes for it to print Y distance along with its Y+ value for example when I have a Y+ 100 and want it to make it Y+30 can I make it also print the Y distance what it is using because I will just make a mesh with high Y+ to get the right Y distance for the required Y+ and go back to the drawing board to make the right mesh !!after the initial simulation.
Edit: I think there is d it prints out which is the distance of first cell yaay

So the only question I want answer is for this one
- what data and how should I extract from the simulation results to estimate my actual Y distance for the required Y+ after the first simulation. (again: the online calculators for this Y estimation is not accurate enough I have been trying for one month now just to get accurate Y+ as it influencing my result a lot)


Thanks again for this utility and thanks for your time and consideration

Kind Regards,
Hasan K.J
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius

Last edited by Alhasan; February 1, 2015 at 08:43.
Alhasan is offline   Reply With Quote

Old   January 31, 2015, 11:52
Default
  #53
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Greetings to all!

@Leonardo Oliveira: I've had your posts on my to-do list for quite some time now and only now was I able to look into this. Problem is that:
  1. I'm not able to diagnose your problem without more specific details about your problem.
  2. I don't know if you've managed to solve the problem already or not.


@Hasan K.J:
Quote:
Originally Posted by Alhasan View Post
So the only question I want answer is for this one
- what data and how should I extract from the simulation results to estimate my actual Y distance for the required Y+ after the first simulation. (again: the online calculators for this Y estimation is not accurate enough I have been trying for one month now just to get accurate Y+ as it influencing my result a lot)
There is a somewhat little known fact that we can calculate the y+ value for the whole meshed domain... problem is that it's not practical to do so. The somewhat easiest way to do so this calculation is to use the Calculator filter in ParaView to do the necessary calculation.
Although... you might want to ask aylalisa how to do the graph in the very first post shown here: http://www.cfd-online.com/Forums/ope...u-profile.html

In addition, I see you've also asked a very similar question on this topic here: http://www.cfd-online.com/Forums/ope...tml#post526625 post #8

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 31, 2015, 12:16
Default
  #54
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
Hey Bruno,

Thanks for your reply,

Yes I do have the similar question in couple of places and still haven't come across the exact answer however my work is being carried on by the little things that I know.

Another confusion regarding the Y+ I have come across is

Edit: similar question here post 29 http://www.cfd-online.com/Forums/ope...-y-plus-2.html
- I use the online calculators to determine the Y distance for the require Y+ say for Y+ = 1 the Y = 8.2e-6 but when I use the yPlus utility to check the Y+ the utility gives me d the distance it gives min max and average distance d on the wall surface but the problem is the d it gives is not the same value 8.2e-6 i gave in the ICEM meshing software the max d value is something like 4.6e-6 . so to check it I used the ruler option in the paraView to see the first cell distance it was 8.2e-6 so here I donot know what is happening and I cannot understand the C++ codes in the yPlus which complicates everything.

the problem is that the refinement utility says that 8.2e-6 is the value for my Y+ = 1 and it cannot do it since the max value it reads (4.6e-6) is smaller than the required value (8.2e-6)

what could be happening here ? why is the d value the utility calculates is different from the distance i give in ICME the utility used from post 55 http://www.cfd-online.com/Forums/ope...estcase-3.html

Thanks,
Hasan K.J
Imran358 likes this.
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius
Alhasan is offline   Reply With Quote

Old   January 31, 2015, 12:32
Default
  #55
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Hi Hasan K.J,

Warning: If you ask the same question on several threads, it will actually make it less likely that people will answer you, because that can be considered that the person posting the same questions don't care how many people's time is spent to solve your problem

Anyway, there are few details that come to mind:
  1. 4.6e-6 and 8.2e-6 almost seems to be that one is half the size of the other one.
  2. If you used ICEM to mesh, then the issue might be related to tetrahedral cells. In the sense of how these cells are handled in ICEM and then in OpenFOAM.
  3. If this wasn't enough, when opening the mesh in OpenFOAM, you have to be careful with cell decomposition, as detailed here: http://openfoamwiki.net/index.php/FA...is_in_ParaView
Beyond this, if you could provide more details on the case itself, or preferably a simple example case with a similar mesh, it would make it a lot easier to diagnose what's happening, instead of having to guess what the problem might be.

Or at the very least, provide accurate visual information of what you're seeing, since we're not psychic around here .

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 31, 2015, 13:36
Default
  #56
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
Hey Bruno,

I do respect this forum a lot and I am not spamming threads with my same questions copy pasted , If I start a thread I wait till some one replies sometimes take weeks and post my question only if it is related to the thread sometime this becomes 2 threads because I come across the second thread after a long time and I feel someone there who is active on CFD online can answer my question.

The case setup of the problem I am talking about is well explained here I guess it is enough but if you need more information I will give you. it is here in Post 1 http://www.cfd-online.com/Forums/ope...provement.html

Since the Y+ value actually influence my result a lot when validating boundary layer growth on the airfoil is the reason behind this quest of Y+.

The mesh is a structured mesh around an airfoil, the problem is the first cell distance I give in the ICEM meshing software is the same first cell height I measure using ruler option in ParaView but this first cell height is not the same height that is read by the y+ utility and like you noticed it is pretty much somewhat half of the height that I have given in ICEM. The problem is the first cell height d read by the utility is the same value used by the refinement utility provided in this thread to make the required Y+ this makes me impossible to use this utility.

as of now I am not using this Yplus utility or refinement utility instead go by the online calculators and the first cell height i give in ICEM, since it is the same value I see in paraView. but I want to be able to use these utilities.

Thanks,
Hasan K.J
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius

Last edited by Alhasan; February 1, 2015 at 08:30.
Alhasan is offline   Reply With Quote

Old   February 1, 2015, 07:20
Default
  #57
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
Hey Bruno,

Andrea just answerd this question in here http://www.cfd-online.com/Forums/ope...tml#post529870

Thanks for your time, I think my question is answered

Regards,
Hasan K.J
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius
Alhasan is offline   Reply With Quote

Old   February 1, 2015, 08:25
Default
  #58
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Hi Hasan K.J,

Quote:
Originally Posted by Alhasan View Post
I do respect this forum a lot and I am not spamming threads with my same questions copy pasted , If I start a thread I wait till some one replies sometimes take weeks and post my question only if it is related to the thread sometime this becomes 2 threads because I come across the second thread after a long time and I feel someone there who is active on CFD online can answer my question.
Many thanks for not simply copy-pasting posts
But still, I ask you to at least have your own primary thread where you coordinate where you've been trying to follow up on parts of the same topic, as well as cross-referring said main thread in the branches you've gone to. Because that can help orient both those who are trying to help you, as well as people in the future trying to figure out what was the same or similar solution.
I did see that you tried to do this in part, but the way it was done left me confused enough that I almost merged all of your posts on this topic into a single thread .

Quote:
Originally Posted by Alhasan View Post
Andrea just answerd this question in here http://www.cfd-online.com/Forums/ope...tml#post529870

Thanks for your time, I think my question is answered
Many thanks for letting me/us know, because I took a quick look yesterday and was going to look better into this and likely would have complained about the geometry you had provided did not have any of the measures you had referred to

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 23, 2021, 02:36
Default
  #59
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hello All,

Sorry for posting in this relatively old thread and many thanks for contributing towards this very useful utility. I am trying to install this utility (from refineWallLayerSmart.tar.gz) in OpenFOAM v1906. But it is giving me error:


Code:
refineWallLayerSmart.C:250:21: error: ‘GeometricBoundaryField’ is not a member of ‘Foam::volScalarField’ {aka ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>’}
  250 |     volScalarField::GeometricBoundaryField dOrg = nearWallDist(mesh).y();
      |                     ^~~~~~~~~~~~~~~~~~~~~~
refineWallLayerSmart.C:253:35: error: ‘dOrg’ was not declared in this scope
  253 |         << "\t d  : min: " << min(dOrg[patchID])
      |                                   ^~~~
refineWallLayerSmart.C:287:55: warning: ‘bool Foam::argList::optionReadIfPresent(const Foam::word&, T&) const [with T = Foam::word]’ is deprecated: Since 2018-01; use "readIfPresent() method" [-Wdeprecated-declarations]
  287 |         if (args.optionReadIfPresent("useSet", setName))
      |                                                       ^
In file included from refineWallLayerSmart.C:32:
/home/csp/OpenFOAM/OpenFOAM-v1906/src/OpenFOAM/lnInclude/argList.H:657:9: note: declared here
  657 |         optionReadIfPresent
      |         ^~~~~~~~~~~~~~~~~~~
refineWallLayerSmart.C:427:21: error: ‘GeometricBoundaryField’ is not a member of ‘Foam::volScalarField’ {aka ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>’}
  427 |     volScalarField::GeometricBoundaryField dNew =
      |                     ^~~~~~~~~~~~~~~~~~~~~~
refineWallLayerSmart.C:431:35: error: ‘dNew’ was not declared in this scope
  431 |         << "\t d  : min: " << min(dNew[patchID])
I guess some syntax had changed in the new version and that's why it is giving errors, is there any way through which it could be resolved? Any comment/suggestion will be a great help, thanks in advance.
chandra shekhar pant 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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 04:17
[mesh manipulation] Wall mesh refinement based on y+ Hrushi OpenFOAM Meshing & Mesh Conversion 1 July 9, 2017 06:06
[snappyHexMesh] snappyHexMesh - geometry does not appear in Mesh czhongrong OpenFOAM Meshing & Mesh Conversion 1 January 20, 2016 05:26
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32


All times are GMT -4. The time now is 00:19.