ansys / pymapdl-reader

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

plot is not the same between APDL and Pymapdl_reader #336

Open sdurain opened 11 months ago

sdurain commented 11 months ago

šŸ¤“ Before submitting the issue

šŸ” Description of the bug

Hello everybody,

When i plot my rst file with pyansys, it is not the same result as APDL plotting apdl

pyansys Thanks in advance for your help

šŸ•µļø Steps To Reproduce

from ansys.mapdl import reader as pymapdl_reader

model = "C:/test_ansys/MODEL.rst"
result = pymapdl_reader.read_binary(model)
print(result)
result.plot_nodal_solution(0, 'norm', label='Displacement')

šŸ’» Which Operating System are you using?

Windows

šŸ Which Python version are you using?

3.10

šŸ“ PyMAPDL Report

Show the Report! ```text # PASTE HERE THE OUTPUT OF `python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"` here ```

šŸ“ Installed packages

Show the installed packages! ```text # PASTE HERE THE OUTPUT OF `python -m pip freeze` here ```

I have attached the .rst file here: MODEL.txt

Just change the extension ".txt" to ".rst" ( github doesn't support .rst file)

šŸ“ Logger output file

Show the logger output file. ```text # PASTE HERE THE CONTENT OF THE LOGGER OUTPUT FILE. ```
mikerife commented 11 months ago

Hi @sdurain please share either the rst file or the MAPDL/PyMAPDL script to recreate the model here.

sdurain commented 11 months ago

@mikerife updated

mikerife commented 11 months ago

Hi @sdurain I moved this to the PyMAPDL Reader GitHub. The rst file is compressed and if you search the PyMAPDL GitHub Issues you will see that there is a open issue on compressed results. The reader is trying to plot compressed values and some are too big hence the 'inf' result.

Prior to solving in Mechanical APDL you can use the /fcomp command to turn off compression for the result file. Or in WB Mechanical there is an analysis settings to do the same. For now do that or post-process with PyMAPDL.

Mike

sdurain commented 11 months ago

I have added this command in my APDL program :

/FCOMP,RST,0

again the same error.

I transmit you my APDL programs, thanks in advance !

materiaux.txt generate_mesh.txt MAIN.txt

mikerife commented 11 months ago

@sdurain watch out as the posted MAIN.txt is inputting a different mesh file. Once that is corrected for the MAPDL model runs fine. And PyMAPDL Reader can post-process without any error/issue.

sdurain commented 11 months ago

So if i merge the main.txt and the mesh file there is no errors anymore ?

mikerife commented 11 months ago

@sdurain or change the input command in the MAIN.txt to read in generate_mesh.txt,