ansys / pymapdl-reader

Legacy binary interface to MAPDL binary files.
https://reader.docs.pyansys.com
MIT License
47 stars 23 forks source link

Pyansys can't read rst files from ansys 2021 R2 #68

Open kiluam opened 3 years ago

kiluam commented 3 years ago

I'm using Ansys 2021 R2, student version. Pyansys is showing the following error: 'ValueError: negative dimensions are not allowed', while reading an Ansys rst file. Pyansys is interpreting the rst files generated from earlier Ansys versions accurately. Does anybody have a clue about the issue?

akaszynski commented 3 years ago

Hi @kiluam,

Looks like there's some work to do updating the legacy reader. I'm moving the issue to the legacy reader so we can track (and fix) it there.

akaszynski commented 2 years ago

Following up to this issue: 2021R2 result files can be read by ansys-mapdl-reader, if this is failing for specific result files, I'll need a minimum working example and sample file (ideally small) to be able to debug the issue.

lars-bittrich commented 2 years ago

Maybe I can add some more information here: I investigated the issue and found out, that these new result files seem to use zlib compression at least for the element types. binary_reader.cpp does read the zlib flag but does not act on it in any way. Is there any documentation on this zlib compression available? I also try to get a minimal example. My current ones are more than 100MB.

lars-bittrich commented 2 years ago

Just as an update. So far I did not manage to get any small example because this zlib compression does seem to be activated only for big files. On the other hand, the zlib compression is fairly simple and the data read in each record just needs to be passed to zlib uncompress. I do not know how to handle all dependencies on C level here and it needs to be implemented in a lot of different but similar functions of binary_reader.cpp. One other way would be the use of the python zlib module that already implements everything needed in zlib.decompress. But still for my example which I got with and without compression active I could verify that all data matches exactly the uncompressed data if processed by zlib uncompress.

mjc865 commented 1 year ago

Hi @akaszynski , is this on the roadmap for a fix? I can probably generate an example file if you need one. We may need to move to a newer ANSYS release at some point in the near future and it would be nice to have the legacy reader working, since I use it to get the ANSYS results into MATLAB. I'm using the legacy reader because it does not require ANSYS to be installed on the computer. Thanks

mjc865 commented 1 year ago

@lars-bittrich which element types are activating the zlib compression? I can't seem to get an example using 2021R2 Workbench with SOLID186 and SOLID187 elements.

akaszynski commented 1 year ago

@MaxJPRey, would it be possible for you to address @mjc865's point here?

MaxJPRey commented 1 year ago

@akaszynski Yes, we will work on a fix for this issue. Thanks for the notification.

MaxJPRey commented 1 year ago

Adding @germa89 for visibility.

germa89 commented 1 year ago

@mjc865 can you share a minimum working example?