base_meshing#
Internal base class for all meshing sessions.
This module is private. Do not import from it directly; use
PureMeshing or
Meshing instead.
Both leaf classes are lightweight and add no further public API beyond what
is defined here. PureMeshing targets deployments where meshing and
solving run as separate processes; Meshing additionally exposes
switch_to_solver().
Classes:
|
Base class providing the full public API for all meshing sessions. |
- class ansys.fluent.core.meshing.session.base_meshing.BaseMeshing(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#
Bases:
BaseSessionBase class providing the full public API for all meshing sessions.
Both
PureMeshingandMeshinginherit from this class and add no further public methods.Attributes:
Datamodel root of PMFileManagement.
Datamodel root of
PartManagement.Get the currently active meshing workflow.
Get the currently active meshing workflow using the legacy implementation.
Meshing object.
A wrapper over Fluent's meshing queries.
Full API to meshing and meshing_workflow.
Datamodel root of preferences.
Instance of
main_menuon which Fluent's SolverTUI methods can be executed.Datamodel root of workflow.
Methods:
__init__(fluent_connection, scheme_eval[, ...])BaseMeshing session.
__new__(cls, *args, **kwargs)create_workflow([legacy, initialize])Create a new blank meshing workflow for manual task configuration.
fault_tolerant([legacy])Get the fault-tolerant meshing workflow.
load_workflow(file_path[, legacy, initialize])Load a previously saved meshing workflow from file.
topology_based([legacy])Get the topology-based meshing workflow (beta feature).
transfer_mesh_to_solvers(solvers[, ...])Transfer mesh to Fluent solver instances.
two_dimensional_meshing([legacy])Get the 2D meshing workflow.
watertight([legacy])Get the watertight meshing workflow.
- property PMFileManagement: Root#
Datamodel root of PMFileManagement.
See the PMFileManagement datamodel for the complete hierarchy of objects and operations.
- property PartManagement: Root#
Datamodel root of
PartManagement.See the PartManagement datamodel for its complete hierarchy of objects and operations.
- __init__(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#
BaseMeshing session.
- Parameters:
- fluent_connection
FluentConnection Encapsulates a
FluentConnection.- scheme_eval: SchemeInterpreter
Instance of
SchemeInterpreterto execute Fluent’s scheme code on.- file_transfer_service
Optional Service for uploading and downloading files.
- start_transcriptbool,
optional Whether to start the Fluent transcript in the client. The default is
True, in which case the Fluent transcript can be subsequently started and stopped using method calls on theSessionobject.
- fluent_connection
- static __new__(cls, *args, **kwargs)#
- create_workflow(legacy=None, initialize=True)#
Create a new blank meshing workflow for manual task configuration.
Provides an empty workflow to build custom task sequences from scratch.
- Parameters:
- initialize: bool, optional
If True (default), initializes the workflow with default settings and prepares it for immediate use. If False, creates the workflow without initialization, useful when loading a saved state or applying custom configuration before starting.
- legacybool,
optional If True, creates the legacy PyFluent-native interface. If False, creates the PyFluent-native interface. If None (default), uses the legacy PyFluent-native interface for Fluent versions up to 25R2 and uses the PyFluent-native interface for later versions (since 26R1).
- Returns:
CreateMeshingWorkflowNewly created meshing workflow.
- property current_workflow#
Get the currently active meshing workflow.
- fault_tolerant(legacy=None)#
Get the fault-tolerant meshing workflow.
- Parameters:
- legacybool,
optional If True, returns the legacy PyFluent-native interface. If False, returns the PyFluent-native interface. If None (default), auto-selects based on Fluent version: legacy PyFluent-native for versions up to 25R2, PyFluent-native from 26R1 onwards.
- legacybool,
- Returns:
FaultTolerantMeshingFault-tolerant meshing workflow.
- property legacy_current_workflow#
Get the currently active meshing workflow using the legacy implementation.
- load_workflow(file_path, legacy=None, initialize=True)#
Load a previously saved meshing workflow from file.
Restores workflow configuration including tasks, settings, and state.
- Parameters:
- file_path
strorPathType Path to the saved workflow file (typically with .wft extension).
- initialize: bool, optional
If True (default), initializes the workflow with default settings and prepares it for immediate use. If False, creates the workflow without initialization, useful when loading a saved state or applying custom configuration before starting.
- legacybool,
optional If True, creates the legacy PyFluent-native interface. If False, creates the PyFluent-native interface. If None (default), uses the legacy PyFluent-native interface for Fluent versions up to 25R2 and uses the PyFluent-native interface for later versions (since 26R1).
- file_path
- Returns:
LoadMeshingWorkflowLoaded meshing workflow.
- property meshing: Root#
Meshing object.
See the meshing datamodel for the complete hierarchy of meshing objects and operations.
- property meshing_utilities: Root#
A wrapper over Fluent’s meshing queries.
See the meshing utilities datamodel for the complete collection of available meshing operations.
- property meshing_workflow: Root#
Full API to meshing and meshing_workflow.
See the meshing workflow datamodel for the complete hierarchy of workflow tasks and operations.
- property preferences: Root#
Datamodel root of preferences.
See the preferences datamodel for the complete hierarchy of preference objects and operations.
- topology_based(legacy=None)#
Get the topology-based meshing workflow (beta feature).
- Parameters:
- legacybool,
optional If True, returns the legacy PyFluent-native interface. If False, returns the PyFluent-native interface. If None (default), auto-selects based on Fluent version: legacy PyFluent-native for versions up to 25R2, PyFluent-native from 26R1 onwards.
- legacybool,
- Returns:
TopologyBasedMeshingTopology-based meshing workflow.
- Raises:
BetaFeaturesNotEnabledIf beta features are not enabled in the Fluent session.
- transfer_mesh_to_solvers(solvers, file_type='case', file_name_stem=None, num_files_to_try=1, clean_up_mesh_file=True, overwrite_previous=True)#
Transfer mesh to Fluent solver instances.
- Parameters:
- solversiterable
Sequence of solver instances.
- file_type
str,optional "case"or"mesh". Default is"case".- file_name_stem
str,optional Stem for the generated file name.
- num_files_to_try
int,optional Number of candidate file names to try. Default is
1.- clean_up_mesh_filebool,
optional Remove the mesh file after transfer. Default is
True.- overwrite_previousbool,
optional Overwrite an existing file with the same name. Default is
True.
- property tui: main_menu#
Instance of
main_menuon which Fluent’s SolverTUI methods can be executed. See the meshing TUI documentation for the complete hierarchy of menus, commands, and related TUI methods.
- two_dimensional_meshing(legacy=None)#
Get the 2D meshing workflow.
- Parameters:
- legacybool,
optional If True, returns the legacy PyFluent-native interface. If False, returns the PyFluent-native interface. If None (default), auto-selects based on Fluent version: legacy PyFluent-native for versions up to 25R2, PyFluent-native from 26R1 onwards.
- legacybool,
- Returns:
TwoDimensionalMeshingTwo-dimensional meshing workflow.
- watertight(legacy=None)#
Get the watertight meshing workflow.
- Parameters:
- legacybool,
optional If True, returns the legacy PyFluent-native interface. If False, returns the PyFluent-native interface. If None (default), auto-selects based on Fluent version: legacy PyFluent-native for versions up to 25R2, PyFluent-native from 26R1 onwards.
- legacybool,
- Returns:
WatertightMeshingWatertight meshing workflow.
- property workflow: Root#
Datamodel root of workflow.
See the workflow datamodel for the complete hierarchy of workflow objects and operations.