TAGGED: fluent, scripting-journaling, workbench
-
-
April 28, 2022 at 3:30 pmbetterglobeSubscriber
There are 3 ways to run a script in Ansys fluent:
1. In fluent, File-Read-Journal, select the script file.
2. In Workbench, File-Scripting-Open Command Window, type in the following command to call the script file:
script = open('FLAG_SETUP_SCRIPT', 'r').read()
setup1.SendCommand(Command=script)
3. In Workbench, File-Scripting-Run Script File, select the script file. This is equivalent to running Ansys workbench with the following command line codes:
"FLAG_ANSYS_PATH" -B -E RunScript(FilePath='FLAG_WORKBENCH_PATH')
In Ansys 2020R1 and 2020R2 PAID version, but NOT in the STUDENT version, the following line of codes triggers an error if it is loaded in way 3. This line of code is from recorded journal in Fluent via File-Write-Start Journal... The last parameter 9 is for Hershel-Bulkley model, but the same error occurs for any changes to the viscosity model.
(cx-gui-do cx-set-list-selections "Create/Edit Materials*Table2*Table1(Properties)*DropDownList7(Viscosity)" '( 9))
Any suggestions if I'm changing the viscosity model using a Workbench script (wbjn file)?
April 28, 2022 at 4:55 pmbetterglobeSubscriberCorrection, it was 2020R1 and 2021R2 versions.
May 5, 2022 at 2:21 pmRKAnsys EmployeeHello,
May I know what is the error message you are getting?
May 5, 2022 at 3:17 pmbetterglobeSubscriberThe message in fluent Console is
Unable to parse:
Error: undefined read macro
Error Object:
The message in Ansys Workbench pops-up window is
CommandFailedException: Generic Command
In file "THEPATH\script_workbench.wbjn", line 51
where line 51 is loading the Fluent journal file via Way 3:
"FLAG_ANSYS_PATH" -B -E RunScript(FilePath='FLAG_WORKBENCH_PATH')
Viewing 3 reply threads- The topic ‘Bug report on fluid viscosity model selection in scripting in 2020R1 and 2021R2 paid version’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
1116
-
468
-
440
-
225
-
201
Top Rated Tags© 2024 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-