Open mcgoldba opened 3 months ago
@seanpearsonuk, Please could you move this to Fluent side. Thank you. cc. @gyeole
Hi @mcgoldba
Thank you for providing your detailed report.
You mentioned that the equivalent TUI command works correctly when you use it directly in Fluent. Have you tried the following?
Note: You can also automate the above procedure either using Fluent command line arguments are with the launch_fluent()
function's topy
argument.
The generated file should be a Python script that you can use either in PyFluent or in the Fluent Python console. Each solver TUI command call will generate either a Python tui
method call or a Python settings
call (depending on each TUI command's implementation).
Please let us know if this procedure generates different calls and whether those calls are effective.
cc: @prmukherj
When I record a journal I do not get Python commands, but the following
/file/set-tui-version "24.1"
(cx-gui-do cx-set-list-tree-selections "NavigationPane*Frame2*Table1*List_Tree2" (list "Solution|Initialization"))
(cx-gui-do cx-set-list-tree-selections "NavigationPane*Frame2*Table1*List_Tree2" (list "Solution|Initialization"))
(cx-gui-do cx-activate-item "NavigationPane*Frame2*Table1*List_Tree2")
(cx-gui-do cx-set-list-tree-selections "NavigationPane*Frame2*Table1*List_Tree2" (list "Solution|Initialization"))
(cx-gui-do cx-activate-item "Solution Initialization*Table1*Frame9*PushButton1(Initialize)")
(cx-gui-do cx-activate-item "Question*OK")
(cx-gui-do cx-activate-item "Solution Initialization*Table1*Frame9*PushButton1(Initialize)")
(cx-gui-do cx-activate-item "Question*OK")
(cx-gui-do cx-activate-item "Solution Initialization*Table1*Frame9*PushButton3(Patch)")
(cx-gui-do cx-set-list-selections "Patch*Table1*Frame1*Frame1*Table2*DropDownList1(Phase)" '( 1))
(cx-gui-do cx-activate-item "Patch*Table1*Frame1*Frame1*Table2*DropDownList1(Phase)")
(cx-gui-do cx-set-list-selections "Patch*Table1*Frame1*Frame1*Table2*List2(Variable)" '( 0))
(cx-gui-do cx-activate-item "Patch*Table1*Frame1*Frame1*Table2*List2(Variable)")
(cx-gui-do cx-set-list-selections "Patch*Table1*Frame3*List3(Registers to Patch)" '( 0))
(cx-gui-do cx-activate-item "Patch*Table1*Frame3*List3(Registers to Patch)")
(cx-gui-do cx-activate-item "Patch*PanelButtons*PushButton3(Patch)")
(cx-gui-do cx-set-list-selections "Patch*Table1*Frame3*List3(Registers to Patch)" '( 1))
(cx-gui-do cx-activate-item "Patch*Table1*Frame3*List3(Registers to Patch)")
(cx-gui-do cx-activate-item "Patch*PanelButtons*PushButton3(Patch)")
(cx-gui-do cx-set-list-selections "Patch*Table1*Frame3*List3(Registers to Patch)" '( 2))
(cx-gui-do cx-activate-item "Patch*Table1*Frame3*List3(Registers to Patch)")
(cx-gui-do cx-activate-item "Patch*PanelButtons*PushButton3(Patch)")
(cx-gui-do cx-set-list-selections "Patch*Table1*Frame3*List3(Registers to Patch)" '( 3))
(cx-gui-do cx-activate-item "Patch*Table1*Frame3*List3(Registers to Patch)")
(cx-gui-do cx-activate-item "Patch*PanelButtons*PushButton3(Patch)")
(cx-gui-do cx-set-list-selections "Patch*Table1*Frame3*List3(Registers to Patch)" '( 4))
(cx-gui-do cx-activate-item "Patch*Table1*Frame3*List3(Registers to Patch)")
(cx-gui-do cx-activate-item "Patch*PanelButtons*PushButton3(Patch)")
(cx-gui-do cx-set-list-selections "Patch*Table1*Frame3*List3(Registers to Patch)" '( 5))
(cx-gui-do cx-activate-item "Patch*Table1*Frame3*List3(Registers to Patch)")
(cx-gui-do cx-activate-item "Patch*PanelButtons*PushButton3(Patch)")
(cx-gui-do cx-activate-item "Patch*PanelButtons*PushButton1(Close)")
(cx-gui-do cx-activate-item "MenuBar*WriteSubMenu*Stop Journal")
How do I create a Python journal?
How do I create a Python journal?
You can do this either in Fluent or PyFluent.
If you do it in Fluent, you can select a .py extension for the output file when you start journaling.
When I record a journal I do not get Python commands, but the following How do I create a Python journal?
Try this:
(api-start-python-journal "file_name.py")
This will give you new output file in your working directory "file_name.py"
This worked for me and generated:
solver.solution.initialization.patch.calculate_patch(domain = "domian", cell_zones = ["zone"], registers = [], variable = "mp", reference_frame = "Relative to Cell Zone", use_custom_field_function = False, custom_field_function_name = "", value = 1)
It should give you something that looks similar.
π Before submitting the issue
π Description of the bug
When trying to patch the volume mesh with initial values using
The result is that zero cells are marked:
0 cells marked
I get the same result if I try to use the tui module in pyFluent with
When setting values with the same inputs using the TUI in command line Fluent, the cells are marked appropriately for each cell register.
π Steps to reproduce
Output:
Output:
Output:
0 cells marked
π» Which operating system are you using?
Linux
π Which ANSYS version are you using?
2024R1
π Which Python version are you using?
3.12
π¦ Installed packages