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

fix: unitless parameter for pyconsole #3428

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ansys/fluent/core/solver/flobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,8 +1757,11 @@ def _fix_parameter_list_return(val):
for name, v in val.items():
value, units = v
if len(units) > 0 and isinstance(units[0], str):
# Symbols are not stripped in the command return in PyConsole.
# Following code will work in both PyConsole and PyFluent.
unit = units[0].lstrip("'")
unit_labels = _fix_parameter_list_return.scheme_eval(
f"(units/inquire-available-label-strings-for-quantity '{units[0]})"
f"(units/inquire-available-label-strings-for-quantity '{unit})"
)
unit_label = unit_labels[0] if len(unit_labels) > 0 else ""
else:
Expand Down