multi_blade_row#
Module for working on a multi blade row turbomachinery case using PyTurboGrid instances in parallel.
Classes:
|
Facilitates working on a multi blade row turbomachinery case using PyTurboGrid instances in parallel. |
- class ansys.turbogrid.core.multi_blade_row.multi_blade_row.MultiBladeRow(working_dir: str, case_directory: str, ndf_file_name: str)#
Bases:
object
Facilitates working on a multi blade row turbomachinery case using PyTurboGrid instances in parallel.
Classes:
TurboGridLocationType
(value)Specifies whether the PyTurboGrid class should launch TurboGrid from the given location, or connect to a running session of TurboGrid.
Methods:
__init__
(working_dir, case_directory, ...)Initialize the class using name with full path of an NDF file for the multi blade row case.
execute
([mode])Execute the multi blade row meshing process.
set_blade_boundary_layer_offsets
(...[, ...])Set the boundary layer first element offset for the blades.
set_blade_rows_to_mesh
(blades_to_mesh)Set the blade rows to be meshed.
set_custom_blade_settings
(custom_blade_settings)Set custom meshing settings for particular blade rows.
set_global_size_factor
(assembly_gsf)Set the global size factor to be used for all the blade rows.
set_multi_process_count
(multi_process_count)Set number of processes to be used in parallel for meshing the selected blade rows.
set_spanwise_counts
(stator_spanwise_count, ...)Set the spanwise count of mesh elements for the different blade rows.
Attributes:
When working in Ansys Labs, the number of attempts to be made for file transfer from container to the local working directory results folder.
List of the quality measures to be reported for each blade row.
The unit to be used for the angles in the meshing reports.
Number of decimal places to be used for values in the meshing reports.
When working in Ansys Labs, the name with full path of the file containing the container key.
Set True to write tginit first before processing blade rows in parallel by reading the tginit instead of reading ndf in parallel and writing separate tginit for each blade row.
- class TurboGridLocationType(value)#
Bases:
IntEnum
Specifies whether the PyTurboGrid class should launch TurboGrid from the given location, or connect to a running session of TurboGrid. :member-order: bysource
- __init__(working_dir: str, case_directory: str, ndf_file_name: str)#
Initialize the class using name with full path of an NDF file for the multi blade row case.
Parameters#
- working_dirstr
Directory to be used as the starting point of operation and to place the results folder.
- case_directorystr
Directory containing the NDF file. If this is not given as an absolute full path, it will be taken as relative to the working directory. Further, the results directory will be named with an “_results” suffix for the case directory name and placed in the working directory.
- ndf_file_namestr
Name of the NDF file containing the blade rows for the multi blade row case. This file is assumed to be present in the case_directory provided above.
- execute(mode: TurboGridLocationType = TurboGridLocationType.TURBOGRID_INSTALL)#
Execute the multi blade row meshing process.
Parameters#
- modeTurboGridLocationType, default: TurboGridLocationType.TURBOGRID_INSTALL
The mode of operation with respect to the TurboGrid instance being used. Permitted values are: TurboGridLocationType.TURBOGRID_INSTALL if locally installed TurboGrid has to be used and TurboGridLocationType.TURBOGRID_ANSYS_LABS if TurboGrid running in a container on Ansys Labs has to be used.
- max_file_transfer_attempts = 20#
When working in Ansys Labs, the number of attempts to be made for file transfer from container to the local working directory results folder.
- report_mesh_quality_measures = ['Edge Length Ratio', 'Minimum Face Angle', 'Minimum Volume', 'Orthogonality Angle']#
List of the quality measures to be reported for each blade row. Permitted entries are: “Connectivity Number”, “Edge Length Ratio”, “Element Volume Ratio”, “Maximum Face Angle”, “Minimum Face Angle”, “Minimum Volume”, “Orthogonality Angle”, “Skewness”
- report_stats_angle_unit = 'deg'#
The unit to be used for the angles in the meshing reports. Use “rad” for angles in radian and “deg” for angles in degrees.
- report_stats_decimal_places = 3#
Number of decimal places to be used for values in the meshing reports.
- set_blade_boundary_layer_offsets(assembly_bl_offset: float, custom_blade_bl_offsets: dict | None = None)#
Set the boundary layer first element offset for the blades.
Parameters#
- assembly_bl_offsetfloat
The first element offset to be applied to all blade row blades.
- custom_blade_bl_offsetsdict, default: None
Custom first element offset for particular blades given in the form of a dictionary: {‘bladename’ : offset,…}
- set_blade_rows_to_mesh(blades_to_mesh: list)#
Set the blade rows to be meshed.
Parameters#
- blades_to_meshlist
Names of the main blade from each blade row to be meshed in a list. If an empty list is provided, all blade rows will be selected for meshing.
- set_custom_blade_settings(custom_blade_settings: dict)#
Set custom meshing settings for particular blade rows.
Parameters#
- custom_blade_settingsdict
Special settings for particular blade rows in a dictionary in the form: { blade_name : [(“Full CCL Object Path”, “Param Name=Value”), … ], … }
Here each blade row has to be identified by the name of the main blade in the row.
- set_global_size_factor(assembly_gsf: float)#
Set the global size factor to be used for all the blade rows.
Parameters#
- assembly_gsffloat
The Global Size Factor to be used for each blade row. If not called, the default size factor of 1 will be used.
- set_multi_process_count(multi_process_count: int)#
Set number of processes to be used in parallel for meshing the selected blade rows.
Parameters#
- multi_process_countint
The number of processes to be used in parallel. This will be limited to the smaller of the number of blade rows to mesh and the cpu count of the system. A value of zero will use the maximum possible number of processes.
- set_spanwise_counts(stator_spanwise_count: int, rotor_spanwise_count: int, rotor_blade_rows_blades: list = [])#
Set the spanwise count of mesh elements for the different blade rows.
Parameters#
- stator_spanwise_countint
The element count in the spanwise direction for stator blade rows.
- rotor_spanwise_countint
The element count in the spanwise direction for rotor blade rows.
- rotor_blade_rowslist, default: []
List of main blade from each rotor blade row. If not provided, all even numbered rows will be taken as rotor with row numbering starting at 1.
- tg_container_key_file = ''#
When working in Ansys Labs, the name with full path of the file containing the container key.
- write_tginit_first = False#
Set True to write tginit first before processing blade rows in parallel by reading the tginit instead of reading ndf in parallel and writing separate tginit for each blade row.