-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Result Class #185
Comments
Just noticed that there is also a: Is there a way to do the same in PyAnsys? |
So it seems that these are the relevant commands: |
Hi @iceblink-ansys MAPDL in batch uses Full Graphics by default, so be sure to be consistent there (MAPDL interactive uses Power graphics by default). That can affect averaging as well. I suggest using Full graphics in each method and compare the results. Mike |
We need to gather all of this somewhere... Maybe the FAQ section |
@mikerife do you mean that the graphics configuration can affect listing output (i.e. |
Hi @germa89 yes. The *get and *vget (and some other apdl commands) always execute with full graphics even if power graphics is activated. Mike |
How does one set these options for ansys-mapdl-reader though? Or is that not possible and should I just fully switch to ansys-mapdl-core instead? That would be a shame, the reader is really easy to use. On a sidenote: why is reading of result files not implemented as an iterator object? Loading the entire result file into memory is a bit excessive. And where is the proper place to ask questions such as this? |
Hi @iceblink-ansys |
Regarding your questions...
Well... I agree
It is an interesting concept. Well.... one of the reasons to use DPF is that it implements lazy evaluation, so the RST file is not loaded fully until needed. That is why also we are working on replace |
Don't worry at all. Think about it and let me know your conclusions, I will do the corresponding changes asap. :) |
Thanks for that, I guess I need to have a look at DPF-Core. (I was under the impression that one always needs a GUI for the DPF modules, and I only have a CLI). I was now looking into PyMapdl but that seems to be an almost one-on-one passthrough of APDL commands. Maybe good enough for now, but (like all new Ansys users) I'm trying to avoid the archaic (yet powerful) APDL as much as possible. |
Update: seems like DPF-Core is not able to do anything with result files older than v2021, so unfortunately this is not (yet) an option for me. It's okay for me to tinker around with the latest and greatest PyAnsys, but our result files will be old for quite a while... |
Interesting... @PProfizi @cbellot000 can you confirm this?? |
Excellent question. It absolutely should be an iterator, but the decision to go down the path of loading the entire file to memory was made as a memory/CPU tradeoff. |
I'm afraid that the best way to do this would now (as mentioned by @germa89), would be to use PyDPF-Core. This reader will always have a relatively limited functionality since it's a rewrite (based on public FORTRAN headers) of how MAPDL reads rst files, rather than directly using the same libraries (as used with DPF). Regardless, I appreciate the feedback and @PProfizi, I though we supported earlier than v2021 result files. I think you just need the latest install and you should be able to read older files. @iceblink-ansys, post any traceback you get from attempting to read those files in PyDPF-Core Issues. |
Hi @akaszynski, @iceblink-ansys, |
Thanks for looking into it. Maybe it's simply a matter of removing the hardcoded version check then :) |
🔍 Before submitting the issue
🐞 Description of the bug
For some reason the results from PyMAPDL-reader are not the same as from mapdl in batch mode, though the stress order of magnitude is somewhat similar.
PyMAPDL-Reader Software and Environment Report
Date: Tue Dec 20 16:54:15 2022 CET
Python 3.7.13 (default, Apr 28 2022, 08:00:21) [GCC 8.2.0]
ansys.mapdl.reader : 0.52.4
tqdm : 4.64.1
matplotlib : 3.5.3
ansys.mapdl.core : 0.63.4
scipy : 1.7.3
example output:
PyMAPDL:
mapdl:
📝 Steps to reproduce
I am extracting stress using PyMAPDL Reader (v2022, python 3.7, virtual environment). Reading a result file (generated by v18) into a Result Class, and then using "nodal_stress" method on the result class.
Then I compare the output with older output that was generated using an APDL script, using mapdl v18 in batch mode. Using the same result file. Using "PRNSOL,S,COMP".
Using only corner nodes on outside surfaces of solid-element components
💻 Which operating system are you using?
Linux
🐍 Which Python version are you using?
3.7
📦 Installed packages
The text was updated successfully, but these errors were encountered: