# Meshing Defaults

The Meshing Defaults in Flow360 provide fundamental control over mesh generation parameters, affecting both surface and volume mesh characteristics. These settings serve as global defaults that determine the quality and characteristics of the computational mesh.


# 📝 Meshing Defaults Configuration

The Meshing Defaults define the baseline mesh generation parameters that control element size progression, boundary layer characteristics, and surface mesh properties.


# 📋 Available Parameters

Parameter Description Unit
Surface edge growth rate Controls the size progression of elements grown from edges dimensionless
Surface max edge length Maximum allowable edge length for surface elements length (e.g. m)
Curvature resolution angle Maximum angle, a single surface mesh element can span angle (e.g. degree)
Boundary layer growth rate Growth rate for prismatic boundary layer elements dimensionless
Boundary layer first layer thickness First layer thickness for volumetric anisotropic layers length (e.g. m)
Refinement factor Global scaling factor for mesh refinement dimensionless
Gap treatment strength Controls mesh behavior in narrow gaps dimensionless

# 🔍 Detailed Descriptions

# Surface Mesh Parameters

Surface edge growth rate

Controls the size progression of mesh elements grown from edges, affecting the transition between regions of different refinement (anisotropic to isotropic).

  • Default: 1.2
  • Units: Dimensionless
  • Notes:
    • Values must be larger than 1.0, typically 1.1-1.25
    • Cannot be overridden per edge
    • Higher values will lead to faster mesh size growth but also potential quality reduction

Surface max edge length

Defines the maximum allowable length for any mesh edge on surfaces.

  • Default: None (must be specified)
  • Units: Length units (e.g., meters)
  • Notes:
    • Can be overridden using SurfaceRefinement
    • Should be chosen based on geometry scale and required resolution
    • Affects overall mesh density and computational cost

Curvature resolution angle

Specifies the maximum angular deviation allowed in the surface mesh.

  • Default: 12 degrees
  • Units: Degrees
  • Notes:
    • Controls both:
      1. Angle between cell normal and underlying surface normal
      2. Angle between line segment normal and underlying curve normal
    • Cannot be overridden per face
    • Lower values capture curvature more accurately but increase mesh density

# Volume Mesh Parameters

Boundary layer growth rate

Defines the growth rate of prismatic layers in the boundary layer region.

  • Default: 1.2
  • Units: Dimensionless
  • Notes:
    • Controls thickness progression of successive boundary layer elements
    • Values must be larger than 1.0, typically 1.1-1.25
    • Lower values create more gradual growth but increase total element count
    • Critical for accurate boundary layer resolution

Boundary layer first layer thickness

Specifies the height of the first prismatic layer adjacent to wall surfaces.

  • Default: None (must be specified)
  • Units: Length units (e.g., millimeters)
  • Notes:
    • Can be overridden using BoundaryLayer settings
    • Critical for achieving desired y+ values
    • Should be calculated based on Reynolds number and desired y+ value

# Advanced Parameters

Refinement factor

Global scaling factor that affects the overall mesh refinement level.

  • Default: 1.0
  • Units: Dimensionless
  • Notes:
    • Values > 1.0 increase global mesh refinement
    • Values < 1.0 decrease global mesh refinement
    • Affects both surface and volume mesh density
    • Useful for quick mesh resolution studies

Gap treatment strength

Controls how the mesh transitions in narrow gaps between surfaces.

  • Default: 0.0
  • Units: Dimensionless
  • Notes:
    • Higher values dedicate more space to isotropic mesh in narrow gaps
    • Lower values maintain more anisotropic mesh structure
    • Critical for mesh quality in tight geometric spaces
    • Helps prevent highly skewed elements in narrow regions

💡 Tips

Surface Mesh Generation

  • Use surface edge growth rate between 1.1-1.3 for most applications
  • Set max edge length based on biggest geometric features requiring resolution
  • Consider reducing curvature resolution angle for highly curved surfaces

Boundary Layer Mesh

  • Calculate first layer thickness based on desired y+ value
  • Use growth rates between 1.1-1.2 for accurate boundary layer resolution
  • Consider using lower growth rates for:
    • High Reynolds number flows
    • Cases requiring accurate skin friction prediction
    • Flows with expected separation

General Guidelines

  • Balance mesh density with computational resources
  • Ensure smooth transitions between different mesh regions
  • Validate mesh quality metrics before simulation
  • Consider local refinement for critical flow regions
  • Use refinement factor for quick mesh resolution studies
  • Adjust gap treatment strength when dealing with narrow passages

❓ Frequently Asked Questions

  • How do I determine the appropriate first layer thickness?

    Calculate based on desired y+ value using Reynolds number and flow conditions. For turbulent flow analysis with wall functions, target y+ ≈ 30-100. For resolving the viscous sublayer, target y+ < 1.

  • What surface edge growth rate should I use?

    Start with the default of 1.2. Use lower values (1.1-1.15) for more gradual transitions in critical regions, and higher values (up to 1.3) where rapid growth is acceptable. Keep in mind that lower values will lead to higher mesh count.

  • How does curvature resolution angle affect my mesh?

    Lower angles provide better curvature capture but increase mesh density. The default of 12 degrees works well for most applications. Use smaller angles (5-10 degrees) for highly curved surfaces or when accurate surface pressure distribution is critical.

  • When should I modify the refinement factor?

    Use the refinement factor for quick mesh resolution studies or when you need to globally adjust mesh density without changing other parameters. Start with 1.0 and adjust up or down based on your accuracy needs and computational resources.

  • How do I choose the right gap treatment strength?

    Start with 0.0 and increase if you observe poor quality elements in narrow gaps. Higher values (0.2-0.5) are typically useful for geometries with tight clearances or complex intersections. Very high values may unnecessarily increase element count.


🐍 Python Example Usage

Below is a Python code example showing how to configure meshing defaults:

import flow360 as fl
from flow360 import u

meshing_defaults = fl.MeshingDefaults(
    surface_edge_growth_rate=1.2,
    surface_max_edge_length=0.1 * u.m,
    curvature_resolution_angle=12 * u.deg,
    boundary_layer_growth_rate=1.2,
    boundary_layer_first_layer_thickness=0.01 * u.mm,
)