solver#
Full Fluent solver session (Solver).
Inheritance#
BaseSession (private)
└── Solver ← this class
├── SolverAero
├── SolverIcing
└── SolverLite
Classes:
|
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,objectFluent solver session.
Provides access to Fluent’s full solver capabilities: settings tree, TUI commands, solution monitors, field data, workflows, and more.
- Attributes:
settingssettings_rootSettings root handle.
tuimain_menuInstance of
main_menuon which Fluent’s SolverTUI methods can be executed.workflowClassicWorkflowDatamodel root for workflow.
preferencespreferences_rootDatamodel root of preferences.
- fields
Fields Field data container (
solution_variable_info,solution_variable_data,reduction,field_data).- monitors
MonitorsManager Residual and report-definition monitors; auto-refreshed on solution events. See the monitors API for details.
system_couplingSystemCouplingSystem coupling object.
- scheme
SchemeInterpreter Direct access to Fluent’s Scheme interpreter. See the scheme interpreter API for details.
application_runtimeApplicationRuntimeProvides access to the Fluent application runtime.
- journal
Journal Fluent journal recorder; call
start()/stop().- transcript
TranscriptStreaming Fluent console transcript; call
.start()/.stop().- events
EventsManager 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 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 mode and return a meshing session object.
Attributes:
Datamodel root of preferences.
Reductionhandle.Settings root handle.
System coupling object.
Instance of
main_menuon which Fluent's SolverTUI methods can be executed.Datamodel root for workflow.
- __init__(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None)#
Solver 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
- classmethod from_http(url, token)#
Create a solver session connected via REST (HTTP) transport.
Returns an
HttpSolverinstance - a standalone REST-backed session that is independent of the gRPC infrastructure.- Parameters:
- Returns:
HttpSolverA 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_name
str Case file name
- file_name
- property reduction#
Reductionhandle.
- 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:
AttributeErrorIf beta features are not enabled in Fluent.
- property system_coupling: SystemCoupling#
System coupling object.
- property tui: main_menu#
Instance of
main_menuon 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.