solver#

Full Fluent solver session (Solver).

Inheritance#

BaseSession (private)
└── Solver          ← this class
    ├── SolverAero
    ├── SolverIcing
    └── SolverLite

Classes:

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

Fluent solver session.

class ansys.fluent.core.solver.session.solver.Solver(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#

Bases: BaseSession, object

Fluent solver session.

Provides access to Fluent’s full solver capabilities: settings tree, TUI commands, solution monitors, field data, workflows, and more.

Attributes:
settingssettings_root

Settings root handle.

tuimain_menu

Instance of main_menu on which Fluent’s SolverTUI methods can be executed.

workflowClassicWorkflow

Datamodel root for workflow.

preferencespreferences_root

Datamodel root of preferences.

fieldsFields

Field data container (solution_variable_info, solution_variable_data, reduction, field_data).

monitorsMonitorsManager

Residual and report-definition monitors; auto-refreshed on solution events. See the monitors API for details.

system_couplingSystemCoupling

System coupling object.

schemeSchemeInterpreter

Direct access to Fluent’s Scheme interpreter. See the scheme interpreter API for details.

application_runtimeApplicationRuntime

Provides access to the Fluent application runtime.

journalJournal

Fluent journal recorder; call start() / stop().

transcriptTranscriptStreaming

Fluent console transcript; call .start() / .stop().

eventsEventsManager

Subscribe to solver events (SolverEvent). See the events API for details.

Methods:

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

Solver session.

from_http(url, token)

Create a solver session connected via REST (HTTP) transport.

get_state()

Get the state of the object.

read_case_lightweight(file_name)

Read a case file using light IO mode.

set_state([state])

Set the state of the object.

switch_to_meshing()

Switch to meshing mode and return a meshing session object.

Attributes:

preferences

Datamodel root of preferences.

reduction

Reduction handle.

settings

Settings root handle.

system_coupling

System coupling object.

tui

Instance of main_menu on which Fluent's SolverTUI methods can be executed.

workflow

Datamodel root for workflow.

__init__(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#

Solver session.

Parameters:
fluent_connectionFluentConnection

Encapsulates a FluentConnection.

scheme_eval: SchemeInterpreter

Instance of SchemeInterpreter to execute Fluent’s scheme code on.

file_transfer_serviceOptional

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 the Session object.

classmethod from_http(url, token)#

Create a solver session connected via REST (HTTP) transport.

Returns an HttpSolver instance - a standalone REST-backed session that is independent of the gRPC infrastructure.

Parameters:
urlstr

REST server URL (e.g., "http://127.0.0.1:5000").

tokenstr

Authentication token for the REST server.

Returns:
HttpSolver

A new solver session connected via REST transport.

Examples

>>> solver = Solver.from_http(
...     url="http://127.0.0.1:5000",
...     token="my-token"
... )
>>> solver.settings.setup.models.energy.enabled()
get_state()#

Get the state of the object.

property preferences: Root#

Datamodel root of preferences.

See the solver preferences datamodel for the complete hierarchy of preference objects and operations.

read_case_lightweight(file_name)#

Read a case file using light IO mode.

Parameters:
file_namestr

Case file name

property reduction#

Reduction handle.

set_state(state=None, **kwargs)#

Set the state of the object.

property settings: root#

Settings root handle.

See the settings root for the complete solver settings hierarchy and available configuration objects.

switch_to_meshing()#

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

Returns:
Meshing
Raises:
AttributeError

If beta features are not enabled in Fluent.

property system_coupling: SystemCoupling#

System coupling object.

property tui: main_menu#

Instance of main_menu on which Fluent’s SolverTUI methods can be executed. See the solver TUI documentation for the complete hierarchy of menus, commands, and related TUI methods.

property workflow: ClassicWorkflow#

Datamodel root for workflow.

See the solver workflow datamodel for the complete hierarchy of workflow objects and operations.