pyfluent: vector field data request crashes at least Fluent 23R1, 23R2, 24R1
Running with an up-to-date local build of Fluent 24R1. The following usage is consistent with the doc. The data access call crashes Fluent, hence the errors on the client side. I find this 100% reproducible. The same behaviour is however well covered in CI via tests/test_field_data.py:test_field_data_objects_2d
>>> import ansys.fluent.core as pf
>>> s = pf.launch_fluent(show_gui=True, start_transcript=False)
>>> # ...read case, init and solve in Fluent...
>>> fd = s.field_data
>>> fd.is_data_valid()
True
>>> fd.get_vector_field_data.field_name.allowed_values()
['relative-velocity', 'velocity']
>>> fd.get_vector_field_data.surface_name.allowed_values()
['default-interior', 'pressure-outlet-7', 'symmetry', 'velocity-inlet-5', 'velocity-inlet-6', 'wall', 'z=0_out']
>>> # can also call with surface_name="velocity-inlet-5" with the same outcome:
>>> fd.get_vector_field_data(field_name='velocity', surface_name='pressure-outlet-7')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "e:\ansysdev\pyfluent17\pyfluent\src\ansys\fluent\core\services\field_data.py", line 358, in __call__
return self._field_data_accessor(*args, **kwargs)
File "e:\ansysdev\pyfluent17\pyfluent\src\ansys\fluent\core\services\field_data.py", line 1351, in get_vector_field_data
fields = ChunkParser().extract_fields(self._service.get_fields(fields_request))
File "e:\ansysdev\pyfluent17\pyfluent\src\ansys\fluent\core\services\field_data.py", line 818, in extract_fields
for chunk in chunk_iterator:
File "E:\ANSYSDev\pyfluent17\fieldhelp\lib\site-packages\grpc\_channel.py", line 426, in __next__
return self._next()
File "E:\ANSYSDev\pyfluent17\fieldhelp\lib\site-packages\grpc\_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Stream removed"
debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:49157 {grpc_message:"Stream removed", grpc_status:2, created_time:"2023-07-18T11:39:21.41138161+00:00"}"
N.b. field_data method help is also rather sketchy.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20 (2 by maintainers)
@hpohekar please see the above code that needs to be inserted in both the client-side code (for released Fluent versions) and also the server-side code.
@henriquedaponte thank you very much
@seanpearsonuk I can also reproduce this.
I’ve been having the same issue. Let me know if you find a solution. Here’s my code and error log:
` . . .
. . .
Node 1: Process 2128: Received signal SIGSEGV.
==============================================================================
999999: mpt_accept: error: accept failed: No error
. . .
999999: mpt_accept: error: accept failed: No error
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = RANK 1 PID 2128 RUNNING AT DESKTOP-U26BJ62 = EXIT STATUS: -1 (ffffffff)
The fl process could not be started. Traceback (most recent call last): File “C:\Users\Ique\Documents\Internship\Femto\ElbowOpt\Code\git\SimDataExtract.py”, line 51, in <module> hot_inlet_velocity_mag = field_data.get_vector_field_data(field_name=“velocity”, surface_name=“hot-inlet”) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “C:\Users\Ique\Documents\Internship\Femto\ElbowOpt\Code\git\myenv\Lib\site-packages\ansys\fluent\core\services\field_data.py”, line 359, in call return self._field_data_accessor(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “C:\Users\Ique\Documents\Internship\Femto\ElbowOpt\Code\git\myenv\Lib\site-packages\ansys\fluent\core\services\field_data.py”, line 1354, in get_vector_field_data fields = ChunkParser().extract_fields(self._service.get_fields(fields_request))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Ique\Documents\Internship\Femto\ElbowOpt\Code\git\myenv\Lib\site-packages\ansys\fluent\core\services\field_data.py”, line 819, in extract_fields for chunk in chunk_iterator: File “C:\Users\Ique\Documents\Internship\Femto\ElbowOpt\Code\git\myenv\Lib\site-packages\grpc_channel.py”, line 475, in next return self._next() ^^^^^^^^^^^^ File “C:\Users\Ique\Documents\Internship\Femto\ElbowOpt\Code\git\myenv\Lib\site-packages\grpc_channel.py”, line 881, in _next raise self grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.UNKNOWN details = “() Error Object: #f” debug_error_string = “UNKNOWN:Error received from peer {created_time:“2023-07-17T20:09:14.150338138+00:00”, grpc_status:2, grpc_message:”()\nError Object: #f"}"
(myenv) PS C:\Users\Ique\Documents\Internship\Femto\ElbowOpt\Code\git> `