[DOC]: Lunar Lander Outdated API
Maintainers usually reply within 1 day
A pull request for this has already been merged.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
The failing example is the Lunar Lander thermal page linked in the issue; its get_surf_mean_temp function calls solver.field_info, which no longer exists on the Solver object. Replace that call with the suggested solver.fields.field_data._get_scalar_field_data path and add the itertools.chain import. Done when the example script runs past that function without an AttributeError and the docs page reflects the updated code.
Written by the indexing model from the issue text.
Description
🔗 Affected page or URL
https://fluent.docs.pyansys.com/version/stable/examples/00-fluent/lunar_lander_thermal.html
⚠️ What is wrong or missing?
AttributeError: 'Solver' object has no attribute 'field_info'
✏️ Suggested improvement
from itertools import chain
and update the function to get surface mean temperature:
def get_surf_mean_temp(
surf_names: list[str],
solver: pyfluent.session_solver.Solver,
) -> float:
"""Calculate mean surface temperature."""
# Get temperature data for the requested surfaces.
temp_data = solver.fields.field_data._get_scalar_field_data(
field_name="temperature",
surfaces=surf_names,
)
# Calculate mean temperature across surfaces.
return float(np.mean(np.concatenate(list(temp_data.values()))))
📌 Additional context
No response
- Dominant language
- Python
- Stars
- 550
- Forks
- 86
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 58
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ansys/pyfluent
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ansys/pyfluent#5515 · 2 reactions ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[DOC]: DOE_ML: Update the keras model definition to match the supported APIPossibly taken A pull request linked to this issue is open or already merged. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
`gitlab_importer_v2` pipeline failing due to malformed YAML filePossibly taken @Gowri213 claimed this today. Openbug Pipeline: Failure Priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aboutcode-org/vulnerablecode#2523 · 1 comment ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
intuitem/ciso-assistant-community#5380 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
confluentinc/cp-ansible#2767 ·
Maintainers usually reply within 3 days
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 2 days