session_pure_meshing#
Module containing class encapsulating Fluent connection.
Classes:
|
Encapsulates a Fluent meshing session with a meshing-only Python interface. |
- class ansys.fluent.core.session_pure_meshing.PureMeshing(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#
Bases:
BaseSessionEncapsulates a Fluent meshing session with a meshing-only Python interface.
PureMeshingis designed for workflows where meshing and solving are run asseparate stages or in different environments, such as modular or containerized deployments. It provides a clean API that focuses solely on meshing tasks.
This interface exposes:
workflowandmeshingobjects for task-based meshing operations.tuifor scripting via the legacy Text User Interface (when needed).
Attributes:
Datamodel root of PMFileManagement.
Datamodel root of PartManagement.
Get the current active meshing workflow.
Get the current active meshing workflow (legacy implementation).
Datamodel root of meshing.
Datamodel root of meshing_utilities.
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[, ...])PureMeshing session.
create_workflow([legacy])Create a new blank meshing workflow.
fault_tolerant([legacy])Get a new fault-tolerant meshing workflow.
load_workflow(file_path[, legacy])Load a saved meshing workflow from a file.
topology_based([legacy])Get a new topology-based meshing workflow (beta feature).
transfer_mesh_to_solvers(solvers[, ...])Transfer mesh to Fluent solver instances.
two_dimensional_meshing([legacy])Get a new 2D meshing workflow.
watertight([legacy])Get a new watertight meshing workflow.
- property PMFileManagement#
Datamodel root of PMFileManagement.
- property PartManagement#
Datamodel root of PartManagement.
- __init__(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#
PureMeshing session.
- Parameters:
- fluent_connection (:ref:`ref_fluent_connection`):
Encapsulates a Fluent connection.
- scheme_eval: SchemeEval
Instance of
SchemeEvalto 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.
- create_workflow(legacy=None)#
Create a new blank meshing workflow.
Initializes an empty workflow that can be manually configured with tasks. Unlike predefined workflows (watertight, fault-tolerant), this gives you full control to build a custom task sequence from scratch.
- Parameters:
- legacybool,
optional If True, creates a legacy workflow implementation. If False, creates a new workflow implementation. If None (default), uses the legacy workflow implementation for Fluent versions up to 25R2 and uses the new workflow implementation for later versions (since 26R1).
- legacybool,
- Returns:
WorkflowA new empty workflow instance ready for task insertion.
- property current_workflow#
Get the current active meshing workflow.
Returns the workflow instance that is currently loaded and active in the meshing session. This is the workflow you’re actively working on, whether it was created from scratch, loaded from a file, or initiated as a predefined workflow type.
- Returns:
WorkflowThe currently active workflow instance, or None if no workflow is loaded.
- fault_tolerant(legacy=None)#
Get a new fault-tolerant meshing workflow.
- Parameters:
- legacybool,
optional If True, returns the legacy workflow implementation. If False, returns the new workflow implementation. If None (default), uses the legacy workflow implementation for Fluent versions up to 25R2 and uses the new workflow implementation for later versions (since 26R1).
- legacybool,
- Returns:
WorkflowA new fault-tolerant workflow instance ready for configuration and execution.
- property legacy_current_workflow#
Get the current active meshing workflow (legacy implementation).
Returns the legacy implementation of the currently active workflow. This is provided for backward compatibility with code written for Fluent 25R2 and earlier versions.
- load_workflow(file_path, legacy=None)#
Load a saved meshing workflow from a file.
Restores a previously saved workflow configuration, including all task settings, sizing controls, and intermediate state. This allows resuming work or reusing established workflows on new geometry.
- Parameters:
- file_path
strorPathType Path to the saved workflow file (typically with .wft extension).
- legacybool,
optional If True, loads as a legacy workflow implementation. If False, loads as a new workflow implementation. If None (default), uses the legacy workflow implementation for Fluent versions up to 25R2 and uses the new workflow implementation for later versions (since 26R1).
- file_path
- Returns:
WorkflowThe loaded workflow instance with all saved state restored.
- property meshing#
Datamodel root of meshing.
- property meshing_utilities#
Datamodel root of meshing_utilities.
- property meshing_workflow#
Full API to meshing and meshing_workflow.
- property preferences#
Datamodel root of preferences.
- topology_based(legacy=None)#
Get a new topology-based meshing workflow (beta feature).
- Parameters:
- legacybool,
optional If True, returns the legacy workflow implementation. If False, returns the new workflow implementation. If None (default), uses the legacy workflow implementation for Fluent versions up to 25R2 and uses the new workflow implementation for later versions (since 26R1).
- legacybool,
- Returns:
WorkflowA new topology-based workflow instance ready for configuration and execution.
- Raises:
BetaFeaturesNotEnabledIf beta features are not enabled in the Fluent session. Enable by launching Fluent with the
-betaflag or setting the appropriate environment variable.
- 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,default“case” “case” or “mesh”
- file_name_stem
str Optional file name stem
- num_files_to_try
int,default1 Optional number of files to try to write, each with a different generated name. Defaults to 1
- clean_up_mesh_file: bool, default True
Whether to remove the file at the end
- overwrite_previous: bool, default True
Whether to overwrite the file if it already exists
- Returns
- ——-
- None
- property tui#
Instance of
main_menuon which Fluent’s SolverTUI methods can be executed.
- two_dimensional_meshing(legacy=None)#
Get a new 2D meshing workflow.
- Parameters:
- legacybool,
optional If True, returns the legacy workflow implementation. If False, returns the new workflow implementation. If None (default), uses the legacy workflow implementation for Fluent versions up to 25R2 and uses the new workflow implementation for later versions (since 26R1).
- legacybool,
- Returns:
WorkflowA new 2D meshing workflow instance ready for configuration and execution.
- watertight(legacy=None)#
Get a new watertight meshing workflow.
- Parameters:
- legacybool,
optional If True, returns the legacy workflow implementation. If False, returns the new workflow implementation. If None (default), uses the legacy workflow implementation for Fluent versions up to 25R2 and uses the new workflow implementation for later versions (since 26R1).
- legacybool,
- Returns:
WorkflowA new watertight workflow instance ready for configuration and execution.
- property workflow#
Datamodel root of workflow.