Skip to content

Conversation

@ansjsia
Copy link
Collaborator

@ansjsia ansjsia commented Sep 26, 2023

Implemented the headlamp radiation case (Monte Carlo radiation model) from the Fluent tutorial in PyAnsys.

@ansjsia
Copy link
Collaborator Author

ansjsia commented Sep 26, 2023

@dnwillia @seanpearsonuk Hi, would you be able to advise on fixing a build issue? The documentation build is failing on line 233 of radiation_headlamp.py where it calls meshing.tui.mesh.check_mesh() to check the mesh:

/home/ansys/actions-runner/_work/pyfluent/pyfluent/examples/00-fluent/radiation_headlamp.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/ansys/actions-runner/_work/pyfluent/pyfluent/examples/00-fluent/radiation_headlamp.py", line 233, in <module>
    meshing.tui.mesh.check_mesh()
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/datamodel_tui.py", line 288, in __getattribute__
    if PyMenu(self.service, path).get_child_names():
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/datamodel_tui.py", line 166, in get_child_names
    response = self._service.get_attribute_value(request)
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/error_handler.py", line 15, in func
    raise RuntimeError(ex.details()) from None
RuntimeError: menu not found

I can't reproduce this on my local machine, which is running version 0.18.dev0 of ansys-fluent-core.

@mkundu1
Copy link
Contributor

mkundu1 commented Sep 26, 2023

@dnwillia @seanpearsonuk Hi, would you be able to advise on fixing a build issue? The documentation build is failing on line 233 of radiation_headlamp.py where it calls meshing.tui.mesh.check_mesh() to check the mesh:

/home/ansys/actions-runner/_work/pyfluent/pyfluent/examples/00-fluent/radiation_headlamp.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/ansys/actions-runner/_work/pyfluent/pyfluent/examples/00-fluent/radiation_headlamp.py", line 233, in <module>
    meshing.tui.mesh.check_mesh()
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/datamodel_tui.py", line 288, in __getattribute__
    if PyMenu(self.service, path).get_child_names():
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/datamodel_tui.py", line 166, in get_child_names
    response = self._service.get_attribute_value(request)
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/error_handler.py", line 15, in func
    raise RuntimeError(ex.details()) from None
RuntimeError: menu not found

I can't reproduce this on my local machine, which is running version 0.18.dev0 of ansys-fluent-core.

Can you import headlamp_pmdb_file instead of headlamp_spaceclaim_file? I'm getting the following error in a local run with docker:

Error: The *.scdoc file format is not supported on Linux and its equivalent /mnt/pyfluent/headlamp.scdoc.pmdb is not available. As a workaround, you can import the *.scdoc file on a Windows machine (using the 'Save PMDB' option in the Import Options dialog) and then use the generated .pmdb file as the import file on your Linux system.

Fluent expects headlamp.scdoc.pmdb instead of headlamp.pmdb as replacement on Linux which seems to be an incorrect behaviour.

@dnwillia-work
Copy link
Collaborator

dnwillia-work commented Sep 27, 2023

@dnwillia @seanpearsonuk Hi, would you be able to advise on fixing a build issue? The documentation build is failing on line 233 of radiation_headlamp.py where it calls meshing.tui.mesh.check_mesh() to check the mesh:

/home/ansys/actions-runner/_work/pyfluent/pyfluent/examples/00-fluent/radiation_headlamp.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/ansys/actions-runner/_work/pyfluent/pyfluent/examples/00-fluent/radiation_headlamp.py", line 233, in <module>
    meshing.tui.mesh.check_mesh()
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/datamodel_tui.py", line 288, in __getattribute__
    if PyMenu(self.service, path).get_child_names():
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/datamodel_tui.py", line 166, in get_child_names
    response = self._service.get_attribute_value(request)
  File "/home/ansys/actions-runner/_work/_tool/Python/3.10.8/x64/lib/python3.10/site-packages/ansys/fluent/core/services/error_handler.py", line 15, in func
    raise RuntimeError(ex.details()) from None
RuntimeError: menu not found

I can't reproduce this on my local machine, which is running version 0.18.dev0 of ansys-fluent-core.

I think Mainak is right. The CI/CD runs on Linux so you need to use the pmdb for the documentation build pipeline. If you look at the other examples with meshing included they use the pmdb.

@ansjsia
Copy link
Collaborator Author

ansjsia commented Sep 27, 2023

@mkundu1 @dnwillia-work It works correctly now, thanks!

@ansjsia
Copy link
Collaborator Author

ansjsia commented Sep 27, 2023

@mkundu1 I'm getting this unit test fail on v23.2.0, but it's only occurring intermittently. It didn't seem to be happening yesterday. Do you have any insight on fixing this?

ERROR tests/test_flobject.py::test_find_children_from_settings_root_232 - RuntimeError: The connection to the Fluent server could not be established within the configurable 60 second time limit.

@raph-luc
Copy link
Member

@ansjsia I can answer that, that is a random test failure being tracked here: #1747

You can just re-run the failed tests when that happens

Copy link
Member

@raph-luc raph-luc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion

ansjsia and others added 2 commits September 27, 2023 16:41
Co-authored-by: Raphael Luciano <raphael.luciano@ansys.com>
Co-authored-by: Raphael Luciano <raphael.luciano@ansys.com>
Copy link
Member

@raph-luc raph-luc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @ansjsia

While building the docs for this example, I realized a few things seem to have changed about how all examples are displayed (or at least I didn't remember this behavior), created an issue tracker so we can look into this later: #2044

@ansjsia ansjsia merged commit f342a93 into main Sep 28, 2023
@ansjsia ansjsia deleted the doc/radiation-headlamp-example branch September 28, 2023 14:18
@amscosta
Copy link

amscosta commented Feb 8, 2024

Hi,
When I try to run locally is crashing in the following line :
radiation = models.radiation

It says It can not find the .radiation model.
I am using 23.1
Any hint how to solve it ?

@ansjsia
Copy link
Collaborator Author

ansjsia commented Feb 8, 2024

@amscosta You're likely getting that error because you're using 23.1, whereas this example was developed for 23.2-24.1. I'm not sure the radiation model is exposed for the 23.1 API.

@amscosta
Copy link

amscosta commented Feb 8, 2024

Thanks for the reply.
How can I verify that "exposition" ?
Would be great if each examples tells the version that is currently designed to work.

@seanpearsonuk
Copy link
Collaborator

Thanks for the reply. How can I verify that "exposition" ? Would be great if each examples tells the version that is currently designed to work.

@amscosta we currently maintain the examples to be guaranteed to work with the latest release of Fluent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants