|
[Sponsors] |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 28, 2012, 18:21 |
Contribution a new utility: refine wall layer mesh based on yPlus field
|
#1 |
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21 |
Dear all,
As discussed in this thread, there is a need to refine the wall layer mesh based on the yPlus or yStar information on the patch fields. So I modified the original refineWallLayer utility and make a "smart"-refine-wall-layer-mesh utility. Here it is: refineWallLayerSmart.tar.gz Most of the options are similar to the original refineWallLayer utility, only "esgeWeight" is replaced by "stretchingRatio", which I think will make more sense. It should be larger than 1, best to be around 1~1.5, in order not to have too big stretching ratios. The key feature here is to refine the mesh not just once, but many times based on the current yPlus file or yStar file information, so to reach a desired estimated yPlus value. The default yPlus target value is to reach y+=1; Of cause you can set any other y+ target; To use this utility, please turn on the "basedOnYPlus" option. If "basedOnYPlus" option is off, the utility behaves like original refineWallLayer utily. I do not see a need to use "cellSet" mechanism, so by default, when the "basedOnYPlus" option is turned on, the whole wall layer is refined. Of cause however, this method is just a rough estimation, the real flow field and the yPlus values need to you to rerun the simulation! Code:
$ refineWallLayerSmart -help Usage: refineWallLayerSmart [OPTIONS] <patchName> <stretchingRatio> options: -basedOnYPlus Based on y+/y* field, run these utilities first. Target yPlus is unity -case <dir> specify alternate case directory, default is the cwd -noFunctionObjects do not execute functionObjects -overwrite overwrite existing mesh/results files -refineLevel <value> Manually set the refineLevel, e.g. 3 -targetYPlus <value> Manually set the target yPlus, e.g. 5 or 30 -useSet <name> (obsoleted) restrict cells to refine based on specified cellSet name -srcDoc display source code in browser -doc display application documentation in browser -help print the usage A smart way to refine wall layer cells based on the y+/y* value. Please turn on the option "basedOnYPlus"to see its effect Code:
refineWallLayerSmart -basedOnYPlus cyl 1.15 Code:
refineWallLayerSmart -basedOnYPlus -targetYPlus 30 cyl 1.15 If "-targetYPlus 50" is larger than the mean yPlus value on that patch, error will show. That is no need to refine. Code:
refineWallLayerSmart -basedOnYPlus -targetYPlus 30 -refineLevel 3 cyl 1.15 The following is a sample output: Code:
$ refineWallLayerSmart -basedOnYPlus -targetYPlus 2 cyl 1.12 /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.1.0-5141eb679a6c Exec : refineWallLayerSmart -basedOnYPlus -targetYPlus 2 cyl 1.12 Date : Nov 28 2012 Time : 18:29:59 Host : "ubuntuWorkStation" PID : 13010 Case : .../run/test/rectangular 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 = 0.01 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! Mean yPlus is 19.8019, targetYPlusValue is 2, refineLevel is 4 Originally, patch 0 named cyl d : min: 0.00069375 max: 0.0008625 average: 0.000735 Selected 284 cells connected to patch cyl Cutting: cells:284 edges:568 Morphing ... Selected 284 cells connected to patch cyl Cutting: cells:284 edges:568 Morphing ... Selected 284 cells connected to patch cyl Cutting: cells:284 edges:568 Morphing ... Selected 284 cells connected to patch cyl Cutting: cells:284 edges:568 Morphing ... Writing refined morphMesh to time 0.01001 After refining, Patch 0 named cyl d : min: 5.405e-05 max: 6.7e-05 average: 5.72429e-05 End Comments and suggestions are very welcome! Cheers,
__________________
~ Daniel WEI ------------- Boeing Research & Technology - China Beijing, China |
|
|
|
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 |