Open domengnidovec opened 1 year ago
Hello @domengnidovec I have changed this to question (it is a question). I cannot see your Python code, but no matter. If in your Python version of this script, you are directly calling TUI commands via Python (e.g. solver.tui.file.write_data
then the prompts that would normally be issued by the TUI become arguments instead. E.g., solver.tui.file.write_data(file_name, "yes")
. If you are using the new settings objects interface for that operation, it will anyway overwrite the file automatically. N.b. you can also generate the Python equivalent of TUI scripts by journaling to Python in Fluent.
Dear Sean Pearson,
Thank you very much for your reply, I appreciate it very much! What I am also interested in is the overwriting of report files when running the simulation. For example, when running steady-state simulation with this command: solver.tui.solve.iterate(500) prompts issued in the GUI are if I want to create new files and, if no, if I am okay with overwriting. I dont want to create new files and want to overwrite my report files. Is the method of defining this commands the same, something like: solve.tui.solve.iterate(500, "no", "yes"), where "no" is an answer to the questions if I want to create new files and "yes" is the answer to the question if I am okay with that. I kindly ask for your help.
Thanks in advance.
Best regards,
Domen Gnidovec
V V pon., 3. jul. 2023 ob 10:33 je oseba Sean Pearson < @.***> napisala:
Hello @domengnidovec https://github.com/domengnidovec I have changed this to question (it is a question). I cannot see your Python code, but no matter. If in your Python version of this script, you are directly calling TUI commands via Python (e.g. solver.tui.file.write_data then the prompts that would normally be issued by the TUI become arguments instead. E.g., solver.tui.file.write_data(file_name, "yes"). If you are using the new settings objects interface for that operation, it will anyway overwrite the file automatically.
— Reply to this email directly, view it on GitHub https://github.com/ansys/pyfluent/issues/1741#issuecomment-1617626986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ5OEGDE7KLNXFJISXNSX23XOJ7V5ANCNFSM6AAAAAAZYWSJQA . You are receiving this because you were mentioned.Message ID: @.***>
@domengnidovec
when you run /solve/iterate 500
does the TUI prompt for yes and no answers about those files?
Yes, exactly. Even if I write TUI command in graphics, it prompts for yes and no answers about overwriting report files. Here is my problem, because I dont know how to answer this through TUI object. As you can see in journal file it is handled simply by just inputting yes and no.
@domengnidovec as I mentioned previously, those TUI prompts need to be provided as arguments to the Python "TUI" method. Is that point clear?
🐞 Description of the bug
Hello everybody,
I am dealing with multi-scale-modelling as a project for my master thesis. I already have a fluent journal file scripts written and then running these scripts though terminal with python. Since the nature of the modelling is such that there is a lot of iterating through the same case (same .cas file), the journal file code provided below is kind of slow:
In order to make my model faster, I discovered pyansys package, more exactly ansys.fluent.core. I managed to convert basically the whole journal file in your function calls, except I really can’t find how to deal with overwriting output files. By default, it creates new file if there already exists one, but I want my files to be overwritten. In journal file I simply input “no” or “yes” statements as the answer to the prompts that are raised in fluent. Here is different and I kindly ask if you can provide me any function or advice on how to have my output files overwritten.
Moreover, I want to ask about reading and writing files. Apparently using TUI object doesn’t succeed to reed and write files, while using ROOT object does the work. Can you additionally explain if there is some mistake from my side or is there some kind of bug. If there is a way to resolve this I would prefer to use TUI object rather than ROOT, if not I am okay with ROOT object as well.
I kindly ask for your feedback; it would help a lot in the progress of my master thesis! Thanks in advance.
Best regards!
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2023 R1
🐍 Which Python version are you using?
3.9
📦 Installed packages