![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Macros that you define for automatic execution during the calculation can also be used interactively by you during the problem setup or postprocessing. For example, if you define a macro that performs a certain type of adaption after each iteration, you can also use the macro to perform this adaption interactively.
Definition of a macro is accomplished as follows:
|
If the command to be executed involves saving a file, see Section
26.14.2 for important information.
|
As noted above, once you have defined a macro for execution during the calculation, you can use it at any time. If you defined the macro called adapt1 to adapt based on pressure gradient, you can simply type adapt1 in the console window to perform this adaption. This macro is independent of any text menus, so you need not move to a different text menu to use it. Macros can be saved to and read from files. To save all macros that are currently defined, use the file/write-macros text command. To read all the macros in a macro file, use the file/read-macros text command.
|
A macro, like a journal file, is a simple record/playback function. It will therefore know nothing about the state in which it was recorded or the state in which it is being played back. You must be careful not to change directories while defining a macro. Also, you must be careful that all surfaces, variables, etc. that are used by the macro have been properly defined when you (or
ANSYS FLUENT) invoke the macro.
|