When Fluent first starts up, it will look in your home folder
for a file called .fluent
. If it finds the .fluent
file in your home folder it will load it as
a Scheme file. Just as UDFs are automatically loaded into Fluent when
you read a case file that includes a UDF, Scheme files can be automatically
loaded into Fluent each time the program starts by using the .fluent
file. The following steps will walk you through
the creation and use of the .fluent
file.
The specific .fluent
file created in this
example loads in three separate example Scheme files: Schemefile1.scm
, Schemefile2.scm
, and Schemefile3.scm
.
(ti-menu-load-string "file read-journal Schemefile1.scm") (ti-menu-load-string "file read-journal Schemefile2.scm") (ti-menu-load-string "file read-journal Schemefile3.scm")
The first step is to copy each Scheme file that you want to load each time Fluent starts into your home folder.
Next, you must open a new blank document in a basic text editor such as Notepad. In this blank document, you will add one line for each Scheme file you want to load when Fluent starts. These lines are Scheme commands that use the Fluent Text User Interface (TUI) to load each Scheme file accordingly. The example Scheme lines above would allow the
.fluent
file to load the Scheme filesSchemefile1.scm
,Schemefile2.scm
, andSchemefile3.scm
. Theti-menu-load-string
portion of the command is a call to load the string that follows into the Fluent TUI. The string begins withfile read-journal
which tells Fluent to read in the Scheme file that follows. For more information on the Fluent TUI, see the Ansys Fluent Users Guide.Finally, you must save the document in your home folder with the name
.fluent
. Be aware that some text editors will force you to change the document type from the default type toAll Files (*.*)
before allowing you to define your own document type. Windows machines generally do not allow document names to begin with a period. In order to get around this problem, you must add a second period at the end of the name. For example,.fluent.
would be the name you want to enter when you create your.fluent
file. When you click save, you may receive a warning about your chosen filename depending on the text editor you are using. You should simply ignore this warning. When the document saves, it should remove the second period and name the file.fluent
instead.You should now have all your desired Scheme files and a completed
.fluent
file in your home folder. From now on each Scheme file should be automatically be read in each time Fluent is started.
Note: Be aware that Scheme files are read into Fluent in the
order that they are requested in the .fluent
file. Therefore, if one Scheme file creates a menu item for a dialog
box that is defined in a different Scheme document, you should be
sure to read in the Scheme file that defines the dialog box before
you read in the Scheme file that creates the menu item for it. For
more information on this issue, see the following: