3.2.2. Fluent as a Server Commands (fluent.)

Fluent as a Server commands are used to perform client/server interactions with a connected Fluent as a Server session. These include commands to upload files, set/get rpvar values, alter verbosity, and so on. Fluent as a Server commands begin with the prefix fluent. Note that for the sake of convenience and accuracy, you do not have to type the whole command, but can begin typing and use the Tab key to automatically complete it or display a list of options.

The following commands collaborate with Fluent processes and therefore cannot be executed until Fluent is idle or at a stable point. This means that you are not guaranteed to have an instant response when you enter the command.


Tip:  The following strategies can be used to minimize the lag between when you enter a command and when it is executed:

  • Set the fluent.set_aaslistening_step_at <number> iteration|timestep command to a minimum value, based on your objectives. Note that by decreasing the iterations / timesteps between stable points, you are favoring cosimulation over simulation (that is, you are prioritizing your ability to manipulate the settings over the time it will take to calculate the solution).

  • You can nest a number of commands between fluent.pause and fluent.continue commands, so that they are all executed during the same stable point; otherwise, each command will have to wait for a separate stable point.


fluent.continue

continues remote execution of a journal file on the Fluent server.

fluent.display_menu

displays a message of the remote TUI menu.

fluent.download_file [-f] <filename>

downloads a file, <filename>, from the remote Fluent session working directory to the local machine. The file will be downloaded to the local directory from which Fluent Remote Console was started. By default, fluent.download_file will not overwrite an existing local file. You can force an overwrite by including the —f flag.

fluent.get_aaslistening_step

provides information about the aaslistener that listens for commands from Fluent as a Server clients.

fluent.get_current_flow_time

provides the current flow time.

fluent.get_current_iteration

provides the current iteration.

fluent.get_current_time_step

provides the current time step.

fluent.get_dimensionality

provides the dimensionality of the current case.

fluent.get_last_casefile_name

provides the name of the last case file accessed before the current case. This can be useful if you have written the case file with a new name.

fluent.get_list_input_parameters

provides a list of the input parameters available in the current case.

fluent.get_list_output_parameters

provides a list of the output parameters available in the current case.

fluent.get_nr_input_parameters

provides the number of input parameters available in the current case.

fluent.get_nr_output_parameters

provides the number of output parameters available in the current case.

fluent.get_parameter <parametername>

reports the current value of <parametername>.

fluent.get_paused_index

returns an index indicating the “depth” of pause. When Fluent is not paused, it will return 0. It is incremented with each successive pause instruction. This can be useful to determine the state of a session if the connection is lost while Fluent is paused.

fluent.get_precision

specifies whether the solution calculations for the current case will be performed in single- or double-precision mode.

fluent.get_release

provides the name of the solver and the release number.

fluent.get_status

provides information about the status of the Fluent session (for example, journaling, iterate).

fluent.get_rpvar <rpvarname>

reports the current value of <rpvarname>.

fluent.get_status

provides information about the status of the Fluent session (for example, journaling, iterate).

fluent.get_verbosity

displays the current setting of verbosity.

fluent.interrupt

interrupts remote execution of a journal file on the Fluent server. Note that this terminates reading of the journal file. If you want to be able to resume execution where it was stopped, use fluent.pause.

fluent.list_commands

returns a list of solver calculation activities (including the listening process for Fluent as a Server commands).

fluent.list_monitors <monitor_type> <monitor_name>

returns a JSON-formatted listing of the monitor definitions in the current case. <monitor_type> may be one of the following types: residuals, lift, drag, moment, surface, or volume. If no arguments are given, Fluent returns all defined monitors. If only <monitor_type> is given, all monitors of the specified type are returned.

fluent.list_monitors_with_persisted_data <monitor_type> <monitor_name> <filter> <filter_value>

returns a JSON-formatted listing of the monitor definitions in the current case, including the data from the monitor history file (if any). Options for <monitor_type> are the same as those listed for fluent.list_monitors. <filter> allows you to return incremental monitor data, by removing the data calculated before the specified <filter_value>; a single command can include one or more of the following <filter> options: start-flow-time, start-iteration, and start-time-step.

fluent.list_parameters

reports the names and values of the input and output parameters defined in the current case.

fluent.list_report_definitions

returns a JSON-formatted listing of the report definitions in the current case. For more information about report definitions, see Creating Report Definitions in the Fluent User's Guide.

fluent.list_report_files

returns a JSON-formatted listing of the report file definitions in the current case. If no arguments are given, Fluent returns all defined report files. For more information about report files, see Report Files and Report Plots in the Fluent User's Guide.

