meshing#

Fluent meshing sessions and workflow helpers.

This package exposes the Meshing and PureMeshing session classes, along with helpers for creating and loading Fluent meshing workflows. Both session classes inherit from the internal BaseMeshing class, which extends BaseSession.

Classes:

CreateMeshingWorkflow(session[, initialize])

Provides a specialization of the workflow wrapper for a newly created workflow.

FaultTolerantMeshing(session[, initialize])

Provides fault tolerant meshing specialization of the workflow wrapper.

LoadMeshingWorkflow(session, file_path[, ...])

Provides a specialization of the workflow wrapper for a loaded workflow.

Meshing(fluent_connection, scheme_eval[, ...])

Fluent meshing session with the ability to switch to a solver.

PureMeshing(fluent_connection, scheme_eval)

Fluent meshing session without solver-switching capability.

TopologyBasedMeshing(session[, initialize])

Provides topology based meshing specialization of the workflow wrapper.

TwoDimensionalMeshing(session[, initialize])

Provides 2D meshing specialization of the workflow wrapper.

WatertightMeshing(session[, initialize])

Provides watertight meshing specialization of the workflow wrapper.

class ansys.fluent.core.meshing.CreateMeshingWorkflow(session: PureMeshing | Meshing, initialize: bool = True)#

Bases: object

Provides a specialization of the workflow wrapper for a newly created workflow.

See the create workflow example for a sample usage example.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

Methods:

__new__(cls, session[, initialize])

Initialize CreateMeshingWorkflow.

static __new__(cls, session, initialize=True)#

Initialize CreateMeshingWorkflow.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

class ansys.fluent.core.meshing.FaultTolerantMeshing(session: PureMeshing | Meshing, initialize: bool = True)#

Bases: object

Provides fault tolerant meshing specialization of the workflow wrapper.

See the Fault-tolerant workflow example for a sample usage example.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

Methods:

__new__(cls, session[, initialize])

Initialize FaultTolerantMeshing.

static __new__(cls, session, initialize=True)#

Initialize FaultTolerantMeshing.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

class ansys.fluent.core.meshing.LoadMeshingWorkflow(session: PureMeshing | Meshing, file_path: str, initialize: bool = True)#

Bases: object

Provides a specialization of the workflow wrapper for a loaded workflow.

See the load workflow example for a sample usage example.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

file_pathstr

The path to the saved workflow file.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

Methods:

__new__(cls, session, file_path[, initialize])

Initialize LoadMeshingWorkflow.

static __new__(cls, session, file_path, initialize=True)#

Initialize LoadMeshingWorkflow.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

file_pathstr

The path to the saved workflow file.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

class ansys.fluent.core.meshing.Meshing(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#

Bases: BaseMeshing

Fluent meshing session with the ability to switch to a solver.

Extends BaseMeshing by adding switch_to_solver(), which transitions the running Fluent process from meshing mode to solver mode and returns a Solver instance.

All attributes and workflow factory methods of BaseMeshing are available here. After switch_to_solver() is called this object is deactivated and must not be used.

Methods:

switch_to_solver()

Switch to solver mode and return a solver session object.

switch_to_solver()#

Switch to solver mode and return a solver session object. Deactivate this object’s public interface and streaming services.

Returns:
Solver
class ansys.fluent.core.meshing.PureMeshing(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#

Bases: BaseMeshing

Fluent meshing session without solver-switching capability.

Designed for deployments where meshing and solving run as separate processes (e.g. containerised pipelines). All public API is provided by BaseMeshing.

Use Meshing when you also need switch_to_solver().

class ansys.fluent.core.meshing.TopologyBasedMeshing(session: PureMeshing | Meshing, initialize: bool = True)#

Bases: object

Provides topology based meshing specialization of the workflow wrapper.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

Methods:

__new__(cls, session[, initialize])

Initialize TopologyBasedMeshing.

static __new__(cls, session, initialize=True)#

Initialize TopologyBasedMeshing.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

class ansys.fluent.core.meshing.TwoDimensionalMeshing(session: PureMeshing | Meshing, initialize: bool = True)#

Bases: object

Provides 2D meshing specialization of the workflow wrapper.

See the 2D workflow example for a sample usage example.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

Methods:

__new__(cls, session[, initialize])

Initialize TwoDimensionalMeshing.

static __new__(cls, session, initialize=True)#

Initialize TwoDimensionalMeshing.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initialize: bool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

class ansys.fluent.core.meshing.WatertightMeshing(session: PureMeshing | Meshing, initialize: bool = True)#

Bases: object

Provides watertight meshing specialization of the workflow wrapper.

See the Watertight geometry workflow example for a sample usage example.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initializebool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

Methods:

__new__(cls, session[, initialize])

Initialize WatertightMeshing.

static __new__(cls, session, initialize=True)#

Initialize WatertightMeshing.

Parameters:
sessionPureMeshing | Meshing

The meshing session.

initializebool, optional

Flag to initialize the workflow, defaults to True. Set this to False if you are connecting to an existing meshing session which has been initialized and want to avoid re-initializing the workflow.

Meshing workflows use the underlying meshing workflow object. See the meshing workflow API for details.