multi_blade_row#
Module for working on a multi blade row turbomachinery case using PyTurboGrid instances in parallel.
Classes:
This class spawns multiple TG instances and can initialize and control an entire blade row at once. |
- class ansys.turbogrid.core.multi_blade_row.multi_blade_row.multi_blade_row#
Bases:
object
This class spawns multiple TG instances and can initialize and control an entire blade row at once.
Classes:
MachineSizingStrategy
(value)These are machine sizing strategies that can be optionally applied using set_machine_sizing_strategy.
Methods:
__init__
()Empty initializer.
Query the background topology face areas for each blade row.
Query the base topology face areas for each blade row.
Query the element count for each blade row.
Query the blade-row-local global size factor for each blade row.
Query the number of spanwise elements for each blade row.
init_from_ndf
(ndf_path[, ...])Initialize the MBR representation with an ndf file.
init_from_tgmachine
(tgmachine_path, tg_log_level)Initialize the MBR representation with a TGMachine file.
Display the machine's mesh boundaries using pyvista.
Write out the .def files representing the entire blade row.
set_global_size_factor
(blade_row_name, ...)Set the blade-row-local global size factor for blade_row_name.
set_machine_base_size_factors
(size_factors)Manual setting for per-blade-row sizings, and set the machine size factor to 1.0.
set_machine_size_factor
(size_factor)Set the entire machine's size factor.
set_machine_sizing_strategy
(strategy)Set the automatic machine sizing strategy for this machine.
set_machine_target_node_count
(target_node_count)Instead of size factors, a target node count can be specified.
set_number_of_blade_sets
(blade_row_name, ...)Set the number of blade sets for blade_row_name.
- class MachineSizingStrategy(value)#
Bases:
IntEnum
These are machine sizing strategies that can be optionally applied using set_machine_sizing_strategy.
Description#
- MIN_FACE_AREA
This strategy attempts to size each blade row so that the element sizes are all equal, by using the blade row with the smallest face area as the target. This is the most robust strategy, although can result in many elements for the larger blade rows, and if the blade row is too large, the sizing may be huge.
- __init__()#
Empty initializer.
- get_average_background_face_areas() dict #
Query the background topology face areas for each blade row. This is TurboGrid specific information.
- get_average_base_face_areas() dict #
Query the base topology face areas for each blade row. This is TurboGrid specific information.
- get_element_counts() dict #
Query the element count for each blade row.
- get_local_gsf() dict #
Query the blade-row-local global size factor for each blade row.
- get_spanwise_element_counts() dict #
Query the number of spanwise elements for each blade row.
- init_from_ndf(ndf_path: str, use_existing_tginit_cad: bool = False, tg_log_level: TurboGridLogLevel = TurboGridLogLevel.INFO, turbogrid_path: str | None = None, turbogrid_location_type=TurboGridLocationType.TURBOGRID_INSTALL, tg_container_launch_settings: dict[str, str] = {}, tg_kw_args={})#
Initialize the MBR representation with an ndf file. The file must be compatible with TurboGrid import ndf.
Parameters#
- ndf_pathstr
The full absolute path and file name for the ndf file.
- use_existing_tginit_cadbool, default:
False
If true, a .tginit and .x_b file with the same name as the ndf_path will be used. If false, TG will (re)generate these files.
- tg_log_levelPyTurboGrid.TurboGridLogLevel, default:
INFO
Logging settings for the underlying TG instances. The log_filename_suffix will be the ndf file name, and the flowpath for the worker instances.
- turbogrid_pathstr, default:
None
Optional specifying for cfxtg path. Otherwise, launcher will attempt to find it automatically.
- turbogrid_location_typePyTurboGrid.TurboGridLocationType, default:
TURBOGRID_INSTALL
For container/cloud operation, this can be changed. Generally only used by devs/github.
- tg_container_launch_settingsdict[str, str], default:
{}
For dev usage.
- init_from_tgmachine(tgmachine_path: str, tg_log_level)#
Initialize the MBR representation with a TGMachine file. Still under development
- plot_machine()#
Display the machine’s mesh boundaries using pyvista. Experimental.
- save_meshes()#
Write out the .def files representing the entire blade row. Blade rows that threw errors will not write meshes (check the logs.) The assembly can be opened directly in CFX-Pre (Meshes contain some topology.)
- set_global_size_factor(blade_row_name: str, size_factor: float)#
Set the blade-row-local global size factor for blade_row_name.
- set_machine_base_size_factors(size_factors: dict[str, float])#
Manual setting for per-blade-row sizings, and set the machine size factor to 1.0.
- set_machine_size_factor(size_factor: float)#
Set the entire machine’s size factor. Higher means more (and smaller) elements.
- set_machine_sizing_strategy(strategy: MachineSizingStrategy)#
Set the automatic machine sizing strategy for this machine. The machine simulation must be initialized already.
- set_machine_target_node_count(target_node_count: int)#
Instead of size factors, a target node count can be specified. Less robust but more predictable than using a size factor. Count must be over 50,000, and a count too high may be problematic.
- set_number_of_blade_sets(blade_row_name: str, number_of_blade_sets: int)#
Set the number of blade sets for blade_row_name.