From a5de8ab639b0b2b12b256cd70f722b14a5ccc2b1 Mon Sep 17 00:00:00 2001 From: GBenedett Date: Thu, 18 Apr 2024 15:51:27 +0200 Subject: [PATCH] mesh output type chose removed --- ceasiompy/CPACS2GMSH/__specs__.py | 27 +++++-------------- ceasiompy/CPACS2GMSH/cpacs2gmsh.py | 5 +--- .../CPACS2GMSH/func/RANS_mesh_generator.py | 5 ++-- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/ceasiompy/CPACS2GMSH/__specs__.py b/ceasiompy/CPACS2GMSH/__specs__.py index cb240e7ba..7b2d512fe 100644 --- a/ceasiompy/CPACS2GMSH/__specs__.py +++ b/ceasiompy/CPACS2GMSH/__specs__.py @@ -21,7 +21,6 @@ GMSH_MESH_SIZE_FACTOR_FUSELAGE_XPATH, GMSH_MESH_SIZE_FACTOR_WINGS_XPATH, GMSH_MESH_TYPE_XPATH, - GMSH_MESH_FORMAT_XPATH, GMSH_NUMBER_LAYER_XPATH, GMSH_H_FIRST_LAYER_XPATH, GMSH_MAX_THICKNESS_LAYER_XPATH, @@ -184,8 +183,8 @@ cpacs_inout.add_input( var_name="max_layer_thickness", var_type=float, - default_value=10, - unit="[cm]", + default_value=100, + unit="[mm]", descr="The maximum allowed absolute thickness of the prismatic layer.", xpath=GMSH_MAX_THICKNESS_LAYER_XPATH, gui=True, @@ -241,18 +240,6 @@ gui_group="RANS options", ) -cpacs_inout.add_input( - var_name="type_output_penta", - var_type=list, - default_value=["su2", "cgns", "sml"], - unit="1", - descr="Choice between the file type generated by pentagrow", - xpath=GMSH_MESH_FORMAT_XPATH, - gui=True, - gui_name="Choice the output file type", - gui_group="RANS options", -) - cpacs_inout.add_input( var_name="export_propellers", var_type=bool, @@ -274,7 +261,7 @@ xpath=GMSH_N_POWER_FACTOR_XPATH, gui=True, gui_name="n power factor", - gui_group="Advanced mesh parameters", + gui_group="Advanced Euler mesh parameters", ) cpacs_inout.add_input( @@ -286,7 +273,7 @@ xpath=GMSH_N_POWER_FIELD_XPATH, gui=True, gui_name="n power field", - gui_group="Advanced mesh parameters", + gui_group="Advanced Euler mesh parameters", ) cpacs_inout.add_input( @@ -298,7 +285,7 @@ xpath=GMSH_REFINE_FACTOR_XPATH, gui=True, gui_name="LE/TE refinement factor", - gui_group="Advanced mesh parameters", + gui_group="Advanced Euler mesh parameters", ) cpacs_inout.add_input( var_name="refine_truncated", @@ -309,7 +296,7 @@ xpath=GMSH_REFINE_TRUNCATED_XPATH, gui=True, gui_name="Refine truncated TE", - gui_group="Advanced mesh parameters", + gui_group="Advanced Euler mesh parameters", ) cpacs_inout.add_input( @@ -322,7 +309,7 @@ xpath=GMSH_AUTO_REFINE_XPATH, gui=True, gui_name="Auto refine", - gui_group="Advanced mesh parameters", + gui_group="Advanced Euler mesh parameters", ) cpacs_inout.add_input( diff --git a/ceasiompy/CPACS2GMSH/cpacs2gmsh.py b/ceasiompy/CPACS2GMSH/cpacs2gmsh.py index 2bb960d70..b7da8ffa3 100644 --- a/ceasiompy/CPACS2GMSH/cpacs2gmsh.py +++ b/ceasiompy/CPACS2GMSH/cpacs2gmsh.py @@ -60,7 +60,6 @@ GMSH_GROWTH_RATIO_XPATH, GMSH_MIN_MAX_MESH_SIZE_XPATH, GMSH_FEATURE_ANGLE_XPATH, - GMSH_MESH_FORMAT_XPATH, ) from cpacspy.cpacsfunctions import create_branch, get_value_or_default from cpacspy.cpacspy import CPACS @@ -118,7 +117,6 @@ def cpacs2gmsh(cpacs_path, cpacs_out_path): growth_ratio = get_value_or_default(cpacs.tixi, GMSH_GROWTH_RATIO_XPATH, 1.2) min_max_mesh_factor = get_value_or_default(cpacs.tixi, GMSH_MIN_MAX_MESH_SIZE_XPATH, 5) feature_angle = get_value_or_default(cpacs.tixi, GMSH_FEATURE_ANGLE_XPATH, 40) - type_output_penta = get_value_or_default(cpacs.tixi, GMSH_MESH_FORMAT_XPATH, "su2") # Run mesh generation if type_mesh == "Euler": @@ -156,7 +154,7 @@ def cpacs2gmsh(cpacs_path, cpacs_out_path): brep_dir, results_dir, open_gmsh=open_gmsh, - min_max_mesh_factor=min_max_mesh_factor + min_max_mesh_factor=min_max_mesh_factor, ) if gmesh_path.exists(): @@ -171,7 +169,6 @@ def cpacs2gmsh(cpacs_path, cpacs_out_path): growth_factor=growth_factor, growth_ratio=growth_ratio, feature_angle=feature_angle, - type_output_penta=type_output_penta ) if mesh_path.exists(): create_branch(cpacs.tixi, SU2MESH_XPATH) diff --git a/ceasiompy/CPACS2GMSH/func/RANS_mesh_generator.py b/ceasiompy/CPACS2GMSH/func/RANS_mesh_generator.py index be344c472..97b564866 100644 --- a/ceasiompy/CPACS2GMSH/func/RANS_mesh_generator.py +++ b/ceasiompy/CPACS2GMSH/func/RANS_mesh_generator.py @@ -261,7 +261,6 @@ def pentagrow_3d_mesh( growth_factor, growth_ratio, feature_angle, - type_output_penta, ) -> None: # create the config file for pentagrow config_penta_path = Path(result_dir, "config.cfg") @@ -271,10 +270,10 @@ def pentagrow_3d_mesh( FeatureAngle = feature_angle InitialHeight = h_first_layer * (10**-5) MaxGrowthRatio = growth_ratio - MaxLayerThickness = max_layer_thickness + MaxLayerThickness = max_layer_thickness / 10 FarfieldRadius = fuselage_maxlen * farfield_factor * 100 FarfieldCenter = "0.0 0.0 0.0" - OutputFormat = type_output_penta + OutputFormat = "su2" HolePosition = "0.0 0.0 0.0" TetgenOptions = "-pq1.3VY" TetGrowthFactor = growth_factor