Closed gantnera closed 11 months ago
Hi @gantnera, thanks for reporting this. The required API files for Fluent v241 are not yet distributed with the public release of PyFluent, as Fluent v241 is still under development and hasn't been released publicly. For Fluent v241, you can try the development install as described in the installation instructions.
Fluent v232 works fine on my end, as does Fluent v241 when the required API files are provided:
It seems that the API files are missing in your PyFluent installation (are you using a dev install without the API files?), can you try again using pip install ansys-fluent-core
?
By the way, we have a new PyFluent release coming out soon.
Thanks for your response , @raph-luc
Which pyfluent version did you use when running it with v232?
Another question: how should this example look like when I would like to run it with the python-console inside Fluent-Meshing? I did a short test and it seems that the used classes are not available.
I was using a local PyFluent development version as described in the link I sent above.
The conventional PyFluent installation using pip install ansys-fluent-core
supports Fluent v232 with no issues, it is just Fluent v241 that hasn't been released yet and will require a development install of PyFluent.
The Python Console inside Fluent is not using PyFluent (yet) and objects are exposed differently. In the Python Console, you would use workflow.InitializeWorkflow(WorkflowType="Watertight Geometry")
directly. See:
I am going to close this issue tracker as there is no issue here for us to fix, feel free to continue asking questions and re-open in case you identify any issue that you wish to report (or create a new issue tracker if applicable).
🔍 Before submitting the issue
🐞 Description of the bug
trying to setup the watertight workflow with the example provided on the example page (https://fluent.docs.pyansys.com/version/stable/examples/00-fluent/mixing_elbow.html#sphx-glr-examples-00-fluent-mixing-elbow-py) does not work. The error occurs when trying to initialize the watertight workflow meshing.workflow.InitializeWorkflow(WorkflowType="Watertight Geometry")
Error-messages: v232: AttributeError: module 'ansys.fluent.core.workflow' has no attribute 'InitializeWorkflow' v241: ModuleNotFoundError: No module named 'ansys.fluent.core.datamodel_241'
Is the example out-of-date? Or is there a bug?
📝 Steps to reproduce
import ansys.fluent.core as pyfluent
meshing = pyfluent.launch_fluent(mode="meshing", product_version="24.1.0") meshing.workflow.InitializeWorkflow(WorkflowType="Watertight Geometry")
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
v232 & v241
🐍 Which Python version are you using?
3.10
📦 Installed packages