Model.computeboundarylayerthickness#

Model.computeboundarylayerthickness(bl_collection, non_bl_collection, first_layer_thickness, number_of_layers, layer_growth_rate, minimum_core_to_boundary_layer_thickness_ratio, corner_thickness_scaling_factor, check_for_closure_flag, logfile='')#

This function is used for computing the boundary layer thickness reduction factors based on the proximity used for the boundary layer mesh generation. The input to this function is a collection of “wall” elements (on which the boundary layer needs to be grown), and another collection of elements which are not “wall” elements, like inlet, outlet, symmetry, far field, etc.. The output is a load collector named ^CFD_BL_Thickness with loads representing the reduction factors.

Parameters:
  • bl_collection (Collection) – The collection containing the boundary layer input entities. Valid entities are elements and components.

  • non_bl_collection (Collection) – The collection containing the non-boundary layer input entities. Valid entities are elements and components.

  • first_layer_thickness (double) – The thickness value of first layer.

  • number_of_layers (double) – The number of layers.

  • layer_growth_rate (double) – The growth rate of the boundary layers.

  • minimum_core_to_boundary_layer_thickness_ratio (double) – Minimum ratio of core mesh to boundary layer thickness, which is used for boundary layer reduction.

  • corner_thickness_scaling_factor (double) – A dimensionless value used for corner management. The range is 0.1-1.0 for thinner boundary layer thickness, and 1.0-10.0 for thicker boundary layer thickness.

  • check_for_closure_flag (double) – Check enclosure. If check_for_closure_flag=1 enclosure should be checked.

  • logfile (hwString) – The log file path.

Example#

Generate thickness reduction factors for the component named wall, with the components named inlet and outlet being the non-boundary layer elements#
import hm
import hm.entities as ent

model = hm.Model()

bl_collection = hm.Collection(model, ent.Component, "name=wall")
non_bl_collection = hm.Collection(model, ent.Component, "Name=inlet OR Name=outlet")

model.computeboundarylayerthickness(
    bl_collection=bl_collection,
    non_bl_collection=non_bl_collection,
    first_layer_thickness=0.1,
    number_of_layers=5,
    layer_growth_rate=1.2,
    minimum_core_to_boundary_layer_thickness_ratio=2.0,
    corner_thickness_scaling_factor=1.0,
    check_for_closure_flag=1,
    logfile="C:/output.txt",
)