Skip to content

Commit

Permalink
mesh output type chose removed
Browse files Browse the repository at this point in the history
  • Loading branch information
GBenedett committed Apr 18, 2024
1 parent e861710 commit a5de8ab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
27 changes: 7 additions & 20 deletions ceasiompy/CPACS2GMSH/__specs__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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",
Expand All @@ -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(
Expand All @@ -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(
Expand Down
5 changes: 1 addition & 4 deletions ceasiompy/CPACS2GMSH/cpacs2gmsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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():
Expand All @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions ceasiompy/CPACS2GMSH/func/RANS_mesh_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
Expand Down

0 comments on commit a5de8ab

Please sign in to comment.