diff --git a/src/ansys/fluent/core/post_objects/post_helper.py b/src/ansys/fluent/core/post_objects/post_helper.py index 776e50ec1b4..7457b4c4df7 100644 --- a/src/ansys/fluent/core/post_objects/post_helper.py +++ b/src/ansys/fluent/core/post_objects/post_helper.py @@ -128,7 +128,7 @@ def remote_surface_name(self, local_surface_name): # Following functions will be deprecated in future. def get_vector_fields(self): """Returns vector field.""" - return self.field_info.get_vector_fields_info() + return self.field_info().get_vector_fields_info() def get_field_unit(self, field): """Returns the unit of the field.""" @@ -140,10 +140,8 @@ def get_field_unit(self, field): scheme_eval_str = f"(units/get-pretty-wb-units-from-dimension (units/inquire-dimension '{quantity}))" return " ".join(self._scheme_str_to_py_list(scheme_eval_str)) else: - fields_info = self.field_info.get_fields_info() - for field_info in fields_info: - if field_info["solverName"] == field: - return get_si_unit_for_fluent_quantity(field_info["quantity_name"]) + fields_info = self.field_info().get_scalar_fields_info() + return get_si_unit_for_fluent_quantity(fields_info[field]["quantity_name"]) def _field_unit_quantity(self, field): scheme_eval_str = f"(cdr (assq 'units (%fill-render-info '{field})))" diff --git a/src/ansys/fluent/core/services/field_data.py b/src/ansys/fluent/core/services/field_data.py index fb24d57fc8b..782eba3acc3 100644 --- a/src/ansys/fluent/core/services/field_data.py +++ b/src/ansys/fluent/core/services/field_data.py @@ -171,6 +171,7 @@ def get_scalar_fields_info(self) -> Dict[str, Dict]: "display_name": field_info.displayName, "section": field_info.section, "domain": field_info.domain, + "quantity_name": field_info.quantity_name, } for field_info in response.fieldInfo } diff --git a/src/ansys/fluent/core/session_solver.py b/src/ansys/fluent/core/session_solver.py index 67d2858a6db..a67573dc582 100644 --- a/src/ansys/fluent/core/session_solver.py +++ b/src/ansys/fluent/core/session_solver.py @@ -117,7 +117,6 @@ def _build_from_fluent_connection( ): self._tui_service = self._datamodel_service_tui self._se_service = self._datamodel_service_se - self._settings_service = self._settings_service self._tui = None self._workflow = None self._system_coupling = None