Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to extract parameters from case with Execute commands defined #3668

Closed
1 of 2 tasks
tejalprabhu01 opened this issue Jan 23, 2025 · 7 comments
Closed
1 of 2 tasks
Assignees
Labels
bug Issue, problem or error in PyMAPDL Fluent

Comments

@tejalprabhu01
Copy link
Collaborator

tejalprabhu01 commented Jan 23, 2025

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

Execute commands shown in the screenshot below are defined in case file. When trying to read such a case file using Filereader, leads to a hanging process.

Image

📝 Steps to reproduce

Read a case file in Fluent and define a simple python print command under "Execute commands". Write the case file.

Now try to read the case file using Filereader-

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

2025R2

🐍 Which Python version are you using?

3.12

📦 Installed packages

ansys-fluent-core
@tejalprabhu01 tejalprabhu01 added the bug Issue, problem or error in PyMAPDL label Jan 23, 2025
@hpohekar
Copy link
Collaborator

hpohekar commented Jan 27, 2025

@seanpearsonuk

@tejalprabhu01 and I have discussed this issue.

We have investigated same case with scheme commands. We defined a simple scheme print command (display "python") under "Execute commands" and it was executing successfully in Fluent/Scheme console. There was no issue while creating a Scheme journal as well.

The opposite case is for Python commands. If we define print("python") under "Execute commands" then it does not execute. It gives an error. Initially we thought this is due to Fluent/Scheme console then we have switched to Python console still it gives the same error. We have tried to record a Python journal but it was failed with the same error.

So this is the Fluent side issue.

@tejalprabhu01
Copy link
Collaborator Author

@hpohekar @seanpearsonuk I contacted Fluent team and got more info on the issue. Apparently the beta modules need to be activated post reading the case file. If you activate them prior to reading the case file, then you do not see Python checkbox that you are seeing in screenshot below and then we saw the error that is mentioned above.

Image

@hpohekar
Copy link
Collaborator

hpohekar commented Jan 27, 2025

@hpohekar @seanpearsonuk I contacted Fluent team and got more info on the issue. Apparently the beta modules need to be activated post reading the case file. If you activate them prior to reading the case file, then you do not see Python checkbox that you are seeing in screenshot below and then we saw the error that is mentioned above.

Image

@tejalprabhu01 Are you still getting the same error for print("python") even if we select Python check box as shown in this screenshot while Fluent is launched in PyConsole mode ? I think we had tried above scenario mentioned by me without selecting Python checkbox right ?

@seanpearsonuk
Copy link
Collaborator

seanpearsonuk commented Jan 27, 2025

Steps for us to take:

  1. Check differences of writing of (simple) Python "execute commands" to case file with and without beta features enabled.
  • not expecting to be able to create or write python commands without beta features enabled, so a bit confusing here
  1. Check robustness of PyFluent case file reader for both the above scenarios.
  2. Check exection of Python execute commands with and without beta features enabled.
  • Should only be possible in former case.
  1. I believe that we should consider implicitly enabling Python execute commands if Fluent is launched from PyFluent independent of beta feature settings.

@seanpearsonuk
Copy link
Collaborator

@tejalprabhu01
I just sat with @hpohekar who demoed in Fluent and PyFluent:

  1. beta features can get disabled due to case read, which is non-obvious and problematic for PyFluent users. We should implement an automatic way to overcome this as mentioned above.
  2. everything else works as expected once we enable beta features in the TUI:
  • creation of Python "execute commands" in Fluent
  • their execution during iterate
  • saving them to case file
  • reading the case in PyFluent's CaseFile class

@hpohekar
Copy link
Collaborator

@seanpearsonuk @tejalprabhu01

Image

Image

@hpohekar hpohekar self-assigned this Jan 27, 2025
@seanpearsonuk
Copy link
Collaborator

seanpearsonuk commented Jan 27, 2025

@tejalprabhu01 Fluent work item ID is 1204870. cc: @hpohekar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue, problem or error in PyMAPDL Fluent
Projects
None yet
Development

No branches or pull requests

3 participants