fluent.list_report_files_with_persisted_data <filter> <filter_value>

returns a JSON-formatted listing of the report file definitions in the current case, including the data from the report file .out file (if any). For more information about report files, see Report Files and Report Plots in the Fluent User's Guide. <filter> allows you to return incremental report file data, by removing the data calculated before the specified <filter_value>; a single command can include one or more of the following <filter> options: start-iteration and start-time-step.

fluent.list_report_plots

returns a JSON-formatted listing of the report plot definitions in the current case. For more information about report plots, see Report Files and Report Plots in the Fluent User's Guide.

fluent.list_rpvars

lists all rpvars by name and their current values. This command will not return anything until after fluent.retrieve_rpvars_info has been issued.

fluent.list_rpvars_regexp ‘<key>’

lists all rpvars matching the specified regular expression, <key>, and their current values. Note that <key> must be enclosed in single quotes. This command will not return anything until after fluent.retrieve_rpvars_info has been issued.

fluent.list_rpvars_wildcards ‘<key>’

lists all rpvars matching <key> with wildcard expansion. Use * to match zero or more characters. Use ? to match exactly one character. Note that <key> must be enclosed in single quotes. This command will not return anything until after fluent.retrieve_rpvars_info has been issued.

fluent.load_case <filename>

loads a case file over the network connection to the Fluent session. Note that this is different from the read-case TUI command because it allows you to load a local case file to the remote session. If <filename> is omitted, a dialog box will open, allowing you to navigate to a file.

fluent.load_data <filename>

loads a data file over the network connection to the Fluent session. Note that this is different from the read-data TUI command because it allows you to load a local data file to the remote session. If <filename> is omitted, a dialog box will open, allowing you to navigate to a file.

fluent.pause

pauses remote execution of a journal file on the Fluent server. Execution can be resumed using the fluent.continue command.

fluent.read_journal

loads a journal and executes it asynchronously (control is immediately returned to the user). The status of the journal execution can be checked using fluent.get_status.

fluent.retrieve_rpvars_info

retrieves the list of rpvars from the connected Fluent as a Server session. This command must be issued before the fluent.list_rpvars commands or completion suggestions for fluent.get_rpvar/fluent.set_rpvar will work.

fluent.save_case <filename>

saves a case file from the remote Fluent session on the local machine. Note that this is different from the write-case TUI command because it allows you to save the case file to the local machine. If <filename> is omitted, a dialog box will open, allowing you to navigate to a file location.

fluent.save_data <filename>

saves a data file from the remote Fluent session on the local machine. Note that this is different from the write-data TUI command because it allows you to save the data file to the local machine. If <filename> is omitted, a dialog box will open, allowing you to navigate to a file location.

fluent.save_monitors_with_persisted_data <monitor_file_name>

saves a JSON-formatted file on the remote Fluent machine with the data (if it exists) from all monitors defined in the current case.

fluent.set_aaslistening_step_at <number> iteration|timestep

configures the aaslistener to listen for commands from Fluent as a Server clients every <number> iterations or timesteps.

fluent.set_auto_save_period_json_monitors <period_in_minutes>

allows you to change the period for when monitor history data is automatically saved as a JSON-formatted file (named monitor.json) on the remote Fluent machine. By default, the period is set to 60 minutes. Note that it is recommended that you do not have multiple sessions in a single folder, as they will all have the same name for the monitor history file.

fluent.set_parameter <parametername> <value>

sets the value of <paramtername> to <value>.

fluent.set_rpvar <rpvarname> <value>

sets <rpvarname> to <value>.

fluent.set_server_questions_silent

disables prompts for TUI commands that are entered without all arguments. Fluent will automatically use the default values for any arguments that are not specified.

fluent.set_server_questions_verbose

enables prompts for TUI commands that are entered without all arguments.

fluent.set_silent

sets the output of TUI commands issued in the Fluent Remote Console to display in the Fluent Output window instead of in the Fluent Remote Console.

fluent.set_verbose

sets the output of TUI commands issued in the Fluent Remote Console to display in the Fluent Remote Console instead of in the Fluent Output window. This is the default behavior.

fluent.terminate

terminates the connected Fluent solver session.

fluent.upload_file [-f] <filename>

uploads a file from the local client machine to the remote Fluent session working directory. If <filename> is omitted, a dialog box will open, allowing you to navigate to a file. By default, fluent.upload_file will not overwrite an existing remote file. You can force an overwrite by including the —f flag.


Release 18.2 - © ANSYS, Inc. All rights reserved.