Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/ansys/fluent/core/launcher/fluent_launcher_options.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
},
"fluent_format": "{}"
},
"journal_filename": {
"type": "str",
"fluent_format": " -i {}"
},
"fluent_icing": {
"type": "bool",
"fluent_map": {
Expand Down
19 changes: 17 additions & 2 deletions src/ansys/fluent/core/launcher/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def launch_fluent(
version: str = None,
precision: str = None,
processor_count: int = None,
journal_filename: str = None,
journal_filepath: str = None,
start_timeout: int = 100,
additional_arguments: str = "",
env: Dict[str, Any] = None,
Expand All @@ -429,6 +429,7 @@ def launch_fluent(
start_transcript: bool = True,
show_gui: bool = None,
case_filepath: str = None,
case_data_filepath: str = None,
mode: Union[LaunchModes, str, None] = None,
server_info_filepath: str = None,
password: str = None,
Expand Down Expand Up @@ -457,7 +458,7 @@ def launch_fluent(
Number of processors. The default is ``None``, in which case ``1``
processor is used. In job scheduler environments the total number of
allocated cores is clamped to this value.
journal_filename : str, optional
journal_filepath : str, optional
Name of the journal file to read. The default is ``None``.
start_timeout : int, optional
Maximum allowable time in seconds for connecting to the Fluent
Expand Down Expand Up @@ -504,6 +505,9 @@ def launch_fluent(
case_filepath : str, optional
If provided, reads a fluent case file and sets the required settings
in the fluent session
case_data_filepath : str, optional
If provided, reads a fluent case and data file and sets the required settings
in the fluent session
mode : str, optional
Launch mode of Fluent to point to a specific session type.
The default value is ``None``. Options are ``"meshing"``,
Expand Down Expand Up @@ -576,6 +580,17 @@ def launch_fluent(
session.tui.file.read_case(case_filepath)
else:
session.file.read(file_type="case", file_name=case_filepath)
if journal_filepath:
if meshing_mode:
session.tui.file.read_journal(journal_filepath)
else:
session.file.read_journal(journal_filepath)
if case_data_filepath:
if not meshing_mode:
session.file.read(file_type="case-data", file_name=case_data_filepath)
else:
raise RuntimeError("Case and data file cannot be read in meshing mode.")

return session
except Exception as ex:
raise LaunchFluentError(launch_string) from ex
Expand Down