{"id":4869,"date":"2013-07-01T18:14:37","date_gmt":"2013-07-01T07:14:37","guid":{"rendered":"https:\/\/www.computationalfluiddynamics.com.au\/?p=1099"},"modified":"2013-07-01T18:14:37","modified_gmt":"2013-07-01T07:14:37","slug":"tips-tricks-cfd-estimate-first-cell-height","status":"publish","type":"post","link":"https:\/\/www.leapaust.com.au\/blog\/cfd\/tips-tricks-cfd-estimate-first-cell-height\/","title":{"rendered":"Tips &#038; Tricks: Estimating the First Cell Height for correct Y+"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p>[vc_row][vc_column][vc_column_text]Note: this is an old post.\u00a0 The updated post series from 2020 is LEAP&#8217;s 3-Part Series on &#8220;What y+ should I use in my simulations?&#8221; which is available here:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.computationalfluiddynamics.com.au\/y-plus_part1_understanding-the-physics-of-boundary-layers\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Part 1 \u2013 Understanding the physics of boundary layer<\/strong><strong>s<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.computationalfluiddynamics.com.au\/y-plus_part2_resolving-each-region-of-the-boundary-layer\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Part 2 \u2013 Resolving each region of the boundary layer<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.computationalfluiddynamics.com.au\/y-plus_part3_understanding-impact-of-y-and-number-of-prism-layers-on-flow-resolution\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Part 3 \u2013 Understanding impact of Y+ and number of prism layers on flow resolution<\/strong><\/a><\/li>\n<\/ul>\n<p>Old Post continues here:<\/p>\n<p>In previous posts we have stressed\u00a0the importance of\u00a0using an appropriate\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+\" alt=\"y+\" align=\"absmiddle\" \/>\u00a0value in combination with a given turbulence modelling approach. Today we will help you calculate the correct first cell height (<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?\\Delta&amp;space;y_1\" alt=\"\\Delta y_1\" align=\"absmiddle\" \/>) based on\u00a0your desired <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+\" alt=\"y+\" align=\"absmiddle\" \/>\u00a0value. This is an important first step as the global mesh resolution parameters will also be influenced by this near-wall mesh as well as the\u00a0Reynolds number.<\/p>\n<p>Let&#8217;s review the two\u00a0main choices\u00a0we have in choosing a near-wall modelling strategy:<\/p>\n<p><strong>Resolving the Viscous Sublayer<\/strong><\/p>\n<ul>\n<li>Involves the full resolution of the boundary layer and is required where wall-bounded effects are of high priority (adverse pressure gradients, aerodynamic drag, pressure drop, heat transfer, etc.)<\/li>\n<li>Wall adjacent grid height must be order\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+&amp;space;=&amp;space;\\mathcal{O}(1)\" alt=\"y+ = \\mathcal{O}(1)\" align=\"absmiddle\" \/><\/li>\n<li>Must use an appropriate low-Re number turbulence model (i.e. Shear Stress Transport)<\/li>\n<\/ul>\n<p><strong>Adopting a Wall Function Grid<\/strong><\/p>\n<ul>\n<li>Involves modelling the boundary layer using a log-law wall function. This approach is suitable for cases where wall-bounded effects are secondary, or the flow undergoes <span style=\"text-decoration: underline;\">geometry-induced<\/span> separation (such as many bluff bodies and in modern automotive vehicle design).<\/li>\n<li>Wall adjacent grid height should ideally reside in the log-law region where\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+&gt;11\" alt=\"y+&gt;11\" align=\"absmiddle\" \/><\/li>\n<li>All turbulence models are applicable (e.g. Shear Stress Transport or k-epsilon with scalable wall functions)<\/li>\n<\/ul>\n<p>During the pre-processing stage, we need to estimate\u00a0the first cell height (\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?\\Delta&amp;space;y_1\" alt=\"\\Delta y_1\" align=\"absmiddle\" \/>)\u00a0so that our\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+\" alt=\"y+\" align=\"absmiddle\" \/>\u00a0falls within the desired range. The computed flow-field will dictate the actual\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+\" alt=\"y+\" align=\"absmiddle\" \/>\u00a0value which in reality will vary along the wall.\u00a0\u00a0In some cases, we may need to locally refine our mesh to achieve the\u00a0desired\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+\" alt=\"y+\" align=\"absmiddle\" \/>\u00a0value in all regions.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>So how to calculate the First Cell Height for a desired Y+ value?<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Firstly, we should calculate the Reynolds number for our model based on the characteristic scales of our geometry such that:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?Re&amp;space;=&amp;space;\\frac{\\rho&amp;space;\\cdot&amp;space;U&amp;space;\\cdot&amp;space;L}{\\mu}\" alt=\"Re = \\frac{\\rho \\cdot U \\cdot L}{\\mu}\" align=\"absmiddle\" \/>,<\/p>\n<p>where\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?\\rho\" alt=\"\\rho\" align=\"absmiddle\" \/>\u00a0and <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?\\mu\" alt=\"\\mu\" align=\"absmiddle\" \/>\u00a0are the fluid density and viscosity respectively,\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?U\" alt=\"U\" align=\"absmiddle\" \/>\u00a0is the freestream velocity, and\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?L\" alt=\"L\" align=\"absmiddle\" \/>\u00a0is the characteristic length (e.g. pipe diameter, body length, etc.).<\/p>\n<p>The definition of the\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+\" alt=\"y+\" align=\"absmiddle\" \/>\u00a0value is such that:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+&amp;space;=&amp;space;\\frac{rho&amp;space;\\cdot&amp;space;U_\\tau&amp;space;\\cdot&amp;space;\\Delta&amp;space;y_1}{\\mu}&amp;space;\\verb+&amp;space;+\\rightarrow&amp;space;\\Delta&amp;space;y_1&amp;space;=&amp;space;\\frac{y+&amp;space;\\cdot&amp;space;\\mu}{\\rho&amp;space;\\cdot&amp;space;U_\\tau}\" alt=\"y+ = \\frac{rho \\cdot U_\\tau \\cdot \\Delta y_1}{\\mu} \\verb+ +\\rightarrow \\Delta y_1 = \\frac{y+ \\cdot \\mu}{\\rho \\cdot U_\\tau}\" align=\"absmiddle\" \/><\/p>\n<p>The target\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+\" alt=\"y+\" align=\"absmiddle\" \/>\u00a0value and fluid properties are known a priori, so we need to calculate the frictional velocity\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?U_\\tau\" alt=\"U_\\tau\" align=\"absmiddle\" \/>, which is defined as:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?U_\\tau&amp;space;=&amp;space;\\sqrt{\\frac{\\tau_w}{\\rho}}\" alt=\"U_\\tau = \\sqrt{\\frac{\\tau_w}{\\rho}}\" align=\"absmiddle\" \/><\/p>\n<p>The wall shear stress,\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?\\tau_w\" alt=\"\\tau_w\" align=\"absmiddle\" \/>\u00a0can be calculated from skin friction coefficient, <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?C_f\" alt=\"C_f\" align=\"absmiddle\" \/>,\u00a0such that:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?\\tau_w&amp;space;=&amp;space;\\frac{1}{2}\\cdot&amp;space;C_f&amp;space;\\cdot&amp;space;\\rho&amp;space;\\cdot&amp;space;U^2\" alt=\"\\tau_w = \\frac{1}{2}\\cdot C_f \\cdot \\rho \\cdot U^2\" align=\"absmiddle\" \/><\/p>\n<p>The ambiguity in calculating\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?\\Delta&amp;space;y_1\" alt=\"\\Delta y_1\" align=\"absmiddle\" \/>\u00a0surrounds the value for\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?C_f\" alt=\"C_f\" align=\"absmiddle\" \/>. Empirical results have been used to provide an estimate to this value:<\/p>\n<table border=\"\u201d1\u2033\" width=\"\u201d390\u2033\" cellspacing=\"\u201d0\u2033\" cellpadding=\"\u201d0\u2033\">\n<tbody>\n<tr>\n<td><strong>\u00a0Flow Type\u00a0<\/strong><\/td>\n<td><strong>\u00a0Empirical Estimate<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Internal Flows<\/td>\n<td><img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?C_f&amp;space;=&amp;space;0.079&amp;space;\\cdot&amp;space;Re^{-0.25}\" alt=\"C_f = 0.079 \\cdot Re^{-0.25}\" align=\"absmiddle\" \/><\/td>\n<\/tr>\n<tr>\n<td>External Flows<\/td>\n<td><img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?C_f&amp;space;=&amp;space;0.058&amp;space;\\cdot&amp;space;Re^{-0.2}\" alt=\"C_f = 0.058 \\cdot Re^{-0.2}\" align=\"absmiddle\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>We can then input these known values into the above equations to estimate our value for\u00a0\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?\\Delta&amp;space;y_1\" alt=\"\\Delta y_1\" align=\"absmiddle\" \/>.<\/p>\n<p>When considering simple flows and simple geometry, we might find this correlation is highly accurate. \u00a0However, when considering complex geometry, refinement in the boundary layer may be required to ensure the desired\u00a0<img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.latex?y+\" alt=\"y+\" align=\"absmiddle\" \/>\u00a0value is achieved.\u00a0 In these cases, you can choose to re-mesh in ANSYS Meshing or use anisotropic mesh adaption (ie. adaption of local cells only in the wall-normal direction) to achieve your\u00a0desired Y+ value across the entire model. \u00a0Please leave a comment below or contact our support line if you have any questions.<\/p>\n<p>For the lazy CFD-ers out there, we have written an applet for you to estimate the cell height quickly.<\/p>\n<p><iframe style=\"width: 100%; height: 800px;\" src=\"https:\/\/embed.plnkr.co\/IWnRIQ8HCvnD4if901F9\/?show=preview\" width=\"300\" height=\"150\" frameborder=\"0\"><\/iframe>[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text]Note: this is an old post.\u00a0 The updated post series from 2020 is LEAP&#8217;s 3-Part Series on &#8220;What y+ should I use in my simulations?&#8221; which is available here: Part 1 \u2013 Understanding the physics of boundary layers Part 2 \u2013 Resolving each region of the boundary layer Part 3 \u2013 Understanding impact of Y+&hellip;&nbsp;<a href=\"https:\/\/www.leapaust.com.au\/blog\/cfd\/tips-tricks-cfd-estimate-first-cell-height\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Tips &#038; Tricks: Estimating the First Cell Height for correct Y+<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":4163,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","footnotes":""},"categories":[323],"tags":[174,181,393,395,396,446,449,273,508,515],"class_list":["post-4869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cfd","tag-ansys-cfd","tag-ansys-meshing","tag-cfd-meshing-methods","tag-cfd-modelling-of-turbulent-flows","tag-cfd-simulation-accuracy","tag-inflation-layer-meshing","tag-mesh-control-settings","tag-prediction-of-aerodynamic-flows","tag-turbulence-modelling","tag-wall-functions"],"_links":{"self":[{"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/posts\/4869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/comments?post=4869"}],"version-history":[{"count":0,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/posts\/4869\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/media\/4163"}],"wp:attachment":[{"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/media?parent=4869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/categories?post=4869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/tags?post=4869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}