Closed mkvani closed 2 years ago
@gyeole
>>> root.setup.materials.solid['copper'].thermal_conductivity.option.get_attr('allowed-values')
['constant', 'piecewise-linear', 'piecewise-polynomial', 'polynomial', 'expression', 'biaxial', 'cyl-orthotropic', 'orthotropic', 'principal-axes-values', 'anisotropic', 'user-defined-anisotropic-k', 'user-defined']
>>> root.setup.materials.solid['copper'].thermal_conductivity.option='cyl-orthotropic'
2022-05-10 09:34:27,572 root ERROR GRPC_ERROR: GENERAL-CAR-CDR: invalid argument [1]: improper list
Error Object: #f
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "e:\ansysdev\pyfluentnew7\pyfluent\src\ansys\fluent\core\solver\flobject.py", line 391, in __setattr__
getattr(self, name).set_state(process_value(value))
File "e:\ansysdev\pyfluentnew7\pyfluent\src\ansys\fluent\core\solver\flobject.py", line 212, in set_state
return self.flproxy.set_var(self.path, self.to_scheme_keys(state))
File "e:\ansysdev\pyfluentnew7\pyfluent\src\ansys\fluent\core\services\settings.py", line 85, in _fn
return fn(self, *args, **kwds)
File "e:\ansysdev\pyfluentnew7\pyfluent\src\ansys\fluent\core\services\settings.py", line 145, in set_var
self.__service_impl.set_var(request)
File "e:\ansysdev\pyfluentnew7\pyfluent\src\ansys\fluent\core\services\error_handler.py", line 18, in func
raise RuntimeError(ex.details()) from None
RuntimeError: GENERAL-CAR-CDR: invalid argument [1]: improper list
Error Object: #f
>>> root.setup.materials.solid['copper'].thermal_conductivity.option='polynomial'
>>>
It works fine in the TUI and GUI.
Hi @seanpearsonuk and @gyeole , The corresponding command in TUI does not provide correct response to exception handling. I have logged another issue for that (#392 )
Thank you, Manoj
[FLUENT BUG 684764]
Feature: Root settings API (solid material property) Issue: Solid material property for cylindrical orthotropic conductivity is not getting updated. Fluent throws error (improper list). The same API command works if executed second time in same session (after executing first time, it only sets "cyl-orthotropic" without setting any conductivity data and throws error in Fluent console. For second time execution, it updates the conductivity data correctly)
API command used:
Error message in Fluent console: